-
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 10.0.8.5 to 10.1.0 failed on shared hoster #34598
Comments
GitMate.io thinks the contributors most likely able to help are @ownclouders, and @PVince81. Possibly related issues are #18350 (DB-Schema update fails, 8.1.0 to 8.1.1), #17768 ( 8.1.0 update Failed), #18032 (massive/strange db updates after upgrade to 8.1.0), #14677 (Upgrade failing 7.0.5 to 8.0.1 when keeping apps folder), and #4857 (Updater fails to update to 5.0.11 (unable to move ...)). |
Unfortunately those links are not helpful for me. |
I tried again to solve this part of the issue:
Since I do not know what I'm doing, its hard for me to figure out how to adapt the instructions for my situation. Any command I try with Putty gives me the same error back. For example:
Result:
The only expression I could find with help is -u, but this did not help. How can I update market and why do I have to update it anyway, since the apps are all contained in the new version? |
hmm this was observed before but could not be reproduced: #33963 it failed on the same table, so there's likely something that was similar in your env compared to that other env |
from what I see there was an error before the migration even ran:
It looks like your user has no permissions to create foreign keys From what I see you re-started the failed upgrade a second time:
So the first upgrade did create the table but failed due to the permissions issue. Likely you are running OC on a shared hoster ? And the second run tried to recreate the failed table. Normally to retry an upgrade one needs to restore from backup to have the former database state. @DeepDiver1975 seems that migrations aren't atomic ? I'd expect the migration to roll back all operations (structure changes) that were done within the migration if one of the operations fail. We could try and mitigate this by adding a table existence check. However this wouldn't solve the foreign key issue. |
You*ve got the point of my real problem. I could fix the error messages stated above by activating market apps and deleting web143_db3.oc_persistent_locks by shell, but now I'm stuck at:
This is obviously the external key problem. And I have no idea what you are talking about. |
@Pingponguin did you install your ownCloud on a shared web hoster or on a local machine where you have root / admin access ? many things in your report seem to give hints that this might be a shared hoster. otherwise if you have admin access for the whole database server you should grant the "web143_db3" all privileges. |
@PVince81 I'm on a shared web hoster. I read about the foreign key constraint and understand the problem in general, but not really why being with a shared hoster is a problem. Is my oc installation and all the data lost now? |
@Pingponguin
The data is preserved on the server - the database we will work towards finding a solution |
I have lost the content of table oc_filecache. I emptied it because of its size, but when I tried to restore the backup was corrupt. I hope this is not an additional problem. |
@Pingponguin or check if it is possible on your own via cPanel https://www.youtube.com/watch?v=lXnvDD9j6Hs |
also could be related to the different engines used for these two tables, like in #34572
From here https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html |
Sorry for late reply but this issue really made me upset and I needed a break. My hoster just said that he is not familiar with OC and I can use these commands for update:
Of course this did not work. I tried a new installation with OC 10.1.1. and copied config.php and /data to it, but still I get the error:
|
Since my issue has referenced to other threads with the same issue I assume that owncloud cannot be run safely on a hosted server. At least not by noobs like me. The update process was from the beginning on a challange, never knowing if it will work or not. Now my installation is broken and lost. Since there are no alternatives to owncloud I will have to go back to dropbox or what ever. |
Any updates? I still have the same error when i upgrade to version 10.2.1.
|
Any updates? I have the same error, which is fact is happening in two steps. First time you launch the occ upgrade, I have the error Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_persistent_locks ADD CONSTRAINT FK_F0C3D55B93CB796C FOREIGN KEY (file_id) REFERENCES oc_filecache (fileid) ON DELETE CASCADE': SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint Then if you relaunch, the table is already created Doctrine\DBAL\Schema\SchemaException: The table with name 'cloud.oc_persistent_locks' already exists. Manually deleting the table persistent_lock is not solving the problem, and the upgrade can not be made |
I did it! The user of the owncloud MySQL database does not have |
yep. #34598 (comment) |
For me it does not work |
Fighting with the same issue on a different setup. The system is self hosted in Docker containers First run of
Next upgrade run shows
Deleting the table and manipulate this migration file by changing 'unsigned' => true to 'unsigned' => false in the following section.
makes the upgrade work nicely however I can not foresee the side-effects of this change. Can all of this being avoided if migrations are applied from version to versison (i.e 10.0 -> 10.1 -> 10.2 -> 10.3 -> 10.4)? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed. |
Hello, OC is really giving me a hard time every time I try to update it. It would really be a great step forward if update process could be noob-safe.
I found my actual update errors in similar ways on the net, but could not figure out how to solve them in my case. Can anybody help? Thanks and regards, Pingpong
owncloud_log.zip
Steps to reproduce
Expected behaviour
Update my oc to 10.1.0
Actual behaviour
Update failed and gives error message:
Server configuration
Operating system:
unknown
Web server:
Apache
Database:
MYSQL
PHP version:
7.2
ownCloud version: (see ownCloud admin page)
10.0.8.5
Where did you install ownCloud from:
https://owncloud.org/download/
The content of config/config.php:
Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
not possible
List of activated apps:
non
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
don't know
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Client configuration
Browser
Vivaldi 2.3.1440.48
Operating system:
Win 10 Pro 1809
Logs
Web server error log
ownCloud log (data/owncloud.log)
see attached file owncloud_log.zip
The text was updated successfully, but these errors were encountered: