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 owncloud-9.0.4.1 to nextcloud-10.0.5 failed - sql transaction error #12425

Closed
wawont opened this issue Nov 13, 2018 · 4 comments
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update feature: owncloud migration

Comments

@wawont
Copy link

wawont commented Nov 13, 2018

Steps to reproduce

1. Enable Maintenance Mode with the command line tool: sudo -u www-data php occ maintenance:mode --on
2. Remove the directory with the owncloud-9.0.4.1
3. Dump database
3. Download NC 10.0.5 and extract it to the location where the old owncloud code was
4. BackUp the configuration file config.php from the Nextcloud backup to nextcloud/config/config.php
5. Start the upgrade process with the command line tool: sudo -u www-data php occ upgrade

Expected behaviour

Successful migrate/upgrade

Actual behaviour

root@# sudo -u www-data php ./occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
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)
Done
27/27 [============================] 100%
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE "oc_preferences" SET "configvalue" = ? WHERE ("userid" = ?) AND ("appid" = ?) AND ("configkey" = ?)' with params [1542102321, "E4D21EFA-95F4-49C4-B51E-25B2B44ACE2D", "user_ldap", "lastFeatureRefresh"]:

SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
Update failed
Maintenance mode is kept active
Reset log level

I execute sql and again I get about the same:
root@# export PGPASSWORD=*********; psql -Uowncloud_user -h localhost owncloud
psql (9.4.8)
SSL-соединение (протокол: TLSv1.2, шифр: ECDHE-RSA-AES256-GCM-SHA384, бит: 256, сжатие: выкл.)
Введите "help", чтобы получить справку.

owncloud=> UPDATE "oc_preferences" SET "configvalue" = 1542101006 WHERE ("userid" = 'E4D21EFA-95F4-49C4-B51E-25B2B44ACE2D') AND ("appid" = 'user_ldap') AND ("configkey" = 'lastFeatureRefresh');
UPDATE 1
owncloud=> \q
root@# sudo -u www-data php ./occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Done
27/27 [============================] 100%
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE "oc_preferences" SET "configvalue" = ? WHERE ("userid" = ?) AND ("appid" = ?) AND ("configkey" = ?)' with params [1542101072, "E4D21EFA-95F4-49C4-B51E-25B2B44ACE2D", "user_ldap", "lastFeatureRefresh"]:

SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
Update failed
Maintenance mode is kept active
Reset log level
root@#

Server configuration

Operating system:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie

Web server:
nginx-1.6.2-5+deb8u1

Database:
posgresql-9.4+165+deb8u3

PHP version:
php5-5.6.24+dfsg-0+deb8u1

Nextcloud version: (see Nextcloud admin page)
Nextcloud-10.0.5
Updated from an older Nextcloud/ownCloud or fresh install:
owncloud-9.0.4.1
Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/nextcloud-10.0.5.tar.bz2

Signing status:

Signing status

List of activated apps:

App list
Enabled:
  - activity: 2.3.2
  - comments: 1.0.0
  - dav: 1.0.1
  - federatedfilesharing: 1.0.1
  - federation: 1.0.1
  - files: 1.5.2
  - files_pdfviewer: 0.8.1
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.1
  - notifications: 0.3.0
  - password_policy: 1.0.0
  - provisioning_api: 1.0.0
  - serverinfo: 1.1.1
  - survey_client: 0.1.5
  - systemtags: 1.0.2
  - templateeditor: 0.1
  - theming: 1.0.1
  - updatenotification: 1.0.1
  - user_ldap: 1.0.1
  - workflowengine: 1.0.1
Disabled:
  - admin_audit
  - encryption
  - external
  - files_accesscontrol
  - files_automatedtagging
  - files_external
  - files_retention
  - user_external
  - user_saml

Nextcloud configuration:

Config report
{
    "system": {
        "updatechecker": false,
        "instanceid": "oc0cyn606v9j",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "owncloud.navitel.cnt"
        ],
        "datadirectory": "\/srv\/samba\/owncloud",
        "overwrite.cli.url": "https:\/\/owncloud.navitel.cnt",
        "dbtype": "pgsql",
        "version": "9.0.4.1",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "tempdirectory": "\/srv\/samba\/tmp",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "127.0.0.1",
            "port": 6379
        },
        "ldapIgnoreNamingRules": false,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "localhost",
        "mail_smtpport": "25",
        "loglevel": 2,
        "maintenance": true,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

</details>

**Are you using external storage, if yes which one:** local/smb/sftp/...

**Are you using encryption:** yes/no
no
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
ActiveDirector (samba4)
#### LDAP configuration (delete this part if not used)
<details>
<summary>LDAP config</summary>

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

root@# sudo -u www-data php occ ldap:show-config
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "ldap" namespace.

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = 'user_ldap';

owncloud=> SELECT * FROM oc_appconfig WHERE 'appid' = 'user_ldap';
 appid | configkey | configvalue 
-------+-----------+-------------
(0 строк)

owncloud=>

Client configuration

Logs

Web server error log

Nextcloud log (data/nextcloud.log)

Nextcloud log
Empty

Browser log

@wawont
Copy link
Author

wawont commented Nov 13, 2018

Possible version owncloud 9.1.5.2
9.0.4.1 - taken from config...

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #7655 (Issues while migrating from Owncloud 10.0.4 to Nextcloud 12.0.4), #8754 (White page / Error 500 after Upgrade from Nextcloud 12.0.4 to 13 ), #9911 (Nextcloud upgrade to 13.0.4 Failed), and #4213 (Upgrade from nc 9.0.51 to 10.0.4 failed - sql transaction error).

@gjedeer
Copy link

gjedeer commented Dec 28, 2018

I'm not a nextcloud dev so please don't take it as an official statement. If you don't have a lot of users, do a fresh install of Nextcloud and migrate your data. Upgrading is just not worth it, I upgraded, then I was stuck on version 11 (related ticket is in this bug tracker), then somehow I managed to upgrade to 12, and every upgrade since is pain and suffering. My installation became slow and bloated too. It doesn't seem like newcomers to Nextcloud suffer any of the problems I do, even if they handle much more data than I do.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv
Copy link
Member

As the version of the software you've reported this for has reached end of life, I will close this ticket. If this is still happening after an upgrade to the latest version, feel free to reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update feature: owncloud migration
Projects
None yet
Development

No branches or pull requests

4 participants