Nextcloud stuck on updating (need a fix fast!)

Joined
Dec 7, 2021
Messages
8
Hi there!

Im pretty new to all the server things. I’m currently running a TrueNAS server, for Nextcloud. It runs perfectly. Till today… I use Nextcloud for my company, so it is really essential.

I tried to update Nextcloud via the GUI. It worked, but now it keeps updating. When I go to the IP it said a update in process. And when I go to /updater it saids something with step 6.

How can I fix this?
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
You are not giving us much to work with here. You tried to update from which GUI, within NC or within TrueNAS? Have you tried restarting the plugin? There are many posts on updating issues on step 5 and there are a number of fixes for this. The majority talk about deleting the updater -file from the data directory and restart.
 
Joined
Dec 7, 2021
Messages
8
Well thanks for your reply. I’ve looked over 20 posts and I’m trying for 3 days now.

I did the update inside NC.

How can I delete this file? Can you help me with that?

@ddaenen1
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Sure, i will do my best. First of all, if you use the plugin, do not update NC from within the NC GUI. It may work, but you will get into trouble if you want to upgrade via the plugin later, which sometimes is necessary as the plugin doesn't only update NC but also the supporting structure.

Stop the jail, find the updater directory, it should be located in /usr/local/www/nextcloud/data/ . The directory should be named as "updater-bunchofrandomcharacters", assuming you have some basic CLI knowledge, remove that directory and restart the jail.

I have been in a very similar situation as yourself in the past and managed to save it.
 
Last edited:
Joined
Dec 7, 2021
Messages
8
Well, thanks! I tried removing it, but I'm not an expert with it. How do I remove it? I tried 'rm' 'rmdir' and some other. Also tried te command below. Can you help me with removing it?

Schermafbeelding 2021-12-08 om 18.55.48.png


@ddaenen1
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
how about rm -r updater-xxxxxxx ? I have the feeling that you are over-complicating things for yourself. FreeBSD CLI commands are pretty straight forward
 
Joined
Dec 7, 2021
Messages
8
Thank you... yes I do indeed. I see you are from Belgium, the french part? I'm from the Netherlands, so hello neighbour :P.

Well, I did delete the directory, and if I go to the domain, I still get update in process.

On the good side, if I go to /updater/ I get
Schermafbeelding 2021-12-08 om 22.05.46.png


When I go to config.php and copy the updater.secret it does not work. How do I unhash it? Or can I do it on another way...?

@ddaenen1
 
Joined
Dec 7, 2021
Messages
8
Well, alright, I scrambled back my old PHP skills, and he is currently doing the update again, figured out how to get the play text.

Schermafbeelding 2021-12-08 om 22.42.57.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Why not "just" (sorry) run the update from the command line?

su -m www -c "cd /usr/local/www/nextcloud && /usr/local/bin/php occ upgrade"
 
Joined
Dec 7, 2021
Messages
8
Alright, did not know that was possible, but thanks! But I think I made a new mistake here. It kept failing in the GUI, so I started the update in truenas... I don't know what happend but I was logged out of my server and now if I start nextcloud, it wont work... I get some sort of error message from Chrome... It is in dutch, but it saids that my connection isnt private, and after some restarts I cant get it to work... How to fix it?

@Patrick M. Hausen @ddaenen1
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Alright, did not know that was possible, but thanks! But I think I made a new mistake here. It kept failing in the GUI, so I started the update in truenas... I don't know what happend but I was logged out of my server and now if I start nextcloud, it wont work... I get some sort of error message from Chrome... It is in dutch, but it saids that my connection isnt private, and after some restarts I cant get it to work... How to fix it?

@Patrick M. Hausen @ddaenen1

Honestly, i am not sure that was a smart move. I did my updates via the GUI first but it got me into big trouble when i tried to update it afterwards through TrueNAS. It resulted in doing a complete new install from scratch. Does Chrome allow you to accept the "unsafe" cert?
 
Joined
Dec 7, 2021
Messages
8
No it doesnt actually.. If I have to reinstall it, is there a possibility to get the files, saved on nextcloud, back? Because the last backup was like a month ago.

@ddaenen1
 

Attachments

  • Schermafbeelding 2021-12-09 om 13.13.18.png
    Schermafbeelding 2021-12-09 om 13.13.18.png
    497.8 KB · Views: 140

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Of course. You can rename the old broken jail, install a new one, then you will have to create the Nextcloud users manually. But after that, just copy the files into the designated user's directory and use occ files:scan to update the database.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
No it doesnt actually.. If I have to reinstall it, is there a possibility to get the files, saved on nextcloud, back? Because the last backup was like a month ago.

@ddaenen1
the easiest way to get the files out of NC in my view is just move them to a local drive via FTP. I have used WinSCP for that and that works like a charm. Just activate the FTP service in services, make sure you set up the port correct on both TrueNAS and the FTP client and off you go. Much easier than trying to move stuff back and forth using FreeBSD commands.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Well, if you move/copy on the command line, it all happens within TrueNAS without going over the wire. That's orders of magnitude faster. And the files are residing on ZFS all the time. But you do you.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Well, if you move/copy on the command line, it all happens within TrueNAS without going over the wire. That's orders of magnitude faster. And the files are residing on ZFS all the time. But you do you.
All true but for someone not as experienced in FreeBSD as yourself who is used to do things via a GUI, FTP is definitely a slower but easy alternative.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
All true but for someone not as experienced in FreeBSD as yourself who is used to do things via a GUI, FTP is definitely a slower but easy alternative.

Have you looked at mc? This presents an interface similar to the old Norton Commander DOS utility for managing the file system. You'll be able to copy groups of files between datasets using the arrow keys, space bar, and TAB.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Top