-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Update from OC5.0.13 to OC6RC4 - Base table or view not found: 1146 Table 'owncloud.oc_jobs' doesn't exist #6294
Comments
@bartv2 oc_jobs reminds me of you again 😉 - please comment on this - THX |
related? #6298 |
I ran into the same issue and its not related |
quick fix for people upgrading and stuck, excecute this for mysql database setups:
use DATABASE_NAME; CREATE TABLE oc_jobs (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
class VARCHAR(255) NOT NULL,
argument VARCHAR(255) NOT NULL,
last_run INT
); |
also confirmed for sqlite btw, added the tags. Did not test the other dbs but most likely same result |
With SQLite add the table with the following statement: CREATE TABLE "oc_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "class" VARCHAR(255) NOT NULL, "argument" VARCHAR(255) NOT NULL, "last_run" INTEGER); Edit the config.php and set version number back to 5.0.13 to get the update screen again. (suggested in #6190 (comment)) Click refresh, it will update the database. |
duplicate of #6330 |
I suspect this might be related to the table prefix. Will confirm that soon. |
I can confirm that I have two config files that, when setting installed to false, one causes our issue, the other one doesn't. Here comes the broken one:
And here is the working one:
|
Now starting with the broken config, tested this: Could you guys verify your config.php and check whether you also have those extra "db" fields ? |
It's getting ridiculous. I tried each like 5+ times. So now it seems the only difference between "ok" config and "broken->fixed" config is the order of the config fields. I'll try changing those... Here are the databases from each case: It could be a race condition... |
Ok, now I've aligned the "ok" config with the "broken->fixed" config (removed the "db" fields except "dbtype"). OUCH, still fails. |
Whaaaaa !? I removed the "oc" in the front of the "instanceid" in the broken config, and now the migration works! |
Removing the "oc" at the time where the error message appears is already too late... Probably need to debug in the code where instance id is used and see what's going on. |
When I clear the cache between every test I can get consistent results: When "oc" is set, the DB creation time seems to be longer. |
Interesting, I've done the following:
It works, regardless of whether the instanceid has a "oc" prefix. If I don't log out but only clear the cache by being in the files view, refreshing the browser page will make it fail, as the URL is "index.php/files/". Maybe it requires me to open the "index.php" to make it work instead ? Could there be any remaining value in the session that messes up with the upgrade !? |
Ignore everything I've written before, just found out something: Do not use "http://localhost/owncloudtest/index.php/apps/files" or any other path when upgrading. If I manually go to "index.php" after getting the error, I get the login page and ownCloud works. @hdering @Raydiation @eMerzh what is the URL appearing in your browser bar when you got the error ? I suspect that some apps might be trying to accessing things when they see "apps/files" in the URL which can't work before the migration is complete. |
I tried now to reproduce the failure but in my test area it works (VM). In my test area I get only follow errors (but the update procedure worked. he said database was correct and he switched me to the login page): |
@hdering what URL did you open when doing the upgrade ? This is important. |
Problems also occurs on another machine, with MySQL instead of SQlite. |
@PVince81 I opened http://192.168.188.25 without index.php |
When running a successful upgrade, the oc_jobs error is still there. The error itself is misleading and let people believe that it's the cause but it's not. By reading this code it seems to be expected for oc_jobs calls to fail on upgrade: in lib/base.php: public static function registerCacheHooks() {
if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup
// register cache cleanup jobs
try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
\OCP\BackgroundJob::registerJob('OC\Cache\FileGlobalGC');
} catch (Exception $e) {
} |
I am very sure that I have entered directly index.php on my production system. Maybe it has to do something with the open session? What is even more different to productive sytem und test system:
|
@hdering thanks for the info. |
@hdering can you try setting forcessl = true on your test system, just to make sure it's not related ? |
:-) |
It seems the OC.webroot is only wrong on the update page. |
Here it is: |
Fix for webroot in above PR. I'll see whether we can prevent the CC @icewind1991 who seem to have written that part. |
@PVince81 If you give me a new version of oc6 I can test it directly :) |
#6392 prevents the |
I'm glad to hear this bug has been tracked down, I see how tedious this was. |
@fmjrey have you tried just manually opening the "index.php" (not the files app) URL to complete the migration ? |
Yes, closing. |
I just encountered this error again while upgrading from 5.0.13 to 6.0.0.14. Maybe still open? |
@MoriTanosuke can you please give more details ? |
Same here. Just got
while trying to upgrade to 6.0.0a :( Update: Even after try to work-around this by manually creating the oc_jobs table, the next error I get is
...and last update for tonight: I realized that I didn't update to the latest 5x relese. SO I upgraded to 5.0.14a, which went smooth. Then, again try to upgrade to 6.0.0a, and this time:
Let me know if I can provide any futher information. I would be happy for any hint to upgrade my installation to OC6. (also see http://forum.owncloud.org/viewtopic.php?f=26&t=18497) |
@madMarkus I see you're using Ubuntu 10.04, I wonder whether it's related. i'll have a try on Ubuntu 13.10 with Postgres 9.1, upgrading from 5.0.14 to 6.0.0a. |
@bantu any idea about the above SQL syntax error and Postgresql version ? |
@PVince81 Yes. IF EXISTS is not valid 8.4 syntax. Compare http://www.postgresql.org/docs/9.0/static/sql-altertable.html to http://www.postgresql.org/docs/8.4/static/sql-altertable.html |
Ok thanks @bantu |
@PVince81 That would probably be a valid solution. Not sure whether PostgreSQL 8.4 support is that big of a goal. @karlitschek |
I've just tested migrating from OC 5.0.14a to OC 6.0.0a on Ubuntu 13.10 with PostgreSQL 9.1 with a few test data and it works fine with that version. |
@bantu Unfortunately I can't answer that. Does someone know how common 8.4 is? |
Here are some data points: |
Fedora 18 has 9.2 |
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. |
hi guys,
update from OC5.0.13 to OC6RC4.
data/owncloud.log
Error core can't remove app files_mv. It is not installed. 2013-12-07T15:08:38+00:00
Error core App "" (files_mv) can't be used because it is not compatible with this version of ownCloud 2013-12-07T15:08:38+00:00
Error core can't remove app files_odfviewer. It is not installed. 2013-12-07T15:08:38+00:00
Error core App "" (files_odfviewer) can't be used because it is not compatible with this version of ownCloud 2013-12-07T15:08:38+00:00
Error core can't remove app admin_migrate. It is not installed. 2013-12-07T15:08:38+00:00
Error core App "" (admin_migrate) can't be used because it is not compatible with this version of ownCloud 2013-12-07T15:08:38+00:00
Error core can't remove app user_migrate. It is not installed. 2013-12-07T15:08:38+00:00
Error core App "" (user_migrate) can't be used because it is not compatible with this version of ownCloud 2013-12-07T15:08:38+00:00
Error core can't remove app files_imageviewer. It is not installed. 2013-12-07T15:08:38+00:00
Error core App "" (files_imageviewer) can't be used because it is not compatible with this version of ownCloud 2013-12-07T15:08:38+00:00
Fatal index Exception: An exception occurred while executing 'SELECT
id
FROMoc_jobs
WHEREclass
= ? ANDargument
= ?': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_jobs' doesn't exist - Verursacht durch: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_jobs' doesn't exist[42S02] 2013-12-07T15:07:59+00:00Fatal index Exception: 11 {main} 2013-12-07T15:07:59+00:00
Fatal index Exception: 10 /var/www/index.php(30): OC::handleRequest() 2013-12-07T15:07:59+00:00
Fatal index Exception: 9 /var/www/lib/base.php(689): OC_App::loadApps() 2013-12-07T15:07:59+00:00
Fatal index Exception: 8 /var/www/lib/private/app.php(66): OC_App::loadApp('files') 2013-12-07T15:07:59+00:00
Fatal index Exception: 7 /var/www/lib/private/app.php(93): require_once('/var/www/apps/f...') 2013-12-07T15:07:59+00:00
Fatal index Exception: 6 /var/www/apps/files/appinfo/app.php(22): OCP\BackgroundJob::addRegularTask('\OC\Files\Cache...', 'checkNext') 2013-12-07T15:07:59+00:00
Fatal index Exception: 5 /var/www/lib/public/backgroundjob.php(86): OCP\BackgroundJob::registerJob('OC\BackgroundJo...', Array) 2013-12-07T15:07:59+00:00
Fatal index Exception: 4 /var/www/lib/public/backgroundjob.php(75): OC\BackgroundJob\JobList->add('OC\BackgroundJo...', Array) 2013-12-07T15:07:59+00:00
Fatal index Exception: 3 /var/www/lib/private/backgroundjob/joblist.php(24): OC\BackgroundJob\JobList->has('OC\BackgroundJo...', Array) 2013-12-07T15:07:59+00:00
Fatal index Exception: 2 /var/www/lib/private/backgroundjob/joblist.php(71): OC_DB_StatementWrapper->execute(Array) 2013-12-07T15:07:59+00:00
Fatal index Exception: 1 /var/www/lib/private/db/statementwrapper.php(70): Doctrine\DBAL\Statement->execute(Array) 2013-12-07T15:07:59+00:00
Fatal index Exception: 0 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(140): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(PDOException), 'SELECT
id
FRO...', Array) 2013-12-07T15:07:59+00:00Fatal index Exception: An exception occurred while executing 'SELECT
id
FROMoc_jobs
WHEREclass
= ? ANDargument
= ?': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_jobs' doesn't exist 2013-12-07T15:07:59+00:00php error log:
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 170, referer: http://192.168.178.32/index.php
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 171, referer: http://192.168.178.32/index.php
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 172, referer: http://192.168.178.32/index.php
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 175, referer: http://192.168.178.32/index.php
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 176, referer: http://192.168.178.32/index.php
[Sat Dec 07 16:08:40 2013] [error] [client 192.168.178.26] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/lib/private/eventsource.php:71) in /var/www/lib/private/user/session.php on line 177, referer: http://192.168.178.32/index.php
hermann
The text was updated successfully, but these errors were encountered: