Question

a problem with reload apache2

Posted February 11, 2021 452 views
ApacheDebian 10

Hello please I really need your help

I’m trying to install graphite and i’m following a manual to install it but now I have this problem

Feb 11 11:37:17 Graphite apachectl[5921]: The Apache error log may have more information.
Feb 11 11:37:17 Graphite systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 11 11:37:17 Graphite systemd[1]: Reload failed for The Apache HTTP Server.
Feb 11 11:40:02 Graphite systemd[1]: Reloading The Apache HTTP Server.
Feb 11 11:40:02 Graphite apachectl[6015]: AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/apache2-graphite.conf:
Feb 11 11:40:02 Graphite apachectl[6015]: Invalid command ‘WSGIDaemonProcess’, perhaps misspelled or defined by a module not included in the server configuration
Feb 11 11:40:02 Graphite apachectl[6015]: Action 'graceful’ failed.
Feb 11 11:40:02 Graphite apachectl[6015]: The Apache error log may have more information.
Feb 11 11:40:02 Graphite systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 11 11:40:02 Graphite systemd[1]: Reload failed for The Apache HTTP Server.

I really hope that you can help me with that

I’m following this manual to install it on Debian 10

https://www.unixmen.com/full-monitoring-system-graphite-collectd-statsd-part-1/

Best Regards

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi there,

It looks like that the wsgi module is not enabled.

You could do that by using the following commands:

  • Install the module if it is missing:
sudo apt install libapache2-mod-wsgi python-dev
  • Enable the module
sudo a2enmod wsgi

Finally run a config test:

sudo apachectl -t

And if you get Syntax OK message, restart Apache.

Regards,
Bobby

  • Man Thanks a lot but now I have another problem when I try to open my ip I get

    Internal Server Error

    Apache/2.4.38 (Debian) Server at 192.168.0.201 Port 80

    I really need your help and I really hope that you can help me with that

    when I use this command I get this result

    root@Graphite:~# netstat -vnat

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 0.0.0.0:2003 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:2004 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:7002 0.0.0.0:* LISTEN
    tcp 0 272 192.168.0.201:22 192.168.0.211:59693 ESTABLISHED
    tcp6 0 0 :::80 :::* LISTEN
    tcp6 0 0 :::22 :::* LISTEN
    tcp6 0 0 ::1:5432 :::* LISTEN
    tcp6 0 0 192.168.0.201:80 192.168.0.211:60697 TIMEWAIT
    tcp6 0 0 192.168.0.201:80 192.168.0.211:60698 TIME
    WAIT

    • Hi there,

      It looks like that the module was installed successfully and it fixed the Apache config error that you were getting and now Apache is up and running.

      For the 500 error, you need to check your Apache error log so that you could see the actual problem rather than the generic 500 error:

      • tail -100 /var/log/apache2/error.log

      Feel free to share the error here.
      Regards,
      Bobby

      • Thanks a lot Bobby I really hope I can fix this and I’ve used the command and here is the results

        root@Graphite:~# tail -100 /var/log/apache2/error.log
        [Fri Feb 12 11:02:41.912527 2021] [mpmevent:notice] [pid 5840:tid 140321378796672] AH00489: Apache/2.4.38 (Debian) configured – resuming normal operations
        [Fri Feb 12 11:02:41.912608 2021] [core:notice] [pid 5840:tid 140321378796672] AH00094: Command line: ’/usr/sbin/apache2’
        [Fri Feb 12 11:03:40.585748 2021] [mpm_event:notice] [pid 5840:tid 140321378796672] AH00491: caught SIGTERM, shutting down
        [Fri Feb 12 11:03:40.626437 2021] [mpm_event:notice] [pid 6373:tid 140233292170368] AH00489: Apache/2.4.38 (Debian) mod
        wsgi/4.6.5 Python/2.7 configured – resuming normal operations
        [Fri Feb 12 11:03:40.626805 2021] [core:notice] [pid 6373:tid 140233292170368] AH00094: Command line: ’/usr/sbin/apache2’
        [Fri Feb 12 11:04:09.546870 2021] [mpmevent:notice] [pid 6373:tid 140233292170368] AH00493: SIGUSR1 received. Doing graceful restart
        AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
        [Fri Feb 12 11:04:09.617291 2021] [mpm_event:notice] [pid 6373:tid 140233292170368] AH00489: Apache/2.4.38 (Debian) mod
        wsgi/4.6.5 Python/2.7 configured – resuming normal operations
        [Fri Feb 12 11:04:09.617304 2021] [core:notice] [pid 6373:tid 140233292170368] AH00094: Command line: ’/usr/sbin/apache2’

        • Hi there,

          It looks like that there are no records of the 500 error. It is possible that your site has a custom log file.

          You can check that in your Apache Vhost at: /etc/apache2/sites-enabled/your_site.

          Feel free to share the config here as well.

          Regards,
          Bobby

I have only this file

apache2-graphite.conf

and here is the content of this file

<VirtualHost *:80>

        WSGIDaemonProcess _graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=1$
        WSGIProcessGroup _graphite
        WSGIImportScript /usr/share/graphite-web/graphite.wsgi process-group=_graphite application-gro$
        WSGIScriptAlias / /usr/share/graphite-web/graphite.wsgi

        Alias /static/ /usr/share/graphite-web/static/
        <Location "/static/">
                SetHandler None
        </Location>

        ErrorLog ${APACHE_LOG_DIR}/graphite-web_error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/graphite-web_access.log combined

</VirtualHost>

Best Regards