NextCloud 502s on install (Nginx) Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Doq
Posts: 9
Joined: Sun Apr 19, 2020 1:56 am

Re: NextCloud 502s on install (Nginx)

Post by Doq »

IP and FQDN still produce the issue--
Joulinar wrote: Mon Apr 20, 2020 1:08 am anything visible on the nginx error.log file?

Code: Select all

cat /var/log/nginx/error.log
A revelation has been made! The error.log file gives me three copies of

Code: Select all

2020/04/19 16:38:32 [crit] 1220#1220: *9 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.0.4, server: brooklyn.home.n.burneset.ga, request: "GET /nextcloud/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "10.0.0.205"
So it is PHP that is broken?
User avatar
Joulinar
Posts: 2600
Joined: Sat Nov 16, 2019 12:49 am

Re: NextCloud 502s on install (Nginx)

Post by Joulinar »

hmm let's have a look. On my system the request files are there. pls do

Code: Select all

ls -la /run/php/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Doq
Posts: 9
Joined: Sun Apr 19, 2020 1:56 am

Re: NextCloud 502s on install (Nginx)

Post by Doq »

Code: Select all

[root@brooklyn.home.n.burneset.ga ~]# ls -la /run/php/
total 8
drwxr-xr-x  2 www-data www-data 100 Apr 19 16:37 .
drwxr-xr-x 23 root     root     680 Apr 19 16:38 ..
-rw-r--r--  1 root     root       4 Apr 19 16:37 php7.2-fpm.pid
srw-rw----  1 www-data www-data   0 Apr 19 16:37 php7.2-fpm.sock
-rw-r--r--  1 root     root       4 Apr 19 16:37 php7.3-fpm.pid
[root@brooklyn.home.n.burneset.ga ~]# 
It's missing. How did this happen?
User avatar
Joulinar
Posts: 2600
Joined: Sat Nov 16, 2019 12:49 am

Re: NextCloud 502s on install (Nginx)

Post by Joulinar »

hmm looks like something wrong with your PHP7.3 installation. I found a similar issue on the web describing yours exactly

https://superuser.com/questions/1456615 ... on-run-php

solution was to install php7.3-fpm package

Code: Select all

apt install php7.3-fpm
package availability on your system could be checked like this

Code: Select all

dpkg -l php7.3-fpm
and that the service is running like this

Code: Select all

systemctl status php7.3-fpm
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Doq
Posts: 9
Joined: Sun Apr 19, 2020 1:56 am

Re: NextCloud 502s on install (Nginx)

Post by Doq »

After doing some research of my own with this lead, it took me to this Github issue (https://github.com/laravel/homestead/issues/1031) in which it seems to be an issue with php7.3-fpm itself. Adjusting the nginx.conf to use 7.2's fpm makes NextCloud work as intended. Issue resolved!

Code: Select all

        # Upstream to abstract back-end connection(s) for PHP
        upstream php {
+               server unix:/run/php/php7.2-fpm.sock;
-               server unix:/run/php/php7.3-fpm.sock;
It seems that this was the reason why only Nextcloud was broken, as in my include config I was defining fastcgi manually.

Thank you for the help!
User avatar
Joulinar
Posts: 2600
Joined: Sat Nov 16, 2019 12:49 am

Re: NextCloud 502s on install (Nginx)

Post by Joulinar »

yes that was the other option to point back to php7.2. anyway, did you tried to install php7.3-fpm??
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Doq
Posts: 9
Joined: Sun Apr 19, 2020 1:56 am

Re: NextCloud 502s on install (Nginx)

Post by Doq »

I had tried using both apt install --reinstall and apt remove, then apt install, but neither of those resolved it either (it just wouldn't regenerate the socket).
User avatar
Joulinar
Posts: 2600
Joined: Sat Nov 16, 2019 12:49 am

Re: NextCloud 502s on install (Nginx)

Post by Joulinar »

ok strange, just keep in mind that active support for php7.2 already ended and it will get security fixes only until end of this year. sooner or later you might need to switch to php7.3 ;)

https://www.php.net/supported-versions.php
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply