Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from 9.0.1 to 9.0.2 fails #350

Closed
albertocrj opened this issue May 9, 2016 · 30 comments
Closed

Upgrade from 9.0.1 to 9.0.2 fails #350

albertocrj opened this issue May 9, 2016 · 30 comments
Assignees
Milestone

Comments

@albertocrj
Copy link

albertocrj commented May 9, 2016

Steps to reproduce

  1. Install stable9 (9.0.1) tarball
  2. Run the updater
  3. Go to admin page and access updater

Expected behaviour

Updater upgrades to 9.0.2

Actual behaviour

Upgrade fails

Server configuration

Operating system**: Red Hat Enterprise Linux Server release 7.1 (Maipo)

Web server: Apache 2.4.6 + mod_fcgid

Database: mysql 5.5.47

PHP version: PHP 5.6.20

ownCloud version: 9.0.1

Updated from an older ownCloud or fresh install: Fresh install

**Where did you install ownCloud from: Download of owncloud-9.0.1.tar.bz2

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.6
  - documents: 0.12.0
  - encryption: 1.2.0
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_antivirus: 0.8.0.1
  - files_pdfviewer: 0.8
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
  - user_ldap: 0.8.0

The content of config/config.php:

    "system": {
        "datadirectory": "\/owncloud\/data",
        "trashbin_retention_obligation": 60,
        "enable_previews": true,
        "preview_libreoffice_path": "\/bin\/libreoffice",
        "preview_max_x": 2048,
        "preview_max_scale_factor": 10,
        "preview_max_filesize_image": 50,
        "preview_office_cl_parameters": "",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "instanceid": "ocjl3rwvb6qy",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "owncloud.local"
        ],
        "overwrite.cli.url": "https:\/\/owncloud.local",
        "dbtype": "mysql",
        "version": "9.0.1.3",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "America\/Sao_Paulo",
        "installed": true,
        "default_language": "pt_BR",
        "defaultapp": "files",
        "session_keepalive": true,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "ldapIgnoreNamingRules": false,
        "loglevel": "0",
        "singleuser": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "127.0.0.1",
            "port": 6379
        },
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration

+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                     |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                                                                                       |
| hasPagedResultSupport         |                                                                                                                                         |
| homeFolderNamingRule          |                                                                                                                                         |
| lastJpegPhotoLookup           | 0                                                                                                                                       |
| ldapAgentName                 | uid=MY_BIND_LOGIN                                                                                        |
| ldapAgentPassword             | ***                                                                                                                                     |
| ldapAttributesForGroupSearch  |                                                                                                                                         |
| ldapAttributesForUserSearch   |                                                                                                                                         |
| ldapBackupHost                |                                                                                                                                         |
| ldapBackupPort                |                                                                                                                                         |
| ldapBase                      | dc=MY_BASE_DN                                                                                                                         |
| ldapBaseGroups                | ou=MY_GROUP_DN                                                                                            |
| ldapBaseUsers                 | ou=MY_USERS_DN                                                                                                                  |
| ldapCacheTTL                  | 600                                                                                                                                     |
| ldapConfigurationActive       | 1                                                                                                                                       |
| ldapDynamicGroupMemberURL     |                                                                                                                                         |
| ldapEmailAttribute            | mail                                                                                                                                    |
| ldapExperiencedAdmin          | 0                                                                                                                                       |
| ldapExpertUUIDGroupAttr       | cn                                                                                                                                      |
| ldapExpertUUIDUserAttr        | uid                                                                                                                                     |
| ldapExpertUsernameAttr        | mail                                                                                                                                    |
| ldapGroupDisplayName          | cn                                                                                                                                      |
| ldapGroupFilter               | (&(objectclass=ntGroup))                                                                                                                |
| ldapGroupFilterGroups         |                                                                                                                                         |
| ldapGroupFilterMode           | 0                                                                                                                                       |
| ldapGroupFilterObjectclass    |                                                                                                                                         |
| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                                            |
| ldapHost                      | ldaps://ldap.local                                                                                                                |
| ldapIgnoreNamingRules         |                                                                                                                                         |
| ldapLoginFilter               | (&(&(objectclass=inetOrgPerson)(memberof=MY_GROUP))(|(uid=%uid)(|(mail=%uid)))) |
| ldapLoginFilterAttributes     |                                                                                                                                         |
| ldapLoginFilterEmail          | 1                                                                                                                                       |
| ldapLoginFilterMode           | 0                                                                                                                                       |
| ldapLoginFilterUsername       | 1                                                                                                                                       |
| ldapNestedGroups              | 1                                                                                                                                       |
| ldapOverrideMainServer        |                                                                                                                                         |
| ldapPagingSize                | 20000                                                                                                                                   |
| ldapPort                      | 636                                                                                                                                     |
| ldapQuotaAttribute            |                                                                                                                                         |
| ldapQuotaDefault              |                                                                                                                                         |
| ldapTLS                       | 0                                                                                                                                       |
| ldapUserDisplayName           | cn                                                                                                                                      |
| ldapUserDisplayName2          | mail                                                                                                                                    |
| ldapUserFilter                | (&(objectclass=inetOrgPerson)(memberof=cn=MY_GROUP))                               |
| ldapUserFilterGroups          |                                                                                                                                         |
| ldapUserFilterMode            | 0                                                                                                                                       |
| ldapUserFilterObjectclass     |                                                                                                                                         |
| ldapUuidGroupAttribute        | auto                                                                                                                                    |
| ldapUuidUserAttribute         | auto                                                                                                                                    |
| turnOffCertCheck              | 0                                                                                                                                       |
| useMemberOfToDetectMembership | 1                                                                                                                                       |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Logs

Web server error log

[Mon May 09 12:00:06.502493 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: PHP Fatal error:  Uncaught exception 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' with message 'The command "php /var/www/owncloud-9.0.1/occ --no-warnings config:list --private  --output "json"" failed.
[Mon May 09 12:00:06.502529 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: Exit Code: 255(Unknown error)
[Mon May 09 12:00:06.502535 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: Output:
[Mon May 09 12:00:06.502539 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: ================
[Mon May 09 12:00:06.502542 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: Error Output:
[Mon May 09 12:00:06.502546 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: ================
[Mon May 09 12:00:06.502549 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: PHP Fatal error:  Class OCA\\Encryption\\Crypto\\Encryption contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (OCP\\Encryption\\IEncryptionModule::isReadyForUser) in /var/www/owncloud-9.0.1/apps/encryption/lib/crypto/encryption.php on line 550
[Mon May 09 12:00:06.502553 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: ' in /var/www/owncloud-9.0.1/updater/src/Utils/OccRunner.php:50
[Mon May 09 12:00:06.502557 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: Stack trace:
[Mon May 09 12:00:06.502560 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: #0 /var/www/owncloud-9.0.1/updater/src/Utils/OccRunner.php(56): Owncloud\\Updater\\Utils\\OccRunner->run('--no-warnings c...')
[Mon May 09 12:00:06.502572 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: #1 /var/www/owncloud-9.0.1/updater/src/Utils/ConfigReader.php(106): Owncloud\\Updater\\Utils\\OccRunner->runJson('config:list --p...')
[Mon May 09 12:00:06.502576 2016] [fcgid:warn] [pid 2785] [client MY_CLIENT_IP:54441] mod_fcgid: stderr: #2 /var/www/owncloud-9.0.1/updater/src/Utils/ConfigReader.php(50): Owncloud\\Updater\\Utils\\ConfigReader->load() in /var/www/owncloud-9.0.1/updater/src/Utils/OccRunner.php on line 50

Updater log (update.log)

[info] Execution of upgrade:checkpoint command started
[info] Execution of upgrade:checkpoint command stopped. Exit code is 0
[info] Execution of upgrade:detect command started
[info] ownCloud 9.0.1.3 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:checkSystem command started
[info] Execution of upgrade:checkSystem command stopped. Exit code is 0
[info] Execution of upgrade:checkpoint command started
[info] Execution of upgrade:checkpoint command stopped. Exit code is 0
[info] Execution of upgrade:detect command started
[info] ownCloud 9.0.1.3 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:disableNotShippedApps command started
[info] Execution of upgrade:disableNotShippedApps command stopped. Exit code is 0
[info] Execution of upgrade:executeCoreUpgradeScripts command started
[debug] Moving config/config.sample.php
[debug] Moving core
[debug] Moving l10n
[debug] Moving lib
[debug] Moving ocs
[debug] Moving ocs-provider
[debug] Moving resources
[debug] Moving settings
[debug] Moving .htaccess
[debug] Moving .mailmap
[debug] Moving .tag
[debug] Moving .user.ini
[debug] Moving AUTHORS
[debug] Moving console.php
[debug] Moving COPYING-AGPL
[debug] Moving cron.php
[debug] Moving db_structure.xml
[debug] Moving index.html
[debug] Moving index.php
[debug] Moving indie.json
[debug] Moving occ
[debug] Moving public.php
[debug] Moving remote.php
[debug] Moving robots.txt
[debug] Moving status.php
[debug] Moving version.php
[info] Execution of upgrade:executeCoreUpgradeScripts command stopped. Exit code is 0

@mundschenk-at
Copy link

I encountered the same problem on FreeBSD/nginx. Apparently the base interfaces were upgraded, but not the encryption app, leading to a fatal error preventing the updater from continuing the process. I fixed my installation by doing a manual update from the shell.

@mundschenk-at
Copy link

mundschenk-at commented May 11, 2016

Apparently the manual update was not a complete fix, I still get Downgrading is not supported and is likely to cause unpredictable issues (from 9.0.2.2 to 9.0.1.3) in the logs (although everything seems to work normally).

Update: Restarting php-fpm solved the problem. It seems that some PHP file was not recompiled properly by the opcode cache.

@cootem
Copy link

cootem commented May 11, 2016

same problem. I am only able to access my site by first deleting the encryption app folder. Of course, this has other implications. The encryption app version is 1.2.0. Is there a replacement app that would work.
specific error when encryption app is present:

PHP Fatal error:  Class OCA\Encryption\Crypto\Encryption contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (OCP\Encryption\IEncryptionModule::isReadyForUser) in /home/xxx/xxx/owncloud/apps/encryption/lib/crypto/encryption.php on line 550

@ghost
Copy link

ghost commented May 11, 2016

I confirm the problem. It same too me.
Debian 8 / Nginx / owncloud 9.0.1 -> 9.0.2
I had must move the encryption app folder to fix the problem. But now, none files are encrypted and it's impossible to retrieve file from web interface.

@magenbrot
Copy link

@Nosti31 you can still update owncloud "the regular way" by downloading the tarball from owncloud.org and following the manual upgrade procedures: https://doc.owncloud.org/server/9.0/admin_manual/maintenance/manual_upgrade.html

@LukasReschke
Copy link
Member

@VicDeo @cmonteroluque @karlitschek @jospoortvliet Can we give this some priority?

@ghost
Copy link

ghost commented May 11, 2016

@magenbrof I have already manually updated my install but it's not worked, so i have retried and it work. :)

@karlitschek
Copy link

Yes. really bad bug as discussed before :-(

@cootem
Copy link

cootem commented May 12, 2016

ran a manual upgrade and encryption is working again
manual upgrade
Thanks, everyone

@LukasReschke
Copy link
Member

Ok. My stance: That's because core is updated before the apps and OCC is invoked which also accesses the encryption class. Since the interface has changed this explodes.

@LukasReschke
Copy link
Member

@karlitschek @jospoortvliet @cmonteroluque @DeepDiver1975 @PVince81 @VicDeo I'll deactivate updates to 9.0.2. And we REALLY need to fix this. Plus we REALLY need to get QA on any case of update situations.

@VicDeo
Copy link
Member

VicDeo commented May 12, 2016

@LukasReschke
a. should encryption be enabled to reproduce it?

@PVince81 PVince81 added this to the 9.0.3-current-maintenance milestone May 12, 2016
@LukasReschke
Copy link
Member

PR to disable updater delivery for 9.0 is at https://github.com/owncloud/administration-internal/pull/17

@PVince81
Copy link
Contributor

The updater should not iterate over apps when running apps upgrade. Let core do the work.

@VicDeo
Copy link
Member

VicDeo commented May 12, 2016

@PVince81 it's in master already #347

@LukasReschke
Copy link
Member

LukasReschke commented May 12, 2016

a. should encryption be enabled to reproduce it?

Yes. I enabled encryption on 9.0.1 and then updated => 500 on all ownCloud pages 💣

This is because the interface is not matching the app code anymore.

2016-05-12_18-47-55

@LukasReschke
Copy link
Member

LukasReschke commented May 12, 2016

So, we have now the following fun tasks for 9.0.3:

@karlitschek
Copy link

:-( :-( :-(. I really thought that we get better testing for this. It's bad that we keep on killing instances. I'm happy to help. Just le me know

@PVince81
Copy link
Contributor

@VicDeo can you take care of #350 (comment) ? (including backports)
Thanks.

@VicDeo
Copy link
Member

VicDeo commented May 12, 2016

@PVince81 needs to be tested but it is possibly already fixed in master with #347
So this is 9.0-specific (no backports needed)

@PVince81
Copy link
Contributor

@VicDeo do you mean you are going to test it or are you waiting for people to help testing the master fix ?
Please clarify.

Would also be good to have the backport PR as well to test it too.

@VicDeo
Copy link
Member

VicDeo commented May 13, 2016

@PVince81 >do you mean you are going to test it or are you waiting for people to help testing the master fix ?

me. Already checked this way:

  1. Install 9.0.1
  2. Switch channel to daily
  3. Enable encryption
  4. Replace /path/to/oc/updater with updater from master
  5. Upgrade

Result:

 >php occ status
  - installed: true
  - version: 9.1.0.1
  - versionstring: 9.1.0 pre alpha
  - edition: 
> php occ app:list
Enabled:
  - activity: 2.3.2
  - comments: 0.3.0
  - dav: 0.2.4
  - encryption: 1.3.0
  - federatedfilesharing: 0.2.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.10.0
  - files_texteditor: 2.1
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.0
Disabled:
  - external
  - files_external
  - user_external
  - user_ldap

Output:

Updating core
Extracting source into /home/deo/public_html/901/data/updater-data/_oc_upgrade/100.0.0.0
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)


Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Drop old database tables


Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level

Updating apps
Copying the application activity
Copying the application comments
Copying the application dav
Copying the application encryption
Copying the application external
Copying the application federatedfilesharing
Copying the application federation
Copying the application files
Copying the application files_external
Copying the application files_pdfviewer
Copying the application files_sharing
Copying the application files_texteditor
Copying the application files_trashbin
Copying the application files_versions
Copying the application files_videoplayer
Copying the application firstrunwizard
Copying the application gallery
Copying the application notifications
Copying the application provisioning_api
Copying the application systemtags
Copying the application templateeditor
Copying the application updatenotification
Copying the application user_external
Copying the application user_ldap
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Checked database schema update
Checking updates of apps
Checking whether the database schema for <activity> can be updated (this can take a long time depending on the database size)


Checking whether the database schema for <dav> can be updated (this can take a long time depending on the database size)


Checking whether the database schema for <federation> can be updated (this can take a long time depending on the database size)


Checking whether the database schema for <files_sharing> can be updated (this can take a long time depending on the database size)


Checking whether the database schema for <files_trashbin> can be updated (this can take a long time depending on the database size)
Checking whether the database schema for <notifications> can be updated (this can take a long time depending on the database size)
Checked database schema update for apps
Updating database schema
Updated database
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 0.2.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 0.8.1
Updating <gallery> ...
Updated <gallery> to 15.0.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 0.5.0
Updating <updatenotification> ...
Updated <updatenotification> to 0.2.0
Updating <federation> ...
Updated <federation> to 0.1.0
Updating <files> ...
Updated <files> to 1.5.1
Updating <activity> ...
Updated <activity> to 2.3.2
Updating <dav> ...
Updated <dav> to 0.2.4
Updating <encryption> ...
Updated <encryption> to 1.3.0
Updating <files_sharing> ...
Updated <files_sharing> to 0.10.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 0.9.0
Updating <files_versions> ...
Updated <files_versions> to 1.3.0
Updating <comments> ...
Updated <comments> to 0.3.0
Updating <notifications> ...
Updated <notifications> to 0.3.0
Updating <systemtags> ...
Updated <systemtags> to 0.3.0
Drop old database tables


Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level

Finishing the update
Done
Done
All done!

@VicDeo
Copy link
Member

VicDeo commented May 13, 2016

preparing a backport

@ghost
Copy link

ghost commented May 14, 2016

@VicDeo thanks

@enoch85
Copy link
Member

enoch85 commented May 16, 2016

Sorry for OT here, but why can't you use the Updater when you have recommended file permissions aka "Strong Permissions"? It just works with www-data.

@DeepDiver1975
Copy link
Member

The issue for this mess is because the updater is updating all core apps step by step which is stupid as I already explained many times. W(hy)TF is nobody listening and fix this mess? 😠

owncloud/core#24518 (comment)

@VicDeo @PVince81 @cmonteroluque

@VicDeo
Copy link
Member

VicDeo commented May 17, 2016

@DeepDiver1975 >The issue for this mess is because the updater is updating all core apps step by step

no. Moreover, if it were done app by app issue wouldn't arise at all :)

P.S. Master is not affected. Backports to stable9 are in #352

@DeepDiver1975
Copy link
Member

Moreover, if it were done app by app issue wouldn't arise at all :)

definitly not! See the issue!

  1. core code is updated and adds method to the interface
  2. encryption app holds now code which breaks because of the new interface method
  3. any additional call to owncloud will fail 💥

If in step one core AND all core apps would have been added this will not happen.

P.S. Master is not affected. Backports from stable9 are in #352

So are you telling be that this approach was change meanwhile?

@VicDeo
Copy link
Member

VicDeo commented May 17, 2016

@DeepDiver1975
yes.
The files of all apps are wiped with ExecuteCoreUpgradeScripts command before upgrading the core since they are all in the recent checkpoint already.
Then updated core apps are moved from a new package to the upgraded core with UpgradeShippedApps command.

@PVince81
Copy link
Contributor

Backport was merged, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants