相关文章推荐
Debian Bullseye
Error message:
After successfully installing CheckMK on RasPi 4 and creating a site, CheckMK WebGUI is not reachable
Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

More info please. What URL are you calling and what error do you receive?
Is the site running? → omd status
Is the system apache running? → service apache2 status
Is the system apache listening on port 80 (or 443 if configured)? → ss -tlpen | egrep "(:80|:443)"
Did you run omd update-apache-config SITENAME as root after the site installation?

crontab: running

Overall state: running
Servie apache2 is NOT running (though being started by OMD)
OMD[]:~$ service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres>
Active: failed (Result: exit-code) since Tue 2022-08-30 11:34:37 CEST; 1h>
Docs: Apache HTTP Server Version 2.4 Documentation - Apache HTTP Server Version 2.4
Process: 621 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FA>
CPU: 119ms
system apache was NOT running, after starting it the cmd
omd update-apache-config SITENAME was executed successfully
checking for ports apache is listemningon, I got
root@:/var/log/apache2# ss -tlpen | egrep “(:80|:443)”
LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:((“python3”,pid=685,fd=7),(“python3”,pid=680,fd=7)) uid:999 ino:12854 sk:2 cgroup:/system.slice/omd.service <->

error occuring when trying to get site:

Fehler: Verbindung fehlgeschlagen

Beim Verbinden mit trat ein Fehler auf.

Die Website könnte vorübergehend nicht erreichbar sein, versuchen Sie es bitte später nochmals.
Wenn Sie auch keine andere Website aufrufen können, überprüfen Sie bitte die Netzwerk-/Internetverbindung.
Wenn Ihr Computer oder Netzwerk von einer Firewall oder einem Proxy geschützt wird, stellen Sie bitte sicher, dass Firefox auf das Internet zugreifen darf.
              

These are two different apache instances:

  • the site apache, running as the site user, started by omd command, usually listening on port 5000 – that one seems to be fine here
  • and the system apache, on Debian “apache2.service”, listening on port 80 and/or 443, acting as a reverse proxy for the site apache – that one is shown as failed.
  • You need to debug why the system apache is not running. apache2ctl configtest

    Now I got the system apache running

    root@elrond:/var/log/apache2# ps -efa | grep -i apache
    siteuser 8427 1 0 14:02 ? 00:00:00 /usr/sbin/apache2 -f /omd/sites/site/etc/apache/apache.conf
    siteuser 8430 8427 0 14:02 ? 00:00:00 /usr/sbin/apache2 -f /omd/sites/site/etc/apache/apache.conf
    siteuser 8431 8427 0 14:02 ? 00:00:22 /usr/sbin/apache2 -f /omd/sites/site/etc/apache/apache.conf
    siteuser 8756 8427 0 14:08 ? 00:00:21 /usr/sbin/apache2 -f /omd/sites/site/etc/apache/apache.conf
    root 10476 1 0 14:43 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18324 10476 0 17:31 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18325 10476 0 17:31 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18326 10476 0 17:31 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18327 10476 0 17:31 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18328 10476 0 17:31 ? 00:00:00 /usr/sbin/apache2 -k start
    www-data 18888 10476 0 17:42 ? 00:00:00 /usr/sbin/apache2 -k start
    root 19369 1002 0 17:53 pts/0 00:00:00 grep -i apache

    and ss cmd says

    root@elrond:/var/log/apache2# ss -tlpen | egrep “(:80|:443)”
    LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:((“python3”,pid=8334,fd=7),(“python3”,pid=8329,fd=7)) uid:999 ino:58064 sk:1001 cgroup:/user.slice/user-1001.slice/session-3.scope <->
    LISTEN 0 511 *:80 : users:((“apache2”,pid=11803,fd=4),(“apache2”,pid=10481,fd=4),(“apache2”,pid=10480,fd=4),(“apache2”,pid=10479,fd=4),(“apache2”,pid=10478,fd=4),(“apache2”,pid=10477,fd=4),(“apache2”,pid=10476,fd=4)) ino:69093 sk:2001 cgroup:/system.slice/apache2.service v6only:0 <->

    but site is not accessible via browser

    Again, what URL is being called, what error do you receive? Anything helpful in the apache logs?

    What happens when you connect directly to http://localhost:5000/SITENAME/check_mk/? (using some CLI tool like wget or curl on the monitoring server itself)

    Do you have the Apache config snippet /etc/apache2/conf-enabled/zzz_omd.conf loaded?
    This should be a symbolic link to ../conf-available/zzz_omd.conf

    Do you have the Apache module mod_proxy loaded? Check if these symbolic links are present:

    /etc/apache2/mods-enabled/proxy.conf -> ../mods-available/proxy.conf
    /etc/apache2/mods-enabled/proxy_html.conf -> ../mods-available/proxy_html.conf
    /etc/apache2/mods-enabled/proxy_html.load -> ../mods-available/proxy_html.load
    /etc/apache2/mods-enabled/proxy_http.load -> ../mods-available/proxy_http.load
    /etc/apache2/mods-enabled/proxy.load -> ../mods-available/proxy.load
    

    … or just enable them anyway using a2enmod proxy_html proxy_http

     
    推荐文章