Skip to content
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

error updating 9.1.5 to 10.0.1 #28041

Closed
stephengraf opened this issue May 30, 2017 · 13 comments
Closed

error updating 9.1.5 to 10.0.1 #28041

stephengraf opened this issue May 30, 2017 · 13 comments

Comments

@stephengraf
Copy link

stephengraf commented May 30, 2017

I was testing the update on my production test system and to my surprise, the manual procedure that I have used so many times failed. I then set up a minimal test system to diagnose as there was little info to go on.

Steps to reproduce

  1. Loaded a minimal 9.1.4 system.
  2. Updated successfully to 9.1.5.
  3. Tried to update to 10.0.1 and failed.

Expected behaviour

Expected the update to 10.0.1 to be successful as was the update to 9.1.5.

Actual behaviour

When the update was started on the web, the page indicated that only dav was going to be updated. Note that the logs showed that the php script for this page did not finish properly. When I clicked on start update, a few seconds transpired and an error message was presented. When I clicked to see the detailed logs all that was presented is "An error occurred." There were no additional entires in any logs.

Server configuration

OpenBSD 6.1

httpd in chroot

sqlite3

php 5.6

Started with fresh install of 9.1.4.
Updated successfully to 9.1.5.
Failed update to 10.0.1.

Downloaded all versions from owncloud.org.

Going back to working 9.1.5 the integriy check reported:
No errors have been found.

config_report_20170530.txt

Only the apps on the basic install were included.

Client configuration

Opera

Windows 10

Logs

test console log.txt
after detailed logs
start 10 0 1

ownCloud log (data/owncloud.log)

In test_console log.txt.

There was nothing reported in the web server error log or the php log.

@andreaphsz
Copy link

same for me :-(

@PVince81
Copy link
Contributor

The screenshot displays the Nextcloud logo. Did you update from a Nextcloud instance ?

How did you upgrade ? Did you properly delete all the old source code ?

@webgobe
Copy link

webgobe commented May 31, 2017

Similar setup, upgrade failed with this error message:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TABLE oc_account_terms (id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, account_id BIGINT UNSIGNED NOT NULL, term VARCHAR(256) NOT NULL, INDEX account_id_index (account_id), INDEX term_index (term), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

@andreaphsz
Copy link

andreaphsz commented May 31, 2017

I upgraded from owncloud 10.0.0 - where I had fixed missing cols in DB as in #27754

@DeepDiver1975
Copy link
Member

Similar setup, upgrade failed with this error message:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TABLE oc_account_terms (id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, account_id BIGINT UNSIGNED NOT NULL, term VARCHAR(256) NOT NULL, INDEX account_id_index (account_id), INDEX term_index (term), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

we are working on a fix #28019

@stephengraf
Copy link
Author

Sorry about the screen shots. I was doing the same tests with nextcloud with the same results. I also tested going from 10,0,0 to 10.0.1. The 10.0.0 install when fine but the upgrade failed with the same error conditions.
The upgrade procedure is detailed in the console log attached to the original submission. I did a mv from owncloud to owncloud-whatever to get rid of the old code. Then I did a cp of the config.php file and data directory.
When I did the original attempt on my production test system, the environment was mariadb and nginx. The described testing was sqlite and httpd for simplicity.

@stephengraf
Copy link
Author

The am not sure how I got nextcloud logos on owncloud pages. The screen shots were from testing a while ago and I should have recaptured them for this submission. To be sure I redid the test updating from 9.1.5 to 10.0.1 and the pages are correct with the owncloud logos.

I do not understand what the error message in the log is trying to point out. Does anyone have any suggestions as to where to look for more clues?

@andreaphsz
Copy link

andreaphsz commented Jun 1, 2017

owncloud.log says:

{"reqId":"WS@-8SwJdm42TT8Rl-Ug-gAAAAA","level":0,"time":"2017-06-01T09:19:13+02:00","remoteAddr":"xxx.xxx.xxx.xx","user":"--","app":"core","method":"GET","url":"/test/owncloud/core/ajax/update.php?requesttoken=NFsbGQNXHhsxcE5OBHVXFzAdHS8EVktiBCknJQ0wJTI%3D%3An6NkB95UzB6xJD88ynqGP9s%2FEcHmOysEgCLNc8Hm5gI%3D","message":"starting upgrade from 10.0.0.12 to 10.0.2.1"}

for server log see attachment.

bildschirmfoto 2017-06-01 um 09 22 09

@ghost
Copy link

ghost commented Jun 1, 2017

Already reported here: https://central.owncloud.org/t/failed-to-upgrade-to-oc-10-0-1/7915

As I understand the issue, the 'term' field stores too many bytes

  • VARCHAR(256) * 3 > 767 : as mysql uses 3 bytes to store utf8 chars -
    to be used as a key index !?

(255 seems to be ok )

the table definition to be found into 'core/Migrations/Version20170516100103.php'

@andreaphsz
Copy link

my error seems not to be related to #28019. my error is not a "too many bytes" issue.

@andreaphsz
Copy link

neither owncloud.log nor the server log gives me more information about the error. is there a way to debug the code in an easy way?

@stephengraf
Copy link
Author

stephengraf commented Jun 2, 2017

@PVince81
Please disregard the message below. When I reviewed the web log I noticed that many files were pulled from cache (304). After clearing cache the update was successful. There is of course a code integrity error due to the term patch.

I am happy that the patch will solve the issue. Will you close this issue or should I?

Thank you for you help.

I am not sure that the error I am looking at is connected to the term database problem.

I redid the testing starting with base 9.1.5, updated successfully to 9.1.6. I did the update to 10.0.2 with the term patch in place, but encountered the same error as reported previously. See the attached file that has a console log and owncloud and web server logs.

test update with patch.txt

Note that the owncloud error occurs after starting ownclould on the web and before clicking on "Start update".

There are no php or sql errors reported as it would seem owncloud is objecting to something and bails out. The owncloud error message is below. Is it possible to shed some light on what owncloud is objecting to?

``{"reqId":"UsabuwbXWEcRWEZsZsz6","level":3,"time":"2017-06-02T11:22:16-07:00","remoteAddr":"50.92.162.251","user":"--","app":"index","method":"GET","url":"/index.php/core/js/oc.js?v=abb2a004101a24f9a0049f95250752c7","message":"Exception: {"Exception":"OC\\NeedsUpdateException","Message":"","Code":0,"Trace":"#0 \/owncloud\/lib\/private\/legacy\/app.php(121): OC_App::loadApp('dav')\n#1 \/owncloud\/lib\/private\/legacy\/util.php(145): OC_App::loadApps(Array)\n#2 \/owncloud\/lib\/base.php(917): OC_Util::setupFS()\n#3 \/owncloud\/index.php(49): OC::handleRequest()\n#4 {main}","File":"\/owncloud\/lib\/private\/legacy\/app.php","Line":162}"}

@lock
Copy link

lock bot commented Aug 1, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants