NCP Update to v.1.50.0 fails to 503

No problem. At the moment I just did the trials with my test VM.
So i can run the process as often as i want. If you give me a hint which information is needed i will extract it.
My next step is to get a ncp-report before and after update. If possible as well while in “broken state”

That’s perfect :+1:

ncp-report should fetch information from the more useful logs and should suffice, you can take a look in sudo journactl -xe as well to see if there were any errors given by the services on your instance

Note: Remember to vet the ncp-report info, it is after all a script and not bullet-proof :pray:

I had issues with this 1.5.0/2.4.0.5 update within nextcloudpi too: I could not login since all my nc users were gone and the database was nowhere to be found, but I was able to solve the issue by simply restoring the backup that was made during the update itself (belonging to the previous installed version, nextcloud 24.0.3.2).

The backup file was positioned in the /data/nextcloud/data/ncp-update-backups/ directory so I could not restore it from there, since a backup cannot be restored from within the /data/nextcloud dir. The solution I found was simple: copy the nextcloud-bkp_DATE_TIMESTAMP-VERSION.tar.gz in the main /data dir itself. So I typed:

cd /MY_DATA_VOLUME_PATH/nextcloud/data/ncp-update-backups/
cp nextcloud-bkp_DATE_TIMESTAMP-VERSION.tar.gz /MY_DATA_VOLUME_PATH

and then, in the ncp interface I went to nc-restore and it did restore my backup, while at the same time purging my whole nextcloud-hosted file structure! Ah ah, luckily I had backups and I can laugh about it now but it was a bit scary when I found out.
If you’re going to restore a backup made by nextcloudpi at the time of any update, please remember it does not include your hosted data, so please backup/move your whole data folder file structure beforehand to a safe place. It can be found in:

/YOUR_DATA_VOLUME/

Your files are in /YOUR_DATA_VOLUME/nextcloud/data/YOUR_USERNAME/files, but I think it’s not enough to backup them since I found that even my previous nextcloud backups were gone, and while they are not absolutely necessary I do regret not having them around anymore.
As @ZendaiOwl wrote to me before,

Take the data out of any directory defined as a volume in docker, those are scary easy to delete the contents of

and I can absolutely agree now! :smiley:

Ok, so what about now? Did the restore work?
Yes, after a full nextcloud hosted data restore (I had backups) I am now able to access my nextcloud just like before, it seems to work just like it did before that nefarious update.

I hope I didn’t make too many errors typing this, sorry for any mistake I did.

1 Like

Unfortunately it is more complicated than is thought to extract the ncp-report out of a proxmox vm. The noVNC console doesn’t even support scrolling :frowning: .

But my progress is:
As far as I see there is no issue when I update over the terminal. Just if I update with webui.

When I enter ncp-config it shows this:


Update runs smooth with answering yes.

journactl-xe shows

1 Like

Ah … yes using the internal console in proxmox kinda sucks a bit for that :confused:

I connect via SSH to the VM’s on my Proxmox, makes it easier to get information when using the regular terminal on my laptop ^^

Thanks for the info :pray: both of you @REAPERSbattlecry & @Now (You did great :+1: )

Edit:
For docker you can update when the image is updated in the registry on docker hub, which is still at v1.49.1 when I checked. Update by pulling the new image, stopping and removing the old one then starting with the new one

1 Like

I’ve same problem, i can update to 1.50 without problems, but system break when i update to Nextcloud 24.0.5.

Docker or curl installer?
If you update as well the NC version there is a mandatory update to php 8. Not sure if that is done automaticly with 1.50 already.

Will try it later by myself

I have the same problem. When I update from 1.49.1 to 1.50 in the WebUI, it breaks at “Performing updates” with the information “something went wrong please refresh”.
After that the server 503 service is not available.

ncp is running on a Raspberry Pi 4B 8GB. Installed with the “NextcloudPi RaspberryPi v 1.49.1”. Nextcloud is running with v. 24.0.3.

Hope for a quick solution.

After upgrading my NCP RPi image on RPi3 to 1.50 today following by NextCloud 24.0.5 update, I encountered the similar issue.

The upgrade via nc-update in terminal took significantly longer this time. For a time being during compatibility plugin check-in, it appeared to be hang with little CPU and Disk usage for nearly 10mins. When I was about to take a look around on what went wrong, it proceeded automatically to next step. Then I noticed the system PHP7.4 was replaced by a PHP8.1 from 3rd party repo.
Anyway, the upgrade was completely in the end. I got Nextcloud 24.0.3 running. I could login via Web and access admin page. Below are what I did until it broke and gave me a 503.

  1. Reinstall the Apps that remove during update. It happened in the past when Internet connection is unable and I didn’t think too much. The Apps are: Notes, Forms, Mind Map. They worked just all right.
  2. Connect an external powered USB hard drive(I’m aware that RPi 3B’s insufficient power to USB ) to backup. I normally perform a backup once confirming the upgrade work. For some reason, it wasn’t recognized at first. Hence I rebooted the system.
  3. After rebooting, the USB hard drive is recognized as usual.
  4. Run ncp-export (part of v1.50.0 version of ncp-config suite)to backup the configuration file. Things went well.
  5. Run nc-backup to backup the database and the data folder. At that point, I was alerted that NextCloud status is unknown and later find it giving 503 in Web view.

I suspect it was due to the PHP or related configs as any attempt to invoke occ gives me a Segmentation fault.

Simply restarting php8.1-fpm doesn’t help at all though php binary itself is fine.

Any help would be much appreciate!

NextCloudPi diagnostics

/usr/local/bin/ncc: line 3:  5074 Segmentation fault      ${SUDO} php /var/www/nextcloud/occ "$@"
/usr/local/bin/ncp-diag: line 86: -1: substring expression < 0
/usr/local/bin/ncp-diag: line 86: -1: substring expression < 0
NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_03-02-22
OS                   Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
automount            yes
USB devices          none
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      140G/361G
rootfs usage         140G/361G
swapfile             /swapfile
dbdir                /var/lib/mysql
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       no
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        
Port check 443       
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              192.168.199.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1:17

Nextcloud configuration

/usr/local/bin/ncp-report: line 48:  5161 Segmentation fault      sudo -u www-data php /var/www/nextcloud/occ config:list system

HTTPd logs

[Sat Sep 24 19:40:45.690615 2022] [proxy_fcgi:error] [pid 757:tid 547700547968] [client 192.168.199.105:42094] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:40:45.690814 2022] [proxy_fcgi:error] [pid 757:tid 547700547968] (104)Connection reset by peer: [client 192.168.199.105:42094] AH01075: Error dispatching request to : 
[Sat Sep 24 19:44:30.231842 2022] [proxy_fcgi:error] [pid 756:tid 547641799040] [client 127.0.0.1:46232] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:44:30.232082 2022] [proxy_fcgi:error] [pid 756:tid 547641799040] (104)Connection reset by peer: [client 127.0.0.1:46232] AH01075: Error dispatching request to : 
[Sat Sep 24 19:44:30.950638 2022] [proxy_fcgi:error] [pid 757:tid 547608326528] [client 127.0.0.1:46236] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:44:30.950792 2022] [proxy_fcgi:error] [pid 757:tid 547608326528] (104)Connection reset by peer: [client 127.0.0.1:46236] AH01075: Error dispatching request to : 
[Sat Sep 24 19:47:54.725683 2022] [proxy_fcgi:error] [pid 756:tid 547625013632] [client 127.0.0.1:57040] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:47:54.725848 2022] [proxy_fcgi:error] [pid 756:tid 547625013632] (104)Connection reset by peer: [client 127.0.0.1:57040] AH01075: Error dispatching request to : 
[Sat Sep 24 19:47:56.769550 2022] [proxy_fcgi:error] [pid 757:tid 547272782208] [client 127.0.0.1:57050] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:47:56.769771 2022] [proxy_fcgi:error] [pid 757:tid 547272782208] (104)Connection reset by peer: [client 127.0.0.1:57050] AH01075: Error dispatching request to : 
[Sat Sep 24 19:48:02.824564 2022] [proxy_fcgi:error] [pid 757:tid 547583115648] [client 127.0.0.1:57062] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:48:02.824662 2022] [proxy_fcgi:error] [pid 757:tid 547583115648] (104)Connection reset by peer: [client 127.0.0.1:57062] AH01075: Error dispatching request to : 
[Sat Sep 24 19:48:07.527753 2022] [proxy_fcgi:error] [pid 756:tid 547901358464] [client 127.0.0.1:46062] AH01067: Failed to read FastCGI header
[Sat Sep 24 19:48:07.527972 2022] [proxy_fcgi:error] [pid 756:tid 547901358464] (104)Connection reset by peer: [client 127.0.0.1:46062] AH01075: Error dispatching request to : 
[Sat Sep 24 20:18:16.241274 2022] [proxy_fcgi:error] [pid 757:tid 547591508352] [client 127.0.0.1:47278] AH01067: Failed to read FastCGI header
[Sat Sep 24 20:18:16.241437 2022] [proxy_fcgi:error] [pid 757:tid 547591508352] (104)Connection reset by peer: [client 127.0.0.1:47278] AH01075: Error dispatching request to : 
[Sat Sep 24 20:18:17.099910 2022] [proxy_fcgi:error] [pid 757:tid 547901358464] [client 127.0.0.1:47294] AH01067: Failed to read FastCGI header
[Sat Sep 24 20:18:17.100136 2022] [proxy_fcgi:error] [pid 757:tid 547901358464] (104)Connection reset by peer: [client 127.0.0.1:47294] AH01075: Error dispatching request to : 
[Sat Sep 24 20:18:30.654875 2022] [proxy_fcgi:error] [pid 756:tid 547767689600] [client 127.0.0.1:36448] AH01067: Failed to read FastCGI header
[Sat Sep 24 20:18:30.655079 2022] [proxy_fcgi:error] [pid 756:tid 547767689600] (104)Connection reset by peer: [client 127.0.0.1:36448] AH01075: Error dispatching request to : 

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Check encryption key format","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add job to cleanup the bruteforce entries","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair DAV shares","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add token cleanup job","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:00+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:44+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:44+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"24.0.5.1","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:44+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"24.0.5.1","data":{"app":"updater"}}
{"reqId":"9IgSFbxtahfbGgaOTNOg","level":1,"time":"2022-09-24T02:41:44+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"24.0.5.1","data":{"app":"updater"}}
{"reqId":"Yy5xLO9tlbm-0z2VX0tLeQAABQg","level":3,"time":"2022-09-24T02:55:32+00:00","remoteAddr":"192.168.199.182","user":"ncp","app":"settings","method":"POST","url":"/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"24.0.5.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 120001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/nextcloud/notes/releases/download/v4.5.1/notes.tar.gz","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":146,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/lib/private/Http/Client/Client.php","line":218,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":296,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}
{"reqId":"Yy5x-xmoHfVti3vgE0ttGgAAVRg","level":3,"time":"2022-09-24T02:59:00+00:00","remoteAddr":"192.168.199.182","user":"ncp","app":"settings","method":"POST","url":"/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"24.0.5.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 120000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/nextcloud/notes/releases/download/v4.5.1/notes.tar.gz","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":146,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/lib/private/Http/Client/Client.php","line":218,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":296,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}

EDIT: Provide more details on what had been done before it broke.

Is this with the ncc shortcut only or do you get segmentation fault error with the original occ command too?

Some apps are not compatible as well, so if you can make the occ command work and disable those apps, then try a reboot?

Check the arguments in the ncc shortcut script for how to do the occ command, should be something like this
Ex.
sudo -u www-data php /var/www/nextcloud/occ list
Don’t remember offhand if you need to append su, so I don’t know

Edit: Found a cheat cheet someone had made online :slight_smile:

Here it is
sudo -u www-data php /var/www/nextcloud/occ

I would copy a link to the latest Nextcloud documentation but they’re currently unavailable for some reason. Get access denied when trying to access them

EDIT2: Using an old version (18) on the documentation website I was able to access the docs

https://docs.nextcloud.com/server/18/admin_manual/configuration_server/occ_command.html

The 3rd party repo is because php 8 and above isn’t available in the Debian Bullseye repository :slightly_smiling_face: instead Sury’s repository is added, which is a maintainer for those packages in the first place. So we’re using his repository directly instead of waiting for it to be added in Debian repositories

1 Like

It happened to original occ as well. :frowning:

I suspect the App incompatibility in the beginning as well but since occ itself gave me segment fault in all cases, I lean to think that one had issue.
Also, those Apps I added post-upgrade are all FEATURED apps and listed as compatible with 24.X. Should be Okey, right?

Allow me to try again with -v appended to php back to home later today to see if it could reveal more details.

Not necessarily, just because they are featured, doesn’t mean they don’t have problems. They are after all, community apps

Hey,

The thing that took significantly longer than usual, was the opcache being cleared. Without this, what happens is exactly what you are describing (segfaults when invoking occ and on other occasions). Did you maybe abort it accidentally?

You can run the opcache clear script again with the following commands - maybe that will solve the segfaults:

sudo bash -c 'source /usr/local/etc/library.sh && clear_opcache' 
sudo service php8.1-fpm restart

EDIT: The 503 errors during the update are a big oversight by me, sorry for that! You should be able to fix it with sudo service php8.1-fpm start. Alternatively you can wait about 2-3 hours and run ncp-update again. Until then I should have fixed it

2 Likes

Those two lines did the trick!

Since opcache was part of PHP these days, I never thought it could cause the problem.

Thanks a lot for the quick turnaround and hopefully to see the new update soon!

EDIT: Further recalling the update procedure, I indeed hit ENTER for several times while waiting for the significantly longer period. Maybe that abort the opcache clear step?

1 Like

It could be what caused it to interrupt, yes

Usually the interrupt command is Ctrl + C however pressing enter, or any other key for that matter, during an execution in the terminal can sometimes cause unexpected issues

1 Like

It’s not very likely, but not impossible. Normally, updating from terminal should have been fine, updating from the web UI was broken (because I missed a very important detail: Restarting php-fpm from within a process started by php is a bad idea :see_no_evil: )

1 Like

is your patch allready uploaded? Tried your commands

sudo bash -c 'source /usr/local/etc/library.sh && clear_opcache' 
sudo service php8.1-fpm restart

and still get

Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Steps I tried so far:
Install nc 24.0.5 with ncp web panel → nc installation page was working
after initialising (by ncp webpanel) → same error with internal server error

:frowning:

Okey… This doesn’t seem to fully mitigated.

Since my problem happened after rebooting, I tried again. After rebooting, the 503 error returned!
I have to re-run those two lines of command to clear the opcache and restart php-fpm to get it back to work.

Hmm, I got 2 failed service like log2ram and logrotate reported by systemd.
The /var/loggrew too large.

Not sure how it would related with 503 issue but another reboot after fixing those issues, 503 error doesn’t return. I will monitor it for a while.

Thanks all the same!

1 Like