Skip to content

Upgrade to 5.0.11 failed to update database structure #4809

Closed

Description

@StrangeNoises

Reposted but according to bug-reporting template. Missed that before, maybe is why being ignored. ;-)

Expected behaviour

Upgrade from 5.0.10 to 5.0.11 should proceed without a hitch.

Actual behaviour

Upgrade fails on updating database structure. On viewing page, I see:

Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error
message: Could not execute statement] [Last executed query: ALTER TABLE
`oc_locks` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT
PRIMARY KEY, CHANGE `timeout` `timeout` INT UNSIGNED DEFAULT 0,
CHANGE `created` `created` BIGINT DEFAULT 0, CHANGE `scope` `scope`
TINYINT DEFAULT 0, CHANGE `depth` `depth` TINYINT DEFAULT 0] [Native code:
1068] [Native message: Multiple primary key defined] )

Steps to reproduce

  1. Start with working 5.0.10 setup on Ubuntu using mysql as migrated to following this guide religiously: http://fabianpeter.de/cloud/owncloud-migrating-from-sqlite-to-mysql/
  2. Attempt to upgrade to 5.0.11 (using apt-get upgrade)
  3. Wonder why the client doesn't reconnect. Visit site to see error message.

Server configuration

Operating system: Ubuntu 12.04.3 LTS

Web server: Apache 2.2.22-1ubuntu1.4 (from ubuntu repo, 'apache2')

Database: MySQL 5.5.32-0ubuntu-.12.04.1 (from ubuntu repo, 'mysql-server')

PHP version: 5.3.10-1ubuntu3.8 (from ubunu repo, 'php5')

ownCloud version: Problem occurs on upgrade. Both versions (taken after reverting back to 5.0.10 to get back a working system)

$ apt-cache-policy owncloud
owncloud:
  Installed: 5.0.10-1
  Candidate: 5.0.11-0
  Version table:
     5.0.11-0 0
        500 http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_12.04/  Packages
 *** 5.0.10-1 0
        100 /var/lib/dpkg/status
     3.0.0-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

Client configuration

Browser: Firefox 23.0.1

Operating system: Mac OS X 10.8.4 and Ubuntu Linux 13.04

Client version: 1.4.0

None of which I expect is relevant. :-) Not a client or web interface problem.

Logs

Web server error log

Doubt this is relevant, but here you go:

[Sun Sep 08 06:35:38 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.7 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
[Sun Sep 08 08:34:25 2013] [error] [client 5.10.83.34] File does not exist: /var/www/robots.txt
[Sun Sep 08 09:50:58 2013] [error] [client 68.118.248.62] Invalid method in request \x80w\x01\x03\x01
[Sun Sep 08 09:50:58 2013] [error] [client 68.118.248.62] File does not exist: /var/www/HNAP1, referer: http://88.198.45.142/
[Sun Sep 08 12:36:03 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Sun Sep 08 14:52:06 2013] [notice] Graceful restart requested, doing restart
[Sun Sep 08 14:52:07 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
[Sun Sep 08 14:53:06 2013] [notice] caught SIGTERM, shutting down
[Sun Sep 08 14:55:08 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
[Sun Sep 08 14:55:34 2013] [error] [client 85.190.0.3] File does not exist: /var/www/freenode-proxy-checker.txt
[Sun Sep 08 14:55:34 2013] [error] [client 85.190.0.3] File does not exist: /var/www/freenode-proxy-checker.txt
[Sun Sep 08 16:25:08 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Sun Sep 08 16:27:45 2013] [error] [client 8.26.191.44] File does not exist: /var/www/user
[Sun Sep 08 17:43:40 2013] [error] [client 173.212.201.132] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Sun Sep 08 18:44:14 2013] [error] [client 213.132.75.90] File does not exist: /var/www/admin
[Sun Sep 08 20:07:24 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 01:53:20 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 02:24:36 2013] [error] [client 111.248.57.84] File does not exist: /var/www/intl
[Mon Sep 09 03:19:03 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 03:38:13 2013] [error] [client 60.199.197.5] File does not exist: /var/www/w00tw00t.at.blackhats.romanian.anti-sec:)
[Mon Sep 09 03:38:14 2013] [error] [client 60.199.197.5] File does not exist: /var/www/phpMyAdmin
[Mon Sep 09 03:38:14 2013] [error] [client 60.199.197.5] File does not exist: /var/www/phpmyadmin
[Mon Sep 09 03:38:15 2013] [error] [client 60.199.197.5] File does not exist: /var/www/pma
[Mon Sep 09 03:38:15 2013] [error] [client 60.199.197.5] File does not exist: /var/www/myadmin
[Mon Sep 09 03:38:16 2013] [error] [client 60.199.197.5] File does not exist: /var/www/MyAdmin
[Mon Sep 09 11:04:53 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 11:37:00 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 11:52:47 2013] [error] [client 66.249.73.29] File does not exist: /var/www/robots.txt
[Mon Sep 09 13:56:35 2013] [error] [client 87.197.147.65] File does not exist: /var/www/favicon.ico
[Mon Sep 09 14:46:09 2013] [error] [client 86.105.36.246] File does not exist: /var/www/admin
[Mon Sep 09 15:05:37 2013] [error] [client 83.65.190.162] File does not exist: /var/www/favicon.ico
[Mon Sep 09 15:41:50 2013] [error] [client 66.249.73.175] File does not exist: /var/www/robots.txt
[Mon Sep 09 18:12:18 2013] [error] [client 85.110.217.104] File does not exist: /var/www/favicon.ico
[Mon Sep 09 18:32:40 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Mon Sep 09 19:29:25 2013] [error] [client 142.9.1.100] File does not exist: /var/www/favicon.ico
[Mon Sep 09 20:51:15 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Tue Sep 10 01:50:36 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Tue Sep 10 04:30:20 2013] [error] [client 49.212.200.146] File does not exist: /var/www/phppath
[Tue Sep 10 06:22:03 2013] [error] [client 146.255.32.95] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Tue Sep 10 06:35:22 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Tue Sep 10 09:32:20 2013] [error] [client 54.225.209.54] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Tue Sep 10 14:36:45 2013] [error] [client 61.228.88.232] File does not exist: /var/www/intl
[Tue Sep 10 14:49:04 2013] [error] [client 178.115.129.252] File does not exist: /var/www/favicon.ico
[Tue Sep 10 14:49:04 2013] [error] [client 178.115.129.252] File does not exist: /var/www/apple-touch-icon-precomposed.png
[Tue Sep 10 14:49:04 2013] [error] [client 178.115.129.252] File does not exist: /var/www/apple-touch-icon.png
[Tue Sep 10 15:15:18 2013] [error] [client 192.126.136.250] request failed: error reading the headers
[Tue Sep 10 16:38:59 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Tue Sep 10 17:32:17 2013] [error] [client 88.198.45.142] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Tue Sep 10 17:32:17 2013] [error] [client 88.198.45.142] File does not exist: /var/www/core
[Tue Sep 10 17:38:03 2013] [error] [client 88.198.45.142] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Tue Sep 10 17:38:03 2013] [error] [client 88.198.45.142] File does not exist: /var/www/core
[Tue Sep 10 17:53:38 2013] [error] [client 88.198.45.142] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Tue Sep 10 17:53:38 2013] [error] [client 88.198.45.142] File does not exist: /var/www/core
[Tue Sep 10 18:00:34 2013] [error] [client 88.198.45.142] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Tue Sep 10 18:00:34 2013] [error] [client 88.198.45.142] File does not exist: /var/www/core
[Tue Sep 10 20:27:48 2013] [error] [client 54.226.13.150] File does not exist: /var/www/spicons
[Tue Sep 10 21:30:52 2013] [notice] caught SIGTERM, shutting down
[Tue Sep 10 21:30:54 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
[Tue Sep 10 21:31:50 2013] [error] [client 85.190.0.3] File does not exist: /var/www/freenode-proxy-checker.txt
[Tue Sep 10 21:31:50 2013] [error] [client 85.190.0.3] File does not exist: /var/www/freenode-proxy-checker.txt
[Wed Sep 11 00:39:23 2013] [error] [client 190.64.4.194] File does not exist: /var/www/phppath
[Wed Sep 11 02:16:12 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Wed Sep 11 08:11:34 2013] [error] [client 66.249.73.29] File does not exist: /var/www/robots.txt
[Wed Sep 11 11:40:24 2013] [error] [client 78.186.179.34] File does not exist: /var/www/favicon.ico
[Wed Sep 11 12:16:28 2013] [error] [client 202.190.203.223] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.Win32:)
[Wed Sep 11 14:02:17 2013] [error] [client 46.220.116.34] File does not exist: /var/www/favicon.ico
[Wed Sep 11 14:03:03 2013] [error] [client 46.220.116.34] File does not exist: /var/www/favicon.ico
[Wed Sep 11 15:14:42 2013] [error] [client 157.55.33.23] File does not exist: /var/www/robots.txt
[Wed Sep 11 16:01:28 2013] [error] [client 66.249.73.8] File does not exist: /var/www/robots.txt

ownCloud log (data/owncloud.log)

The full log is large, and contains filenames of files in my owncloud I'd rather keep private, which is why we like owncloud of course ;-). What I paste starts from when I start the upgrade and continues to the end of the log as it stands. The last four lines are from after I reverted to 5.0.10. BTW I note the upgrade versions it mentions (5.0.17 to 5.0.20) bear only a passing relation to the version of the actual application!

{"app":"core","message":"starting upgrade from 5.0.17 to 5.0.20","level":2,"time":"2013-09-10T20:31:46+00:00"}
{"app":"core","message":"Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement]\n[Last executed query: ALTER TABLE `oc_locks` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, CHANGE `timeout` `timeout` INT UNSIGNED DEFAULT 0, CHANGE `created` `created` BIGINT DEFAULT 0, CHANGE `scope` `scope` TINYINT DEFAULT 0, CHANGE `depth` `depth` TINYINT DEFAULT 0]\n[Native code: 1068]\n[Native message: Multiple primary key defined]\n)","level":4,"time":"2013-09-10T20:31:47+00:00"}
{"app":"PHP","message":"filesize(): stat failed for \/var\/www\/owncloud\/data\/rachel\/files\/MLP Comics\/YP-PDF-MSCOMIC08.pdf at \/var\/www\/owncloud\/lib\/files\/storage\/local.php#74","level":2,"time":"2013-09-11T07:22:33+00:00"}
{"app":"PHP","message":"filesize(): stat failed for \/var\/www\/owncloud\/data\/rachel\/files\/MLP Comics\/YP-PDF-MSCOMIC08.pdf at \/var\/www\/owncloud\/lib\/files\/storage\/local.php#74","level":2,"time":"2013-09-11T07:22:33+00:00"}
{"app":"PHP","message":"Only variables should be passed by reference at \/var\/www\/owncloud\/apps\/search_lucene\/lib\/indexer.php#163","level":2,"time":"2013-09-11T07:23:01+00:00"}
{"app":"PHP","message":"Cross-reference streams are not supported yet. at \/var\/www\/owncloud\/apps\/search_lucene\/3rdparty\/Zend\/Pdf\/Parser.php#318","level":4,"time":"2013-09-11T07:23:02+00:00"}

Browser log

This is a server upgrade issue. No browser issues to report, no relevant log to upload. (Web interface working fine.)

Additional information

mysql> show create table oc_locks gives one row (formatting rules omitted)
| Table    | Create Table
oc_locks | CREATE TABLE `oc_locks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(64) DEFAULT NULL,
  `owner` varchar(100) DEFAULT NULL,
  `timeout` int(10) unsigned DEFAULT '0',
  `created` bigint(20) DEFAULT '0',
  `token` varchar(100) DEFAULT NULL,
  `scope` smallint(6) DEFAULT '0',
  `depth` smallint(6) DEFAULT '0',
  `uri` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

Activity

  1. StrangeNoises commented on Sep 12, 2013

    @StrangeNoises
    Author

    So it's a longstanding problem. Is this a won't-fix then? because there's no way I'm mucking about like this on every upgrade.

  2. StrangeNoises commented on Sep 12, 2013

    @StrangeNoises
    Author

    i see from comments there the same bug afflicts upgrades with a postgresql backend too.

  3. karlitschek commented on Nov 29, 2013

    @karlitschek
    Contributor

    duplicate of #4085

  4. locked as resolved and limited conversation to collaborators on Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions