Hosted upgrade from 8.2.10 -> 9.0.8 failed - what to do?

Without any matching error in your owncloud.og to the "An error occured" in the first screenshot its not possible to help here. The entry you had posted doesn't say something about any error so normally it should continue now.

Well, thanks for trying. I can assure you it is not working, otherwise I would not waste your time here.

The only alternative I see right now is to manually recreate user accounts, copy data and hope I am not missing anything, in order to upgrade to the latest version?

Just have missed the following in your initial post:

Most likely you're issue is caused by this. You can't move the data directory after the installation, especially on older versions of ownCloud (there where a lot of hardcoded stuff in the database).

So your best change is probably to revert your change to a clean / working state before you did the move of the data directory (revert to your 8.2.0 backup including the database backup). And then start again with the upgrade by:

  1. Removing all files and folders except /data/ and /config/
  2. Extract the 8.2.10 archive into your installation folder
  3. Run the upgrade routine

Then redo this steps for 9.0.8 and 9.1.4 and you should get a working state.

1 Like

OK, will try that. The problem is that my data directory is almost 1GB of files, so it's hard to copy/make backups.
When and what is the correct procedure to move the data folder outside of the owncloud installation then? And is there also a way to change the database engine from Sqlite to MySQL?

Thanks!

On recent versions like 9.1.4 it might work by following the documentation in [1]. This needs manual modifications within the database to make it work.

Yes, as shown in the documentation [2]. But only if you have access to the command line.

[1] https://doc.owncloud.org/server/10.0/admin_manual/maintenance/manually-moving-data-folders.html

[2] https://doc.owncloud.org/server/latest/admin_manual/configuration_database/db_conversion.html

OK, next round of problems (astonishing how difficult it is to upgrade this software...):

I did as you suggested, and restored my old, working installation of oC 8.2.0.

Next, I deleted everything but the config and the data folder (now back again inside the owncloud install folder) and copied all the files from a fresh copy of oC 8.2.10 into the same folder. Opened the main oC page, did the upgrade (with "some warnings") and had a working install of 8.2.10, similar to my previous attempt above.

Next, I unzipped a fresh copy of oC 9.0.8. Since I don't trust that version yet (see above), I did not delete my brand new, working installation of 8.2.10, but rather renamed the folder of 8.2.10, then named the folder containing 9.0.8 to my main oC folder name, and then copied the config and data folder from the 8.2.10 installation over into the 9.0.8 folder.
Got the upgrade screen and ran the update, again with an error message at the end:

There are also some entries in the owncloud.log file (now correctly placed inside of data). Since I am not allow to upload the file as attachment, I'll try in the next post.

A reload just brings up the maintenance screen, as before. Manually editing config.php to get out of maintenance as suggested before just re-runs all of this and I end up with the same error again.

Here's the anonymized end of owncloud.log (still cannot upload the file, so I'll copy-paste it in here, apologies for the mess):

{"reqId":"XXX1","remoteAddr":"111.222.333.444","app":"core","message":"starting upgrade from 8.2.0.12 to 8.2.10.2","level":0,"time":"2017-03-18T20:16:26+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=Q1"}
{"reqId":"XXX1","remoteAddr":"111.222.333.444","app":"no app in context","message":"Exception: {\"Exception\":\"Symfony\\\\Component\\\\Routing\\\\Exception\\\\RouteNotFoundException\",\"Message\":\"Unable to generate a URL for the named route \\\"calendar_index\\\" as such route does not exist.\",\"Code\":0,\"Trace\":\"#0 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/route\\\/router.php(325): Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator->generate('calendar_index', Array, false)\\n#1 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/urlgenerator.php(65): OC\\\\Route\\\\Router->generate('calendar_index', Array)\\n#2 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/helper.php(66): OC\\\\URLGenerator->linkToRoute('calendar_index', Array)\\n#3 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/public\\\/util.php(301): OC_Helper::linkToRoute('calendar_index', Array)\\n#4 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/apps\\\/calendar\\\/appinfo\\\/app.php(25): OCP\\\\Util::linkToRoute('calendar_index')\\n#5 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(160): require_once('\\\/homepages\\\/YY\\\/d...')\\n#6 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(141): OC_App::requireAppFile('calendar')\\n#7 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(1171): OC_App::loadApp('calendar', false)\\n#8 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/installer.php(222): OC_App::updateApp('calendar')\\n#9 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/installer.php(252): OC_Installer::updateApp(Array)\\n#10 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(506): OC_Installer::updateAppByOCSId('168707')\\n#11 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(320): OC\\\\Updater->upgradeAppStoreApps(Array)\\n#12 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(202): OC\\\\Updater->doUpgrade('8.2.10.2', '8.2.0.12')\\n#13 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/core\\\/ajax\\\/update.php(111): OC\\\\Updater->upgrade()\\n#14 {main}\",\"File\":\"\\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/3rdparty\\\/symfony\\\/routing\\\/Symfony\\\/Component\\\/Routing\\\/Generator\\\/UrlGenerator.php\",\"Line\":134}","level":3,"time":"2017-03-18T20:16:31+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=KK%LL"}
{"reqId":"XXX1","remoteAddr":"111.222.333.444","app":"no app in context","message":"Exception: {\"Exception\":\"Symfony\\\\Component\\\\Routing\\\\Exception\\\\RouteNotFoundException\",\"Message\":\"Unable to generate a URL for the named route \\\"contacts_index\\\" as such route does not exist.\",\"Code\":0,\"Trace\":\"#0 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/route\\\/router.php(325): Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator->generate('contacts_index', Array, false)\\n#1 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/urlgenerator.php(65): OC\\\\Route\\\\Router->generate('contacts_index', Array)\\n#2 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/helper.php(66): OC\\\\URLGenerator->linkToRoute('contacts_index', Array)\\n#3 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/public\\\/util.php(301): OC_Helper::linkToRoute('contacts_index', Array)\\n#4 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/apps\\\/contacts\\\/appinfo\\\/app.php(18): OCP\\\\Util::linkToRoute('contacts_index')\\n#5 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(160): require_once('\\\/homepages\\\/YY\\\/d...')\\n#6 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(141): OC_App::requireAppFile('contacts')\\n#7 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(1171): OC_App::loadApp('contacts', false)\\n#8 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/installer.php(222): OC_App::updateApp('contacts')\\n#9 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/installer.php(252): OC_Installer::updateApp(Array)\\n#10 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(506): OC_Installer::updateAppByOCSId('168708')\\n#11 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(320): OC\\\\Updater->upgradeAppStoreApps(Array)\\n#12 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/updater.php(202): OC\\\\Updater->doUpgrade('8.2.10.2', '8.2.0.12')\\n#13 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/core\\\/ajax\\\/update.php(111): OC\\\\Updater->upgrade()\\n#14 {main}\",\"File\":\"\\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/3rdparty\\\/symfony\\\/routing\\\/Symfony\\\/Component\\\/Routing\\\/Generator\\\/UrlGenerator.php\",\"Line\":134}","level":3,"time":"2017-03-18T20:16:36+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=KK%LL"}
{"reqId":"XXX2","remoteAddr":"111.222.333.444","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php(117): OC_App::loadApp('files')\\n#1 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/util.php(142): OC_App::loadApps(Array)\\n#2 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/base.php(906): OC_Util::setupFS()\\n#3 \\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/index.php(47): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/homepages\\\/YY\\\/UU\\\/htdocs\\\/oc\\\/lib\\\/private\\\/app.php\",\"Line\":142}","level":3,"time":"2017-03-18T20:29:08+00:00","method":"GET","url":"\/oc\/index.php\/core\/js\/oc.js?v=OO","user":"--"}
{"reqId":"XXX3","remoteAddr":"111.222.333.444","app":"core","message":"starting upgrade from 8.2.10.2 to 9.0.8.2","level":0,"time":"2017-03-18T20:29:14+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=BBBB","user":"--"}
{"reqId":"XXX3","remoteAddr":"111.222.333.444","app":"core","message":"No update found at the ownCloud appstore for app 166054","level":0,"time":"2017-03-18T20:29:17+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=BBBB","user":"--"}

I hope someone can make anything out of this?

Possible that the update script runs too long and gets a timeout? Your provider doesn't give you any error logs (in some folder or their own interface)?

I do get PHP error logs, which do not contain anything at the moment.
What makes you think there is a timeout?

Also note that the upgrade from 8.2.0 to 8.2.10 worked just fine.

If you change the structure of a table and this table contains a lot of lines, this can take very long and many providers have set a timeout which might be shorter. However I'm wondering because it is happening for the additional apps. Do you use the news app? Any very large tables? How large is your total database?

I am not aware of any special apps I installed. Nor do I know anything about large tables in my ownCloud installation. I am using it mostly to store files in the private cloud.

How can I find out the size of my database? My oC install is using Sqlite if that matters, and the data folder has a total size of about 500 MB (now that I have purged some deleted files etc.)

Edit: owncloud.db is 1.3MB if that is of any help?

Edit2: Now this board won't allow me another post for the next 15 hours... go figure!!

So, I have basically spent the entire day today trying to upgrade my existing oC installation.
Although I did not get anywhere really (the upgrade to 8.2.10 was already working before I posted here) I'd like to thank @kljhlkhglklfgh and @tflidd very much for their support!

Maybe I can get this still to work, but for today I am done (and sobered by the amount of work needed for such a standard operation as upgrading to a newer version). I realize that a hosted server without shell access isn't the best environment for these things but from the success I had with oC in the past, I would not have expected this to be so much effort...

For me it seems to be a reasonable size. Sqlite performance is not great but your setup should be sufficiently small that it should handle such upgrades. @PVince81

You can still migrate the setup to a local virtual machine, run the upgrade and then migrate back. But that's not a very simple procedure (except if you are a Linux expert, this shouldn't be very difficult)... But in this case you can't complain if people say that OC upgrades are difficult.

From the screenshot it looks like the update already went through, but the error happened during or after the integrity check. While the error itself might be caused by a timeout, the update should be able to rerun without touching the tables if you run it again (possibly after removing the maintenance mode flag).

Is there any new log entry appearing from the time of the rerun ?

I just tried again to re-run the upgrade by setting the maintenance flag in config.php to false, but I again get the very same result: First the entry screen with the Upgrade button, followed by this page:

The only entry in the log file after this is:
{"reqId":"XXX","remoteAddr":"111.222.333.444","app":"core","message":"starting upgrade from 8.2.10.2 to 9.0.8.2","level":0,"time":"2017-03-20T08:57:18+00:00","method":"GET","url":"\/oc\/core\/ajax\/update.php?requesttoken=YYY","user":"--"}

So, what to do with this?

I tested the update locally and it worked fine. I saw that after "Starting code integrity check" there's another message "Finished code integrity check" that must appear. So it is clear that something is going wrong during the integrity check on your instance. Maybe some SSL libraries are not up to date.

Do you have access to the web server error log ? Maybe there is another clue there ?

Else we might need to disable integrity check by hacking the PHP code...

Unfortunately not. I am using a webhoster that gives me access to the PHP error logs (which show no error) but not the web server logs...

The upgrade seems to run pretty fast on re-running it, only the integrity check runs for maybe a minute before that generic error message appears.

Happy to hack something, since this is all just to get upgraded to the very latest version (provided I don't have to hack all the way?)

You say it runs for a whole minute ? It might be that your hoster has limited PHP timeouts to be one minute so the call probably times out.

You can trick OC to not run the integrity check by editing version.php and setting the OC_Channel to "git". Then run the update page again. Then don't forget to set the channel to its original value ! (if you don't, you won't see further automatic updates)

1 Like

That did the trick, thank you very much!!

Regarding the timeout (if that is the problem), isn't there any way to report this to the log or otherwise?
FWIW, I checked my server's PHP setting, and it says 'max_execution_time 50000' - that is 50k seconds, that should be plenty, no?

And: is there a way to be more verbose in the log file, to see what steps the Integrity Check does and where it fails?

Thanks again, now I am on 9.0.8 - on to upgrading to the latest version... :wink:

Sigh. Same thing with the upgrade from 9.0.8 -> 9.1.4:
All upgrading seems to be working fine, until the integrity check kicks in. This takes maybe 2 minutes, just to produce an 'An error occurred' message.

The last few lines of the detailed log on the upgrade page are:

[1 / 4]: Repair unmerged shares
[2 / 4]: Repair unmerged shares
[3 / 4]: Repair unmerged shares
[4 / 4]: Repair unmerged shares
[4 / 4]: Repair unmerged shares
Starting code integrity check
An error occurred.

I guess I'll do the OC_Channel trick again, but something isn't right here...

Hi, I had the same problem, I did the OC-channel trick and the upgrade to 9.0.8 worked fine. I changed the channel to stable again, but don't get the possibility to update to 9.1.4 via updater.

In the administration mode I get Error-messages regarding the file integrity, all files of the _oc-upgrade/tmp folder.

error log

Anything I can do?

Thank you in advance!