Nextcloud Update v848 to v896 Fails

Attempting to update nextcloud fails to complete. Update runs for two hours then displays error. Logs sent after fail.

Before attempting update, extra apps disabled, including recognize and office.

Update attempted using command “snap refresh nextcloud”

What version is it on right now?

snap list

Ok in v32 I included more optimisations suggested by Nextcloud, one was very slow so I disabled it and pushed the update without it. If you want to run it manually after the successful upgrade you can try this:

snap run nextcloud.occ maintenance:repair  --include-expensive

Snap list = v848

Do I need to do anything to make it downloading a different version than it has been trying to install? V896 still shows as upgrade option.

I now see v898 available.

I ran “snap refresh nextcloud”. This downloaded and attempted install of v898, but after 1.5hr it resulted in the same error message displayed. Logs sent.

“snap list” shows still on v848

Ok run the command above please

In 898 I removed the included expensive part but I still left repair itself maybe that also super slow on your instance (tried on mine it took few seconds with expensive part).

If that works fine for you than maybe the issue is different.

Your message says to try that after the successful update, it does not complete the update successfully.

Ran the repair command as posted, then tried snap refresh nextcloud. Same error.

Ok how long the command was running for?
Try refreshing now and send me the full output please as they are not included in the auto logs email.

It takes about 1.5-2hrs to result in error message. It’s the same error as originally posted, same error every time.

What output would you like? The message from the terminal is posted above, is there a different log you need? I only blocked out the hash since I didn’t know if it was a secret.

This command:

snap run nextcloud.occ maintenance:repair  --include-expensive

How long does it run?

If that runs quickly it is probably the slowness of Nextcloud database restore after the upgrade, one thing which can affect it is cpu/mem, can you stop all other apps:

snap stop [app]

and then try to refresh Nextcloud?

The repair command runs quickly, less than a minute.

Top -n1 shows no other device activity before starting refresh.

Ran stop command them started refresh.

Right now it has been sitting at copy snap “nextcloud” data for 15min.

“run configure hook of nextcloud snap if present” lasted 30min

“handling re refresh of nextcloud as needed” lasted 2min

Then ended with same error:

Ok, another option, create a systemd override:

sudo systemctl edit snapd.service

Add this in the editor that opens:

[Service]
Environment="SNAPD_CONFIGURE_HOOK_TIMEOUT=2h"

Save and exit, then:

systemctl daemon-reload
sudo systemctl restart snapd

Validate

systemctl show snapd.service | grep -i hook

Run refresh

This resulted in refresh to complete successfully.

I then performed the repair command as well.

Now version shows v898 32.0.5 and is working normally.

Thank you!

1 Like

Great I will push the default timeout increase!

1 Like