3

In my product, when we upgrade the following error is seen.

Syntax error on line 42 of /etc/httpd/conf.d/25-graphite.conf: "Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration"

Line no 42 of the file /etc/httpd/conf.d/25-graphite.conf is this:

WSGIDaemonProcess wsgi display-name=%{GROUP} processes=5 threads=5

When I went through some of the articles available on stackover flow and returned by google search, most of the articles tend to suggest that wsgi module is not getting loaded.

Here is the troubleshooting I have done.

  • The httpd.conf file has following 2 statements

Include "/etc/httpd/conf.d/.load" Include "/etc/httpd/conf.d/.conf"

  • List item

The /etc/http/conf.d/ has following 2 files cat wsgi.*

wsgi.conf
WSGISocketPrefix /var/run/wsgi

wsgi.load
LoadModule wsgi_module modules/mod_wsgi.so

So I am assuming that the code to load the wsgi module is present.

  1. The /etc/httpd/conf.d directory has one more file(25-graphite.conf) which is where the error is reported. Its line no 42 is where the issue is as described above.

Line no 42 of the file /etc/httpd/conf.d/25-graphite.conf is this:

WSGIDaemonProcess wsgi display-name=%{GROUP} processes=5 threads=5

  1. When I read the httpd documentation to understand the below statement from httpd.conf

Include "/etc/httpd/conf.d/.conf*

it is mentioned that the files will be included in alphabetical order. This would mean 25-graphite.conf will be included ahead of wsgi.conf. Can this result in this issue ?

Troubleshooting performed: 1. /etc/init.d/httpd configtest command says the syntax is OK. However there are few warnings.

*[Wed Oct 18 14:54:06 2017] [warn] module proxy_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_http_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_ajp_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module headers_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_balancer_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_ftp_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_http_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_ajp_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] module proxy_connect_module is already loaded, skipping [Wed Oct 18 14:54:06 2017] [warn] NameVirtualHost :443 has no VirtualHosts

  1. /usr/sbin/httpd -M command output has following line which means the module is loaded properly.

wsgi_module (shared)

I need guidance on following.

  • What should be my approach to troubleshoot this issue further ?
  • Is there a way to reproduce this issue just by restarting the httpd server instead of carrying out the complete upgrade ?(I am already trying it from my end. This will help me to save time. )

    • Prathmesh
  • Did you ever fix this Prathmesh? – Raoul Jun 05 '19 at 06:52
  • I was missing some packages, as answered here: https://stackoverflow.com/questions/33320889/invalid-command-wsgidaemonprocess-deploy-django-application-on-centos-6-7#47399305 – Raoul Jun 05 '19 at 06:58

0 Answers0