Forum

503 "can't connect to FastCGI server PHP5"

RaGe10940
14 December 2013, 13:52
Hello Hugo,

Been using Hiawatha for a while and still kicking strong. While Hiawatha is not at fault here (I am able to go to a non php virtual host - the default one - and it works SSL and all) I can't however access my php sites. I keep getting a "can't connect to FastCGI server PHP5" in my hiawatha system log files.

I take a look at the php-fpm process and it is in fact running (I have it set a static config with 4 child processes) :
ps aux | grep php
root 1042 0.0 0.3 98900 11624 ? Ss 06:42 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 1074 0.0 0.0 98900 2936 ? S 06:42 0:00 php-fpm: pool www
www-data 1075 0.0 0.0 98900 2936 ? S 06:42 0:00 php-fpm: pool www
www-data 1076 0.0 0.0 98900 2936 ? S 06:42 0:00 php-fpm: pool www
www-data 1077 0.0 0.0 98900 2936 ? S 06:42 0:00 php-fpm: pool www
rixa 3469 0.0 0.0 5672 832 pts/3 S+ 07:48 0:00 grep --color=auto php

each child process is owned by the same user as hiawatha is (www-data - ServerId = www-data)

Looking inside the hiawatha file I have set up the php fcgi like so :
FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:9000
Extension = php
}

Within the www. conf for the FPM the config settings are like so:
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = www-data
group = www-data

listen.owner = www-data
listen.group = www-data
listen.mode = 0666

listen.allowed_clients = 127.0.0.1

I am quite confused as to what could be causing the problem. Any tips would be very helpful.


Hiawatha version: 9.3
Operating System: Lubuntu 13.10
RaGe10940
14 December 2013, 14:05
I am however getting errors from the FPM

php5-fpm (I run this as a command in the command line)
[14-Dec-2013 08:05:09] ERROR: failed to open error_log (/var/log/php5-fpm.log): Permission denied (13)
[14-Dec-2013 08:05:09] ERROR: failed to post process the configuration
[14-Dec-2013 08:05:09] ERROR: FPM initialization failed
Hugo Leisink
14 December 2013, 19:00
Are you sure the PHP FastCGI process is listening on port 9000? I'm missing the 'listen' setting in your config.
RaGe10940
15 December 2013, 01:20
2 days of work and multiple reformarts all led down to one line:

ConnectTo = /var/run/php5-fpm.sock

the fpm was listening to the socket (which is fine for my test bench)

keep up the good work Hugo! I haven't used anything but Hiawatha for the past year since 8.5 (I have yet to have time to look at Banshee )
This topic has been closed.