503 Service Unavailable Error

The site loads perfectly. Thanks to All

1 Like

Hi - how did you resolve the php error? I have several vhosts set up, and am using php 7.1 on several - the default php is far too old for a lot of things.

Anyway - run updates and rebooted. I have set my default php to php 7.1. The vhost is set to use the default, but I get an error saying it is using 5.6:

This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

If I set the vhost to use 7.1, get

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Checking the status:

$ sudo systemctl status php71-php-fpm -l
● php71-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php71-php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-04-19 20:48:05 NZST; 13min ago
Main PID: 5238 (code=exited, status=78)

Apr 19 20:48:04 server.rnet.duckdns.org systemd[1]: Starting The PHP FastCGI Process Manager

Apr 19 20:48:04 server.rnet.duckdns.org php-fpm[5238]: [19-Apr-2018 20:48:04] ERROR: unable to bind listening socket for address ‘/var/run/php-fpm/cloud-php71.sock’: No such file or directory (2)
Apr 19 20:48:04 server.rnet.duckdns.org php-fpm[5238]: [19-Apr-2018 20:48:04] ERROR: FPM initialization failed
Apr 19 20:48:05 server.rnet.duckdns.org systemd[1]: php71-php-fpm.service: main process exited, code=exited, status=78/n/a
Apr 19 20:48:05 server.rnet.duckdns.org systemd[1]: Failed to start The PHP FastCGI Process Manager.
Apr 19 20:48:05 server.rnet.duckdns.org systemd[1]: Unit php71-php-fpm.service entered failed state.
Apr 19 20:48:05 server.rnet.duckdns.org systemd[1]: php71-php-fpm.service failed.

ANy help appreciated

Cheers

Okay - creating the /var/run/php-fpm directory gets things working, but I need to set each vhost’s php version to 7.1, rather than setting the default version to 7.1 and setting the vhosts to default.

I seem to remember this caused problems with some php applications 
 but don’t recall exactly what.

Let me dive in it, something wrong it seems. I have had another similar case by email lastly

ok error found, you can blame me. A fix is coming
systemd is really awesome :smiley:

1 Like

Personally, I blame the scapegoats.

Well, back to where I was - but this time the directory exists.

From the apache log:

==> /var/log/httpd/error_log <==
[Mon Apr 30 16:50:20.754657 2018] [proxy:error] [pid 25908] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm/cloud-php71.sock (*) failed
[Mon Apr 30 16:50:20.754703 2018] [proxy_fcgi:error] [pid 25908] [client 10.0.0.171:34968] AH01079: failed to make connection to backend: httpd-UDS


[root@server vhost]# systemctl status php71-php-fpm
● php71-php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php71-php-fpm.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/php71-php-fpm.service.d
           └─nethserver.conf
   Active: active (running) since Mon 2018-04-30 16:48:11 NZST; 3min 40s ago
 Main PID: 25984 (php-fpm)
   Status: "Processes active: 0, idle: 15, Requests: 0, slow: 0, Traffic: 0req/sec"
   CGroup: /system.slice/php71-php-fpm.service
           ├─25984 php-fpm: master process (/etc/opt/remi/php71/php-fpm.conf)
           ├─25985 php-fpm: pool cloud
           ├─25986 php-fpm: pool cloud
           ├─25987 php-fpm: pool cloud
           ├─25988 php-fpm: pool cloud
           ├─25989 php-fpm: pool cloud
           ├─25990 php-fpm: pool ebg
           ├─25991 php-fpm: pool ebg
           ├─25992 php-fpm: pool ebg
           ├─25993 php-fpm: pool ebg
           ├─25994 php-fpm: pool ebg
           ├─25995 php-fpm: pool www
           ├─25996 php-fpm: pool www
           ├─25997 php-fpm: pool www
           ├─25998 php-fpm: pool www
           └─25999 php-fpm: pool www

Apr 30 16:48:11 server.rnet.duckdns.org systemd[1]: Starting The PHP FastCGI Process Manager...
Apr 30 16:48:11 server.rnet.duckdns.org systemd[1]: Started The PHP FastCGI Process Manager.

So now my nextcloud server is not running - the only php services that can run are ones that use php 5.4. ie, old ones.

Any help appreciated

Don

I believed that nextcloud uses php56 ?

Nextcloud 12 used php56 AFAIK, the actual Nextcloud 13 uses php71, which is provided by nethserver-rh-php71-php-fpm.

Nextcloud uses php 5.6 or greater. It used to work fine on 7.1, now does not work on 5.6 or 7.1.

Neither do other applications - the only applications that work are ones that work with php 5.4.

OK, you seem to use Nextcloud in a vhost, I didn’t recognize that. I meant the Nethserver Nextcloud implementation used php56 in previous version and uses php71 now.

Nevermind, the issue is there


upgrade pushed, please update and sorry for the inconvenience

Okay - normal service has been resumed. I accidentally upgraded my Nextcloud manually (which indicates how much easier these things are nowdays :slight_smile: and then had problems with the Nethserver Nextcloud package, so wound up removing that package and installing Nextcloud from the Nextcloud site.

One little thing - if I go to the ‘PHP Settings’ section, and set the default version of php to 7.1, then go to ‘Virtual Host’ -> vhost edit -> Php Software collection, and set it to ‘default’, the vhost does not use php 7.1 but the Nethserver default of 5.4.

Should it use the default version from the PHP settings page, or am I misunderstanding this?

Cheers,

Don

1 Like

Probably a translation issue, now when you set the php value for the server it is only on the folder /var/www/html because nethgui is not compatible with php71 and php70.

When you use the php default value for a vhost, it is php54 for el7, even if you use the php72 for /var/www/html.

I need to explicit this.

done and released

1 Like

Hmm. I was sure I had set the default to 7.2 and the vhosts to default. Maybe not.

The old memory isn’t what it um thingie.

Hi there, hi @stephdl,

I just installed nethserver-php-scl and the same error appears on my system :slight_smile: (for a vhost)

[proxy:error] [pid 1680] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php73-php-fpm/www-php73.sock (*) failed

And indeed :

# cat /var/run/php73-php-fpm/www-php73.sock
cat: /var/run/php73-php-fpm/www-php73.sock: No such file or directory

But the folders exists

# ls -lai /var/run/
101 drwxr-xr-x  2 root   root     40 Jun  4 12:41 php56-php-fpm
 99 drwxr-xr-x  2 root   root     40 Jun  4 12:41 php70-php-fpm
 13 drwxr-xr-x  2 root   root     40 Jun  4 12:42 php71-php-fpm
 15 drwxr-xr-x  2 root   root     40 Jun  4 12:42 php72-php-fpm
137 drwxr-xr-x  2 root   root     40 Jun  4 12:46 php73-php-fpm

And the service is up and running :

# systemctl status php73-php-fpm                                                  
● php73-php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php73-php-fpm.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/php73-php-fpm.service.d
           └─nethserver.conf
   Active: active (running) since Tue 2019-06-04 12:46:40 UTC; 19min ago
 Main PID: 1749 (php-fpm)
   Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
   CGroup: /system.slice/php73-php-fpm.service
           ├─1749 php-fpm: master process (/etc/opt/remi/php73/php-fpm.conf)
           ├─1750 php-fpm: pool www
           ├─1751 php-fpm: pool www
           ├─1752 php-fpm: pool www
           ├─1753 php-fpm: pool www
           └─1754 php-fpm: pool www

Jun 04 12:46:40 webserver.lebrass.be systemd[1]: Starting The PHP FastCGI Process Manager...
Jun 04 12:46:40 webserver.lebrass.be systemd[1]: Started The PHP FastCGI Process Manager.

Any idea ?

Txs

Matthieu

Only for one vhost?

Which one?

When you change the php version could you catch something in log messages

Just a tip, do not hack an old thread, please open yours