Apache-own.conf nach Neustart verschwunden... Grund?

Continuing the discussion from Upgrade Ubuntu 20.04 auf 22.04 mit check-mk 2.1.0b9:

Dank dieser Info von Andreas,

  • /etc/apache2/conf-enabled/ → zzz_omd.conf → Include alles unter /omd/apache/
  • /omd/apache/ → esxi.conf → Include mode.conf der Site
  • /omd/sites/esxi/etc/apache/mode.conf → Link auf apache-own.conf im selben Verzeichnis

konnte ich ermitteln, warum mein Apache nach einem Neustart nicht mehr startete. Es war die apache-own.conf offensichtlich verschwunden, übrig blieb eine toter Link der “mode.conf”. Zum Glück fand ich davon noch ein Exemplar in einem Repo einer Installation und konnte durch händisches Eintragen der ####Root#### und ####Site#### Platzhalter den Apache und somit CheckMK wieder funktionstüchtig machen. Anyway, das war pures Glück!

Hat jmd eine Idee, was ein Verschwinden dieser Datei Auslösen kann?

Danke,

Haribert

Achtung mit der 2.1.0p7 hat sich hier einiges geändert.
Im Werk 14281 ist das recht ausführlich beschrieben. Mein alter Post ist damit obsolete.

Was z.B. Appliance-Nutzer kalt erwischt. Die sind normalerweise nicht auf der CLI unterwegs.

Guter Einwand - was kommt auf der Appliance da als Ausgabe fehlt ja der schöne große blaue Screen mit dem Hinweis beim Update.

…den Hinweis muss ich wohl beim Update auf die 2.1.0p10 überlesen haben… sowas… aber danke für die Info!

This issue is still present in 2.1.0p14, but the whole docker image is behaving weird.

  1. After container start, Apache is not started automatically. I must enter container, and then do
service apache2 start

after that, container is in state Healthy and can be accessed by Distributed monitoring.
However I wonder, how this apache can be started, because after re-create of image, then it is not possible to start it because of following error:

# service apache2 start
[FAIL] Starting Apache httpd web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
apache2: Syntax error on line 222 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/conf-enabled/zzz_omd.conf: Syntax error on line 1 of /omd/apache/papenburg.conf: Could not open configuration file /omd/sites/papenburg/etc/apache/mode.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

File mode.conf is not present in container even after Apache was successfully started.
Only way to run container again, is to stop it, delete the sites folder on docker host and then re-create the container. With 10 satellites it is really annoying, when I want to make some small change with mounts/anything.

The problem in your setup is the file “/omd/apache/papenburg.conf”. Better said in your case the not existing content.
With actual CMK setups this file holds the complete Apache config needed for the system Apache.
It don’t point to a config file inside your site directory anymore.

In the end it is the old mode.conf file only with the actual site name.
If you create an empty new container you will see that this file is now around 1.3kByte.

I don’t understand how this problem occurs. I just start fresh new container using docker-compose:

services:
  checkmk_papenburg:
    image: checkmk/check-mk-enterprise:2.1.0p14-rc3
    hostname: papenburg-cmk
    privileged: true
    networks:
      mvdata:
        ipv4_address: 172.17.3.25
    volumes:
    - /srv/volumes/checkmk/sites:/opt/omd/sites:rw
    tmpfs:
    - /opt/omd/sites/papenburg/tmp:uid=1000,gid=1000
    environment:
    - cap-add=SYS_ADMIN
    - MAILHUBSTARTTLS=YES
    - MAILHUBAUTHUSER=admin
    - MAILHUBAUTHPASS=admin
    - TZ=Europe/Berlin
    - http_proxy=http://xxx
    - https_proxy=http://xxx
    - CMK_PASSWORD=xxx
    - CMK_SITE_ID=papenburg
    - CMK_LIVESTATUS_TCP=on
    command: "/docker-entrypoint.sh"

It starts correctly. Everything is running, except general Apache which listens on port 80. That I have to start manually.
Then, lets say I want to add another mount:

    volumes:
    - /srv/volumes/checkmk/sites:/opt/omd/sites:rw
    - /srv/volumes/checkmk/backup:/tmp:rw

Container is being re-created and above Apache error occurs. So how it can be my configuration error?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.