We are upgrading from Fedora 20 to CentOS 8. I have used all the same settings in the httpd.conf. However, I'm getting a 503 Service Unavailable error. In the error_log I see this error:
(13)Permission denied: [client 192.168.1.60:53736] AH01257: unable to connect to cgi daemon after multiple tries: /var/www/cgi-gin/index.cgi
SELinux is disabled.
Any ideas how to fix this? thanks.
Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
- KernelOops
- Posts: 428
- Joined: 2013/12/18 15:04:03
- Location: xfs file system
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
--
R.I.P. CentOS
--
R.I.P. CentOS
--
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
I added this line to httpd.conf
LoadModule cgid_module modules/mod_cgid.so
no help. in the error_log file I see module mod_cgid is already loaded, skipping
Any other ideas?
LoadModule cgid_module modules/mod_cgid.so
no help. in the error_log file I see module mod_cgid is already loaded, skipping
Any other ideas?
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
here is my output from htttpd -V
[Mon Nov 23 14:16:35.479838 2020] [so:warn] [pid 1975:tid 140002648717632] AH01574: module cgid_module is already loaded, skipping
Server version: Apache/2.4.37 (centos)
Server built: Sep 15 2020 15:41:16
Server's Module Magic Number: 20120211:83
Server loaded: APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
[Mon Nov 23 14:16:35.479838 2020] [so:warn] [pid 1975:tid 140002648717632] AH01574: module cgid_module is already loaded, skipping
Server version: Apache/2.4.37 (centos)
Server built: Sep 15 2020 15:41:16
Server's Module Magic Number: 20120211:83
Server loaded: APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
From the RHEL8 doc:I have used all the same settings in the httpd.conf
The combination of the two quotes above brings me to the the question if this could be related to the error you observed.The multi-processing module (MPM) configured by default with the Apache HTTP Server has changed from a multi-process, forked model (known as prefork) to a high-performance multi-threaded model, event.
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
Yes. I made the changes below and it resolved my issue.
confirm that you have below settings in 00-mpm.conf
/etc/httpd/conf.modules.d/00-mpm.conf
and uncomment out mod_mpm_prefork.so then comment mod_mpm_worker.so module
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
I got this from this thread.
https://serverfault.com/questions/14280 ... gi-attempt
confirm that you have below settings in 00-mpm.conf
/etc/httpd/conf.modules.d/00-mpm.conf
and uncomment out mod_mpm_prefork.so then comment mod_mpm_worker.so module
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
I got this from this thread.
https://serverfault.com/questions/14280 ... gi-attempt
-
- Posts: 23
- Joined: 2017/11/28 14:48:49
Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon
I was ready to pull my hair out till I tried your solution. I am upgrading a server from Centos 7 to 8 Stream . I tried everything under the sun to get my perl scripts to work with apache .. No luck till I stumbled accross your answer. Also for some odd reason, apache changed where it writes it's error logs to : /var/www/error.log . I was searching in /var/log/httpd/* . Not sure why that changed.. Also still not sure I understand why I had to edit 00-mpm.conf ? My php scripts were working fine before and after that change. Why does perl require mpm?chassap1 wrote: ↑2020/11/24 18:42:55Yes. I made the changes below and it resolved my issue.
confirm that you have below settings in 00-mpm.conf
/etc/httpd/conf.modules.d/00-mpm.conf
and uncomment out mod_mpm_prefork.so then comment mod_mpm_worker.so module
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
I got this from this thread.
https://serverfault.com/questions/14280 ... gi-attempt