Nextcloud not working - Service Unavailable

It appears to be:

dan@Dan-MacBook-Pro-2013  ~  host nextcloud.nemenz.at
nextcloud.nemenz.at is an alias for home.nemenz.at.
home.nemenz.at has address 178.115.248.17

There should be an error logged somewhere, either in one of the Apache log files or in /var/log/messages. Without that, we’re just guessing.

1 Like

not much in the logs:

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:38:22.887336 2021] [proxy:error] [pid 14463] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:38:22.887384 2021] [proxy_fcgi:error] [pid 14463] [client 192.168.178.167:55680] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
192.168.178.167 - - [21/Mar/2021:22:38:22 +0100] “GET / HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:38:29.765996 2021] [proxy:error] [pid 18130] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:38:29.766043 2021] [proxy_fcgi:error] [pid 18130] [client 62.178.130.125:56275] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.130.125 - - [21/Mar/2021:22:38:29 +0100] “GET /status.php HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:38:31.909988 2021] [proxy:error] [pid 23506] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:38:31.910034 2021] [proxy_fcgi:error] [pid 23506] [client 62.178.130.125:56284] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.130.125 - - [21/Mar/2021:22:38:31 +0100] “GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:38:40.571605 2021] [proxy:error] [pid 14621] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:38:40.571656 2021] [proxy_fcgi:error] [pid 14621] [client 62.178.46.74:21338] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.46.74 - - [21/Mar/2021:22:38:40 +0100] “GET / HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:39:01.749952 2021] [proxy:error] [pid 14777] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:39:01.750008 2021] [proxy_fcgi:error] [pid 14777] [client 62.178.130.125:56411] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.130.125 - - [21/Mar/2021:22:39:01 +0100] “GET /status.php HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:39:03.789122 2021] [proxy:error] [pid 14460] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:39:03.789162 2021] [proxy_fcgi:error] [pid 14460] [client 62.178.130.125:56420] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.130.125 - - [21/Mar/2021:22:39:03 +0100] “GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)”
143.244.47.191 - - [21/Mar/2021:22:39:10 +0100] “GET /index.php?/categories&lang=kn_IN HTTP/1.1” 200 18689 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:39:33.743993 2021] [proxy:error] [pid 14623] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:39:33.744051 2021] [proxy_fcgi:error] [pid 14623] [client 62.178.130.125:56551] AH01079: failed to make connection to backend: 127.0.0.1

==> /var/log/httpd/access_log <==
62.178.130.125 - - [21/Mar/2021:22:39:33 +0100] “GET /status.php HTTP/1.1” 503 299 “-” “Mozilla/5.0 (Macintosh) mirall/2.5.2git (build 20190319) (Nextcloud)”

==> /var/log/httpd/error_log <==
[Sun Mar 21 22:39:35.774918 2021] [proxy:error] [pid 17392] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9002 (*) failed
[Sun Mar 21 22:39:35.774967 2021] [proxy_fcgi:error] [pid 17392] [client 62.178.130.125:56560] AH01079: failed to make connection to backend: 127.0.0.1

noting in messages

It seems you have an old version of Nextcloud installed where rh-php72 is used:

systemctl -l status rh-php72-php-fpm

Updating your server should solve the problem.

1 Like

systemctl -l status rh-php72-php-fpm
● rh-php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/rh-php72-php-fpm.service; disabled; vendor preset: disabled)
Active: inactive (dead)

intresting. I checked the Updates earlier today, there where none. now there where 44.
Still not working…

Just to be sure, let’s check the Neth version:

cat /etc/nethserver-release

You may start the service to check if it makes Nextcloud work:

systemctl start rh-php72-php-fpm

Do you use custom templates for Nextcloud?

1 Like

cat /etc/nethserver-release
NethServer release 7.9.2009 (final)

I dont think so

After startuing the php stack, nextcloud cam up with this message:
Exception: Updates between multiple major versions and downgrades are unsupported.

See this wiki article for solving this issue.

Thanks everyone, its working again.

1 Like

after a reboot I need to start php7.2 again on the terminal. How can I start it automatical?

You can enable it with

config setprop rh-php72-php-fpm status enabled

to start automatically.

But rh-php72 shouldn’t be needed by Nextcloud in recent versions.

Let’s check the nextcloud version:

rpm -q nethserver-nextcloud

Is it nethserver-nextcloud-1.16.6-1 ?

it is

rpm -q nethserver-nextcloud
nethserver-nextcloud-1.16.6-1.ns7.noarch

Please check if there are custom templates:
Does the dir /etc/e-smith/templates-custom/etc/httpd/conf.d/zz_nextcloud.conf exist and are there files in it?

Does it work if you expand the template?

expand-template /etc/httpd/conf.d/zz_nextcloud.conf

yes ther is a file in it “10base”
after expandig it and a reboot nextcloud is not working and I had to start php manualy.
also the problem in my other thred was there again.

Please move the “10base” file away and expand the template again.
You have an old custom template that overrides the new configuration of Nextcloud.

mv /etc/e-smith/templates-custom/etc/httpd/conf.d/zz_nextcloud.conf ~
expand-template /etc/httpd/conf.d/zz_nextcloud.conf

Please also check if there are other custom templates in /etc/e-smith/templates-custom/…

…which will continue to break Let’s Encrypt for that virtual host. But at least it will avoid the problem with the wrong version of PHP.

I thought the custom template is the initial problem?
Isn’t it also the cause of the wrong letsencrypt line?

Indeed, right you are–I thought I’d checked my own templates and seen that the line in question wasn’t there, but now that I look I see that isn’t the case. So yes, the problem in both cases was a custom template fragment. Wonder what it was doing there in the first place.

1 Like

Maybe it was created to have a more recent PHP version in Nextcloud.

Thank you this was it.
I have no clue why I had this custom template there. :man_shrugging:

1 Like