• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Error: (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

JesusGil

New Pleskian
Server info: Parallels Plesk v12.0.18 - CentOS 6.6 (Final) - PHP 5.3.3 (by default)

Hello,

I want to enable multiple PHP versions as shown in http://kb.odin.com/en/118378

I follow this procedure:

- Install PHP 5.6.4 on Plesk 11.5 & 12: https://gist.github.com/Stayallive/dbb91ffa6f0fc6ca6ac3

The installation is correctly but after change the PHP version of any website I have this error:

- (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

I try restart and reconfigure the domain...

# tailf /var/www/vhosts/domain.tld/logs/error_log
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Feb 07 19:40:30 2015] [error] [client 90.174.2.18] Premature end of script headers: index.php


# less /etc/httpd/logs/error_log
[Sat Feb 07 19:40:21 2015] [notice] Digest: done
[Sat Feb 07 19:40:21 2015] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Sat Feb 07 19:40:21 2015] [notice] mod_bw : Version 0.92 - Initialized [0 Confs]
[Sat Feb 07 19:40:21 2015] [warn] No JkLogFile defined in httpd.conf. Using default /etc/httpd/logs/mod_jk.log
[Sat Feb 07 19:40:21 2015] [warn] No JkShmFile defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
[Sat Feb 07 19:40:21 2015] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sat Feb 07 19:40:21 2015] [notice] mod_python: using mutex_directory /tmp
[Sat Feb 07 19:40:21 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sat Feb 07 19:40:21 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sat Feb 07 19:40:21 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sat Feb 07 19:40:21 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sat Feb 07 19:40:21 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 mod_jk/1.2.40 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations


# tailf /var/log/httpd/suexec_log
uid: (10001/terepaes) gid: (503/503) cmd: cgi_wrapper

# /usr/local/psa/admin/bin/php_handlers_control --list
id: display name: version: type: cgi-bin: cli-bin: php.ini:
module 5.3.3 5.3.3 module /usr/bin/php-cgi /etc/php.ini
fastcgi 5.3.3 5.3.3 fastcgi /usr/bin/php-cgi /etc/php.ini
cgi 5.3.3 5.3.3 cgi /usr/bin/php-cgi /etc/php.ini
fastcgi-5.5.20 5.5.20 5.5.20 fastcgi /php/php-5.5.20/bin/php-cgi /php/php-5.5.20/etc/php.ini
fastcgi-5.6.4 5.6.4 5.6.4 fastcgi /php/php-5.6.4/bin/php-cgi /php/php-5.6.4/etc/php.ini


# ls -la /etc/passwd
-rw-r--r--. 1 root root 4916 ene 13 18:59 /etc/passwd


config.png


error.png

Some idea ?
 
Hi JesusGil,

please have a look at the KB - article: PHP Fastcgi mode does not work: Premature end of script headers ( KB - article 120 785 ) and follow the suggestions.

Thank you very much for your help.

I have reviewed this article and gives no solution to my problem.

Symptoms

1. (YES) A secondary PHP is not working while switching the PHP mode to fastcgi.

2. (NO) Apache logs show a memory error.

3. (NO) The Suexec log shows an error.


Cause

1. (NO) PHP is not compiled with fastcgi.
fastcgi-5.6.4 5.6.4 5.6.4 fastcgi /php/php-5.6.4/bin/php-cgi /php/php-5.6.4/etc/php.ini


2. (NO) There is not enough memory on the server.
total used free shared buffers cached
Mem: 3754 1899 1854 54 218 855
-/+ buffers/cache: 824 2929
Swap: 7812 0 7812

3. (NO) The domain php.ini may be customized manually or contain an error.
Is the generated by default. I review it and I don´t find any problem.
The config in plesk is by default too.

4. (NO) Check the permissions for the /etc/passwd file.
-rw-r--r--. 1 root root 4916 ene 13 18:59 /etc/passwd

config_2.png
 
Hi JesusGil,

for further investigations it is helpfull to include log - files and depending configuration files. You could as well turn on the DEBUG log - level mode, so that you may get more informations about the errors ( this can be done over several configuration files, mostly in the loglevel section ). Be aware that as well missing rewrite directives ( apache and/or nginx ) can cause your issue and please check as well your php5-fpm configuration files.


Locate your php5-fpm configuration folders ( "conf.d" and "pool.d" with i.e. : locate fpm/conf.d and/or locate fpm/pool.d )

Please use as well the Forum search and the Knowledge-Base search options, because there are really a lot of solutions, suggestions and work-arounds for nearly all cases/failures
 
Hi,

Experiencing exactly the same problem as JesusGil,

/usr/local/psa/admin/bin/php_handlers_control --list
module 5.3.3 5.3.3 module /usr/bin/php-cgi /etc/php.ini
fastcgi 5.3.3 5.3.3 fastcgi /usr/bin/php-cgi /etc/php.ini
cgi 5.3.3 5.3.3 cgi /usr/bin/php-cgi /etc/php.ini
php-565-fastcgi 5.6.5 5.6.5 fastcgi /usr/local/php/php-5.6.5/bin/php-cgi /usr/local/php/php-5.6.5/etc/php.ini

vhost log file:
[Tue Feb 10 19:51:58 2015] [warn] [client ***.***.***.***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Tue Feb 10 19:51:58 2015] [error] [client ***.***.***.***] Premature end of script headers: index.php

/usr/local/php/php-5.6.5/bin/php-cgi -v
PHP 5.6.5 (cgi-fcgi) (built: Feb 10 2015 19:37:40)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

I have walked through the http://kb.odin.com/120785, but also everything is okay.

Haven't been able to find a solution for this problem, so I'm hoping there will be a solid fix anytime soon.
 
For the record, some extra information:

cat /usr/local/psa/version
12.0.18 CentOS 6 1200150126.15

rpm -q psa
psa-12.0.18-cos6.build1200140606.15.x86_64
 
Back
Top