-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Updater fails to complete #2737
Comments
Does the webserver has permission to delete /media/ownclouddrive/updater-oc8651su36ek/downloads/nextcloud/apps/comments/l10n ? At first sight it looks like a permission issue, cc @LukasReschke @MorrisJobke for more in depth knowledge about the updater |
I does seem permissions issue but the www-data user has 0770 access so should be able to delete the folder in the script. root@nextcloud:/media/ownclouddrive/updater-oc8651su36ek/downloads/nextcloud/apps/comments#ls -la Files are still on the share per the download programme as I just cp them to the correct location. |
@mentalinc This is the folder |
root@nextcloud:/media/ownclouddrive/updater-oc8651su36ek/downloads/nextcloud/apps/comments# ls -la |
could you give me an
|
The nextcloud config folder and the contents drwxr-x--- 2 www-data www-data 4096 Dec 18 08:39 . and the nextcloud dir Is root being the owner of the nextcloud dir the issue? |
Usually not. We check for the owner of the config.php file. So this looks good. Sadly I have no idea why this folder can't be deleted, because it was previously just created by the very same user (it must be - because this happens in the extract step). |
Is maybe the filesystem full or some SELinux config in place? |
Drive is mapped to an NTFS Server 2016 share per the fstab above File system isn't full df -h |
I had the same issue on a FreeBSD server in the extraction step. Since I don't know the exact file it is failing on, I can't check its permission, how ever the permissions should be ok! This is the part of the log:
|
It is the permission of Weird. @caco3 Is this a mount point for any external storage (as in NFS or Samba viua /etc/fstab) or just a normal partition? |
@MorrisJobke: It is a shared webspace, I don't have any mount points configured. |
Yes - sounds valid. @LukasReschke Any idea why a removal of a file fails only for some files in a subdirectory that was just created by the updater itself? |
It happened again with the update to 11.0.1 (note I didn't expect it to be solved). |
Agree had the same issue. and the upgrade is done and working fine. I vote of a don't fail the upgrade because the extracted files cant be deleted. leave the files give me a info notice at the end to manually clean it up if I want at the end... |
Today I tried to update from 11.0.1 to 11.0.2, again with an access error:
To make sure, I first deleted the update folder () and tried again, same outcome.
|
@caco3 this may have something to do with the CIFS share you are using. I have come across the same problem whilst having the data folder on a CIFS share, but when local do not have the problem. |
@eyysee Why do you think i have CIFS?
|
@caco3 - whoops, for some reason, thought you were the OP. @mentalinc ^^ |
@eyysee Any suggestions on what can be changed so a CIFS share can be used? Otherwise seems there is a bug with NextCloud updater where the data folder is on CIFS that should be investigated? |
Below are the various commands I have to run at the various failure points. based on the errors. sudo su |
I guess it got stated before, but I do no see why a failing removal of a temporary folder should lead to an update error (and possibly even to a corrupted NC installation). Wouldn't it be sufficient to show a warning so the user should remove the folder manually? |
@mentalinc when testing on a local mount, everything works as expected however as with you, when mounted as CIFS and the correct permissions applied to the mount, it gives me the same error whereby it cannot remove the temporary update directories. However saying that, if I keep clicking 'retry' then it does end up removing the directories... weird! Not sure why it's temporarily failing. Here is what I have applied for the CIFS mount: |
Still no progress in 11.0.3 Can the code be changed to at least not fail? |
Same issue for me (currently testing the 12.0 beta and RC releases)... however, it also seems I'm with the same hosting provider as @caco3 is, the environment looks strangely familiar. ;-) |
@stjosh: I am @ Hostpoint (in Switzerland) |
Same problem here updating from 11.0.2 to 12.0.0. I have a bad feeling every time I start the updater and it was never wrong. It would be great if this issue could be solved as it leads to outdated nc instances all over the world because people stick with their working systems before breaking them while updating. |
Not ideal but if you keep clicking on "retry" then the install will eventually complete but I am experiencing the same issue still. |
Hi. I'm not sure if this is the same problem. I tried to migrate from OwnCloud and I stuck in Step 10. Something could not delete (which is created by the updater). Hosting is shared web hosting at Strato (SunOs). Thanks a lot in advance for any advice! |
@MariaHimmelfahrt Well, as @eyysee already mentioned, if it's really the issue identified (and hopefully fixed by this pull request), you just have to be patient end click "update" again and again until it succeeds. From the logs linked, I think this should do the trick. Alternatively, you may want to try the manual update procedure as proposed by @caco3 . |
@stjosh & @caco3 @stjosh: Sorry, but I didn't get the desc really well. As I understand, the tree passing "delete" went wrong. Therefore, why could I not do this manually (What exact to delete?) and restart the updater or help the updater to proceed? Why does nobody describes such a procedure - what I'm getting wrong? @caco3 :=> May I ask you for closer description? II did not understand exactly what to do, because the manual was too short and I have no good orientation in the file structure.
As well, my installation stucks in Step 10 (Maybe rolledback to Step 7) Now I don't know what is what, what is OwnCloud - old and NextCloud - new structures. Maybe you could give me some orientation. Thanks in advance! |
@MariaHimmelfahrt Ah - I must have missed the point that you're actually trying to migrate from OwnCloud. Nevertheless, this should not make much of a difference.
Hope that helps. |
So... this are just some notes so you know how many time you typically have to press "retry" :)
hazzzaaaaaaa!!! |
Will be fixed with the next updater in stable12. nextcloud/updater#132 |
Hi |
Sadly I have to say that I also still had issues :( Below the log:
|
Still an issue in 13 Beta as well |
It worked! |
What an ordeal! Just went through upgrading from 12.0.4 to 12.0.5 and got stuck with this as well. Had to click "Retry" dozens of times, had to manually recreate (an empty) |
Huff, I did the same, and got a messy installation :-(. |
It's just occurred to me on FreeBSD updating from 12.0.3 - 12.0.5. I've had the web updater fail every time I have tried it.
|
@MorrisJobke Please reopen this issue again as it is clearly not solved yet! I did some digging in the updaters code. Since I now already upgraded, I can't test it any longer. See my tries here: caco3/updater@f249e8b#diff-828e0013b8f3bc1bb22b4f57172b019d |
Please open a new issue for this and reference this issue. The original issue was solved your issue seem to look like this but maybe is slightly different. Thanks |
I just upgraded ownCloud 9.1.4 -> NC 10.0.6 -> NC 11.0.8 -> NC 12.0.7 -> NC 13.0.2 And EVERY single step of the way I had the rmdir permission issue. I have the data folder on an SMB (you're referring to it as CIFS, but the protocol is actually SMB, CIFS is just old nomenclature) mounted share. It has 0770 folders and files, and www-data user AND group owns it recursively. So the permissions should be there for rmdir to work, but it only seemed to be on specific folders, and always the same folders, for every step of the way. I REALLY hope this gets fixed. I'm on 13.0.2 now (just finishing up validation) and to endure this each time an upgrade happens is just PAIN. I know it's centric to me using an SMB share for the data folder, and I can't quite figure out why it complains about specific folders. Perhaps this is an order of operations issue? Maybe copy all the files over to the new location, THEN delete them from source? |
@BloodyIron This issue is closed! If you have useful information (logs, your config, ...), add them to nextcloud/updater#158! I personally don't think its an issue on the data folder since that one does not get altered during an update. The log should say more => data/updater.log |
The data folder is where the updates were downloaded to, and then copied from, every. single. version. upgrade. I did. I don't know why you think otherwise, because that's the behaviour I saw, and I followed the recommended upgrade steps. I literally watched it working in the data folders (under an updater section). |
Good grief, this still exists.
and yes, /nxt is a CIFS share on the VM's host system where nc is in a guest vm, but since the updater creates it, it should also be able to delete it. I have no issues using the share with anything otherwise. Can't you just make it dialog-dependent, to make that backup during updates? It's silly to force one upon the users, since most already have an active backup script somewhere doing the same.
|
of course, no response. The simplest of solutions, just skip the backup, a goto line, and it could not be implemented! |
Keep in mind to be a bit more patient here. This is an open source project with a community of people providing help for free. If you need help in a timely manner, then think about the Nextcloud subscription: https://nextcloud.com/enterprise/ |
Sure, I realize that. I'll make my own script. The manual option (this one here: https://docs.nextcloud.com/server/13.0.0/admin_manual/maintenance/manual_upgrade.html ) always works fine, so I'm shell-scripting what that does. I don't really understand why nobody else ever did. |
Updater fails at the following point
Move new files in place
Could not rmdir /media/ownclouddrive/updater-oc8651su36ek/downloads/nextcloud/apps/comments/l10n
Steps to reproduce:
have datastore mounted via fstab (forgive me for still using owncloud naming)
//SERVERNAME/owncloud/ /media/ownclouddrive/ cifs uid=33,gid=33,defaults,file_mode=0770,dir_mode=0770,rw,username=owncloud-nas,password=XXXXXXX,domain=XXXXXX,noserverino 0 0
user with uid=33 is www-data
from config file
'datadirectory' => '/media/ownclouddrive',
Attempt to update using the built in updater will progress successfully to this point then fail (everytime).
Not sure what the issue is however...
I can do a cp from root account and copies the files fine.
cp -rf /media/ownclouddrive/updater-oc8651su36ek/downloads/nextcloud /var/www
I then just manually finish the process by setting maintenance mode off in config file and carrying on with upgrade via website.
Filled in most of the below
Server configuration
Operating system:
Ubuntu 16.04.1 LTS
Web server:
Server version: Apache/2.4.18 (Ubuntu) (apt-get updated)
Database:
mariadb?
PHP version:
PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS )
Nextcloud version: (see Nextcloud admin page)
10.0.2 (also happened when updating from v9.0.52) I was hopeful this was fixed in v 10
Updated from an older Nextcloud/ownCloud or fresh install:
updating from 10.0.2
Where did you install Nextcloud from:
from updater app.
Signing status:
Signing status
List of activated apps:
App list
The content of config/config.php:
'oc8651su36ek', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => 'xxxxxxxx', ), 'datadirectory' => '/media/ownclouddrive', 'overwrite.cli.url' => 'xxxxxxxxx', 'dbtype' => 'mysql', 'version' => '9.1.2.2', 'dbname' => 'nextcloud', 'dbhost' => '127.0.0.1', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_mentalinc', 'dbpassword' => '', 'logtimezone' => 'xxx', 'installed' => true, 'trashbin_retention_obligation' => 'auto,10', 'updater.release.channel' => 'beta', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'updater.secret' => 'xxxxxxxxxxxxxxxx', ); ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here (Without the database password, passwordsalt and secret) ``` **Are you using external storage, if yes which one:** local/smb/sftp/... smb to windows 2016 server **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no #### LDAP configuration (delete this part if not used)LDAP config
``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```The text was updated successfully, but these errors were encountered: