Database is locked during 9.0.3 Upgrade

Ask all your questions regarding OC 9.0 Please read the Support Forum Rules
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
rafaeldnbr
Newbie
Posts: 3
Joined: Tue Jul 05, 2016 10:41 pm
ownCloud version: 9.0.2
Webserver: Apache
OS: Linux

Database is locked during 9.0.3 Upgrade

Postby rafaeldnbr » Tue Jul 05, 2016 11:01 pm

I Have a problem here too with 9.0.3 upgrading from 8.2

Code: Select all

root@InuvFileServer:/var/www/owncloud# sudo -u www-data php occ upgrade
ownCloud 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)
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 'INSERT INTO "oc_jobs" ("class", "argument", "last_run") VALUES(?, ?, ?)' with params ["OCA\\Federation\\SyncJob", "null", 0]:

SQLSTATE[HY000]: General error: 5 database is locked
Update failed
Maintenance mode is kept active
Reset log level


When i set the command occ upgrade, the system goes fast for the first steps, the when UPDATED DATABASE shows it takes like 10-15 seconds stopped then give the SQLSTATE error message,

Do you guys have any hint here ?

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Database is locked during 9.0.3 Upgrade

Postby RealRancor » Wed Jul 06, 2016 10:07 am

Hi,

your issue is unrelated to the issue you had posted this so moved it into a new thread.

The "Database is locked" is caused by the usage of SQLite. Try to convert your database to either MySQL or PostgreSQL before running the upgrade:

https://doc.owncloud.org/server/9.0/adm ... rsion.html

This is recommended anyway as you shouldn't use SQLite on a productive system.
*gone*

rafaeldnbr
Newbie
Posts: 3
Joined: Tue Jul 05, 2016 10:41 pm
ownCloud version: 9.0.2
Webserver: Apache
OS: Linux

Re: Database is locked during 9.0.3 Upgrade

Postby rafaeldnbr » Wed Jul 06, 2016 2:41 pm

Thanks Real Rancor.

When i try to create/move to a new DB i got the message:

Code: Select all

root@InuvFileServer:/var/www/owncloud# sudo -u php occ db:convert-type -all-apps mysql oc_mysql_user 127.0.0.1 new_sql_db
sudo: user unknown : php
sudo: not possible init policy plug-in

Translated from pt-br by me.

I was wondering how the php user is unknown, can someone as this noob question to a novice ?

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Database is locked during 9.0.3 Upgrade

Postby RealRancor » Wed Jul 06, 2016 2:50 pm

See the difference between:

Code: Select all

sudo -u www-data php occ upgrade


and

Code: Select all

sudo -u php occ db:convert-type
*gone*

rafaeldnbr
Newbie
Posts: 3
Joined: Tue Jul 05, 2016 10:41 pm
ownCloud version: 9.0.2
Webserver: Apache
OS: Linux

Re: Database is locked during 9.0.3 Upgrade

Postby rafaeldnbr » Wed Jul 06, 2016 3:30 pm

Thanks Again,

Honestly it´s a bit embarassing rsrsrs.

Do you know how i can find my mysql actual database user ? or can i reinstall and let it marked ?

Code: Select all

  [Doctrine\DBAL\DBALException]
  Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'mysql'@'localhost' (using password: YES)


=====================================
Edit, after i reconfigure mysql-server-5.5 i got the new root password then go.

so thats the new output :

Code: Select all

[Doctrine\DBAL\DBALException]
  Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1049] Unknown database 'owncloud_db'


I was trying to create a new db name owncloud on mysql, whitch is fine right ?

Regards


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 9.0”

Who is online

Users browsing this forum: No registered users and 3 guests