Failed to update to Nextcloud 15.0.7

Steps to reproduce

  1. Notification came to update to 15.0.7
  2. Clicked on notification and went to settings page
  3. Clicked Open Updater
  4. Clicked Start Update
  5. Went to Web based upgrade
  6. Clicked Start Update again

Expected behaviour

after complite update instance should redricet to home page aka files app.

Actual behaviour

update is stuck and instance throws error Doctrine\DBAL\Schema\SchemaException: There is no table with name '$user.oc_bookmarks_folders_bookmarks' in the schema.

Server configuration

Operating system: Ubuntu Server 16.04 LTS

Web server: Apache

Database: Postgresql

PHP version: 7.0.32

Nextcloud version: 15.0.6

Updated from an older Nextcloud/ownCloud or fresh install: yes

Where did you install Nextcloud from: updater

List of activated apps:

  • accessibility: 1.1.0
  • activity: 2.8.2
  • admin_audit: 1.5.0
  • apporder: 0.6.0
  • bookmarks: 0.16.4
  • calendar: 1.6.4
  • cloud_federation_api: 0.1.0
  • comments: 1.5.0
  • contacts: 3.0.5
  • dav: 1.8.1
  • federatedfilesharing: 1.5.0
  • federation: 1.5.0
  • files: 1.10.0
  • files_pdfviewer: 1.4.0
  • files_sharing: 1.7.0
  • files_texteditor: 2.7.0
  • files_trashbin: 1.5.0
  • files_versions: 1.8.0
  • files_videoplayer: 1.4.0
  • firstrunwizard: 2.4.0
  • gallery: 18.2.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.3.0
  • nextcloud_announcements: 1.4.0
  • notifications: 2.3.0
  • oauth2: 1.3.0
  • password_policy: 1.5.0
  • provisioning_api: 1.5.0
  • serverinfo: 1.5.0
  • support: 1.0.0
  • survey_client: 1.3.0
  • systemtags: 1.5.0
  • theming: 1.6.0
  • twofactor_backupcodes: 1.4.1
  • twofactor_gateway: 0.13.0
  • twofactor_nextcloud_notification: 1.1.1
  • twofactor_totp: 2.1.2
  • updatenotification: 1.5.0
  • workflowengine: 1.5.0

Nextcloud configuration:

{
“system”: {
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“domain.tld”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“overwrite.cli.url”: “https://domain.tld/nextcloud”,
“htaccess.RewriteBase”: “/nextcloud”,
“dbtype”: “pgsql”,
“version”: “15.0.7.0”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“theme”: “”,
“maintenance”: false,
“updater.release.channel”: “stable”,
“loglevel”: 2,
“data-fingerprint”: “721025959152534eb13e0b5f23843d97”,
“updater.secret”: “REMOVED SENSITIVE VALUE
}
}

Are you using encryption: no

Client configuration

Browser: Google Chrome 73.0.3683.86
Operating system: Ubuntu 16.04 LTS

Logs

Web server error log

[date time] [core:notice] [pid 13399] AH00094: Command line: ‘/usr/sbin/apache2’
[date time] [:error] [pid 13402] [client ip:57760] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “localhost” (::1) and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host “localhost” (127.0.0.1) and accepting\n\tTCP/IP connections on port 5432? in /path/to/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 date time/nextc in /path/to/nextcloud/lib/private/DB/Connection.php on line 64
[date time] [:error] [pid 13402] [client ip:57760] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “localhost” (::1) and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host “localhost” (127.0.0.1) and accepting\n\tTCP/IP connections on port 5432? in /path/to/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 date time/nextc in /path/to/nextcloud/lib/private/DB/Connection.php on line 64
[date time] [:error] [pid 13402] [client ip:57760] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “localhost” (::1) and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host “localhost” (127.0.0.1) and accepting\n\tTCP/IP connections on port 5432? in /path/to/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 date time/nextc in /path/to/nextcloud/lib/private/DB/Connection.php on line 64
[date time] [:error] [pid 13402] [client ip:57760] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “localhost” (::1) and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host “localhost” (127.0.0.1) and accepting\n\tTCP/IP connections on port 5432? in /path/to/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 date time/nextc in /path/to/nextcloud/lib/private/DB/Connection.php on line 64

Nextcloud log (data/nextcloud.log)

{“reqId”:“RfPTv8RQokReATZP4X7e”,“level”:3,“time”:“date tme”,“remoteAddr”:“ip”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/core/ajax/update.php?requesttoken=9SkGBgDk4eNOGOvP6CjLnYAWg4j14Sxx5L8yVx9%2FYvA%3D%3Alm9MQy%2FLrJQnW722vH%2Bo2eFl4uObq0Va0eoBYnA9CqQ%3D",“message”:{“Exception”:“Doctrine\DBAL\Schema\SchemaException”,“Message”:“There is no table with name ‘user.oc_bookmarks_folders_bookmarks’ in the schema.”,“Code”:10,“Trace”:[{“file”:"/path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php",“line”:197,“function”:“tableDoesNotExist”,“class”:“Doctrine\DBAL\Schema\SchemaException”,“type”:"::",“args”:[“user.oc_bookmarks_folders_bookmarks”]},{“file”:"/path/to/nextcloud/lib/private/DB/SchemaWrapper.php",“line”:92,“function”:“getTable”,“class”:“Doctrine\DBAL\Schema\Schema”,“type”:"->",“args”:[“user.oc_bookmarks_folders_bookmarks”]},{“file”:"/path/to/nextcloud/apps/bookmarks/lib/Migration/Version000016005Date20190402094721.php",“line”:36,“function”:“getTable”,“class”:“OC\DB\SchemaWrapper”,“type”:"->",“args”:[“bookmarks_folders_bookmarks”]},{“file”:"/path/to/nextcloud/lib/private/DB/MigrationService.php",“line”:456,“function”:“changeSchema”,“class”:“OCA\Bookmarks\Migration\Version000016005Date20190402094721”,“type”:"->",“args”:[{“class”:“OC\Migration\SimpleOutput”},{“class”:“Closure”},{“tablePrefix”:“oc_”}]},{“file”:"/path/to/nextcloud/lib/private/DB/MigrationService.php",“line”:392,“function”:“executeStep”,“class”:“OC\DB\MigrationService”,“type”:"->",“args”:[“000016005Date20190402094721”,false]},{“file”:"/path/to/nextcloud/lib/private/legacy/app.php",“line”:900,“function”:“migrate”,“class”:“OC\DB\MigrationService”,“type”:"->",“args”:[]},{“file”:"/path/to/nextcloud/lib/private/Updater.php",“line”:365,“function”:“updateApp”,“class”:“OC_App”,“type”:"::",“args”:["*** sensitive parameters replaced ***"]},{“file”:"/path/to/nextcloud/lib/private/Updater.php",“line”:245,“function”:“doAppUpgrade”,“class”:“OC\Updater”,“type”:"->",“args”:[]},{“file”:"/path/to/nextcloud/lib/private/Updater.php",“line”:121,“function”:“doUpgrade”,“class”:“OC\Updater”,“type”:"->",“args”:[“15.0.7.0”,“15.0.7.0”]},{“file”:"/path/to/nextcloud/core/ajax/update.php",“line”:212,“function”:“upgrade”,“class”:“OC\Updater”,“type”:"->",“args”:[]}],“File”:"/path/to/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php",“Line”:43,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36”,“version”:“15.0.7.0”}

I think the web servers log file gives you an explanation for the problem. A connection to your PostgreSQL database on host localhostcouldn’t be established, neither via IPv6 nor via IPv4. Make sure that Nextcloud is allowed to connect to the database on the loopback interface or try to change the connection to another network device.

hi @j-ed, I just checked that PostgreSQL is running at 127.0.0.1:5432 and can be connected using the user credential provided on the Nextcloud config.php page.

I can’t understad the error thrown in web interface that says:

Doctrine\DBAL\Schema\SchemaException: There is no table with name '$user.oc_bookmarks_folders_bookmarks' in the schema

I am assuming is means it can’t find a table for the bookmark app. can anyone tell me if I can create all the bookmark app tabels from schema?

I don’t know how you’ve tested the database access but you have to make sure that the user under which the web server is running, e.g. www-data, is allowed to access the database too.

The given message indeed says that the required database table couldn’t be found. Have you logged into your database and checked if any oc_bookmarks* tables exist and if only the mentioned one is missing?

You can try creating it manually to fix the problem.The missing table has been set-upon my server as follows:

> describe oc_bookmarks_folders_bookmarks;
+-------------+------------+------+-----+---------+-------+
| Field       | Type       | Null | Key | Default | Extra |
+-------------+------------+------+-----+---------+-------+
| folder_id   | bigint(20) | YES  |     | NULL    |       |
| bookmark_id | bigint(20) | YES  | MUL | NULL    |       |
| index       | bigint(20) | NO   |     | 0       |       |
+-------------+------------+------+-----+---------+-------+

I tried to access the database from terminal with psql command with the user credential that I provided in the config.php and it worked ok and www-data is allowed to access the database.

that’s the thing. Unfortunately I can’t find any table related to bookmarks app. All the table are somehow lost. :frowning:.

UPDATE: as I said on my previous post I am missing all the tables form my bookmarks app. I decided to remove the bookmarks app using occ and Nextcloud is up and running :partying_face: :tada:

1 Like