Skip to content

DB issues after upgrade from 9.1.5 to 10.0.2 #28331

Closed

Description

@chscherrer

If you found a bug:

--> Can't connect to owncloud server after upgrade from 9.1.5 to 10.0.2 with iOS client

Steps to reproduce

Don't know whether its reproducable

Expected behaviour

Should log in

Actual behaviour

Doesn't log in

Server configuration

Web server: Apache 2.4

Database: MySQL

PHP version: php5.6

ownCloud version: 10.0.2

Storage backend (external storage):

Client

iOS version: 10.3.2

ownCloud app version: 3.6.2

Device model: iPhone 6s

Logs

ownCloud log (data/owncloud.log)

{"reqId":"WV6K6H8AAAEAAEmljB8AAABO","level":4,"time":"2017-07-06T19:09:28+00:00","remoteAddr":"10.0.0.13","user":"my_user","app":"webdav","method":"PROPFIND","url":"/oc/remote.php/webdav/","message":"Exception: {"Message":"An exception occurred while executing 'SELECT * FROM oc_properties WHERE fileid IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND propertyname in (?, ?) ORDER BY propertyname' with params [1152106, 1487506, 7649, 1487234, 7653, 72, 7651, 1051770, 7652, 715226, 1469155, 1152226, 1318322, 7650, \"{DAV:}creationdate\", \"{DAV:}displayname\"]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'fileid' in 'where clause'","Exception":"Doctrine\\DBAL\\Exception\\InvalidFieldNameException","Code":0,"Trace":"#0 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(855): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'SELECT * FROM ...', Array)\\n#2 \\\/var\\\/www\\\/localhost\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(190): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT * FROM ...', Array, Array, NULL)\n#3 \/var\/www\/localhost\/htdocs\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/CustomPropertiesBackend.php(334): OC\\DB\\Connection->executeQuery('SELECT * FROM `...', Array, Array)\n#4 \/var\/www\/localhost\/htdocs\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/CustomPropertiesBackend.php(139): OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend->loadChildrenProperties(Object(OCA\\DAV\\Connector\\Sabre\\Directory), Array)\n#5 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/PropertyStorage\/Plugin.php(91): OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend->propFind('', Object(Sabre\\DAV\\PropFind))\n#6 [internal function]: Sabre\\DAV\\PropertyStorage\\Plugin->propFind(Object(Sabre\\DAV\\PropFind), Object(OCA\\DAV\\Connector\\Sabre\\Directory))\n#7 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#8 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1058): Sabre\\Event\\EventEmitter->emit('propFind', Array)\n#9 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(980): Sabre\\DAV\\Server->getPropertiesByNode(Object(Sabre\\DAV\\PropFind), Object(OCA\\DAV\\Connector\\Sabre\\Directory))\n#10 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1665): Sabre\\DAV\\Server::getPropertiesIteratorForPath('', Array, 1)\n#11 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(355): Sabre\\DAV\\Server->generateMultiStatus(Object(Generator), false)\n#12 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#13 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#14 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#15 \/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#16 \/var\/www\/localhost\/htdocs\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(63): Sabre\\DAV\\Server->exec()\n#17 \/var\/www\/localhost\/htdocs\/owncloud\/remote.php(165): require_once('\/var\/www\/localh...')\n#18 {main}","File":"\/var\/www\/localhost\/htdocs\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":71,"User":"ch_scherrer"}"}
{"reqId":"WV6K6H8AAAEAAEmljB8AAABO","level":3,"time":"2017-07-06T19:09:28+00:00","remoteAddr":"10.0.0.13","user":"my_user","app":"PHP","method":"PROPFIND","url":"/oc/remote.php/webdav/","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/localhost/htdocs/owncloud/lib/composer/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18"}

Activity

  1. DeepDiver1975 commented on Jul 6, 2017

    @DeepDiver1975
    Contributor

    :"An exception occurred while executing 'SELECT * FROM oc_properties WHERE fileid IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND propertyname in (?, ?) ORDER BY propertyname' with params [1152106, 1487506, 7649, 1487234, 7653, 72, 7651, 1051770, 7652, 715226, 1469155, 1152226, 1318322, 7650, "{DAV:}creationdate", "{DAV:}displayname"]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'fileid' in 'where

    looks like a migration was not properly executed - who took care of this? @VicDeo

  2. VicDeo commented on Jul 7, 2017

    @VicDeo
    Contributor

    @chscherrer please post output for php occ migrations:status dav

  3. chscherrer commented on Jul 7, 2017

    @chscherrer
    Author

    the command php occ migrations:status dav

    Gives:

    The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
    ownCloud is in maintenance mode - no app have been loaded

    App: dav
    Version Table Name: oc_migrations
    Migrations Namespace: OCA\dav\Migrations
    Migrations Directory: /var/www/localhost/htdocs/owncloud/apps/dav/appinfo/Migrations
    Previous Version: 20170202220512
    Current Version: 20170427182800
    Next Version: Already at latest migration step
    Latest Version: 20170427182800
    Executed Migrations: 5
    Executed Unavailable Migrations: 5
    Available Migrations: 5
    New Migrations: 5

    I am aware of the maintenance mode, this I had to do after owncloud app doesn't work anymore ....

  4. VicDeo commented on Jul 7, 2017

    @VicDeo
    Contributor

    @chscherrer could you please show oc_properties table structure with the following MySQL query:
    describe oc_properties;

  5. chscherrer commented on Jul 8, 2017

    @chscherrer
    Author

    describe oc_properties; gives

    +---------------+--------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +---------------+--------------+------+-----+---------+----------------+
    | id | int(11) | NO | PRI | NULL | auto_increment |
    | userid | varchar(64) | NO | MUL | | |
    | propertypath | varchar(255) | NO | | | |
    | propertyname | varchar(255) | NO | | | |
    | propertyvalue | varchar(255) | NO | | NULL | |
    +---------------+--------------+------+-----+---------+----------------+
    5 rows in set (0.00 sec)

  6. sb-2017 commented on Aug 22, 2017

    @sb-2017

    Hello together,

    i have the error in my logfiles, but in my environment i get an error when i delete file in the webclient.
    message":"Exception: {"Message":"An exception occurred while executing 'DELETE FROM oc_properties WHERE fileid = ?' with params [null]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'fileid' in 'where clause'","Exception":

    I have output like you with php occ migrations:status dav and describe oc_properties;
    Can you tell which file i need to modify to delete that request?

    Thanks for help.
    sb-2017

  7. VicDeo commented on Aug 23, 2017

    @VicDeo
    Contributor

    @sb-2017 @chscherrer You need to replay migrations for the dav app starting from 20170116170538
    I can't say how to do it properly right away

  8. sb-2017 commented on Aug 24, 2017

    @sb-2017

    Hello together,

    i have the error in my logfiles, but in my environment i get an error when i delete file in the webclient.
    message":"Exception: {"Message":"An exception occurred while executing 'DELETE FROM oc_properties WHERE fileid = ?' with params [null]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'fileid' in 'where clause'","Exception":

    I have output like you with php occ migrations:status dav and describe oc_properties;
    Can you tell which file i need to modify to delete that request?

    Thanks for help.
    sb-2017

  9. sb-2017 commented on Aug 24, 2017

    @sb-2017

    Hello togehter,

    thanks for help and with the id and could solve the issue.
    Source: https://doc.owncloud.org/server/10.0/developer_manual/app/schema.html
    Command: ./occ migrations:execute dav 20161130090952
    All version IDs are placed in the installion folder (owncloud\apps\dav\appinfo\Migrations).

    Kind regards,
    sb-2017

  10. PVince81 commented on Sep 7, 2017

    @PVince81
    Contributor

    I'm closing this. But it's strange that you were able to skip migrations.

    Referencing another ticket where it happened on another migration: #28285

    cc @tomneedham

  11. lock commented on Aug 1, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  12. locked as resolved and limited conversation to collaborators on Aug 1, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions