Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Issues related to applications and software problems and general support
Post Reply
chassap1
Posts: 22
Joined: 2017/10/24 14:23:59

Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by chassap1 » 2020/11/20 22:07:49

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.

User avatar
KernelOops
Posts: 390
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by KernelOops » 2020/11/21 11:29:21

Did you load the mod_cgid.so module?

https://httpd.apache.org/docs/2.4/howto/cgi.html
--
I love my computer - all my friends live there.
--

chassap1
Posts: 22
Joined: 2017/10/24 14:23:59

Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by chassap1 » 2020/11/23 19:02:12

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?

chassap1
Posts: 22
Joined: 2017/10/24 14:23:59

Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by chassap1 » 2020/11/23 19:17:31

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"

pjsr2
Posts: 526
Joined: 2014/03/27 20:11:07

Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by pjsr2 » 2020/11/24 17:07:01

I have used all the same settings in the httpd.conf
From the RHEL8 doc:
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.
The combination of the two quotes above brings me to the the question if this could be related to the error you observed.

chassap1
Posts: 22
Joined: 2017/10/24 14:23:59

Re: Apache 503 Service Unavailable - AH01257 unable to connect cgi deamon

Post by chassap1 » 2020/11/24 18:42:55

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

Post Reply

Return to “CentOS 8 - General Support”