Checkmk | sed: -e expression #1, char 26: unknown option to `s' after deployment

CMK version:
image: checkmk/check-mk-raw:2.5.0-2025.07.05

OS version:
“Ubuntu 24.04.2 LTS”

Error message:
checkmk | sed: -e expression #1, char 26: unknown option to `s’

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

I am very new to Checkmk as this is my initial deployment. I am able to deploy, log in, add hosts, etc. But once I stop my docker container and restart, it ends up failing with:

robert@docker-demo-1:~/checkmk$ docker compose up
[+] Running 1/1
:heavy_check_mark: Container checkmk Created 0.0s
Attaching to checkmk
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 0 checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 1 checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk exited with code 1
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 1 checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk exited with code 1
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 1 checkmk | sed: -e expression #1, char 26: unknown option to s’

If I remove the container, the persistent volume, and the image… run “docker compose up”, ctrl-c, (even running docker compose up -d, docker compose down, docker compose up) the same issue happens.

Any guidance is appreciated.

Hi @rdeselle07 !

Do I understand it correctly that you are using one of the daily builds of 2.5?

If so, please note that 2.5 is still in early development and should not be used in production (I would also not dive too deep into testing it, as it is being actively developed and there are lots of changes all the time).

Please consider using the released versions, for example the newest 2.4: [Release] Checkmk stable release 2.4.0p6

@Sara Thanks for the feedback. I removed the container, deleted the image. Changed my docker compose file to image: checkmk/check-mk-raw:2.4.0p7
Docker compose up -d
Once things are up and running, docker compose down, then docker compose up.
Same issue occurs:

rdeselle@docker-demo-1:~/checkmk$ docker compose up
[+] Running 1/1
:heavy_check_mark: Container checkmk Created 0.0s
Attaching to checkmk
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 0 checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk exited with code 1 checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk exited with code 1
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk exited with code 1
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk exited with code 1
checkmk | sed: -e expression #1, char 26: unknown option to `s’
Gracefully stopping… (press Ctrl+C again to force)

I should note that I am connecting to my remote server using Twingate. Not sure, yet, if this has anything to do with the problem, but wanted to point this out.
I will try again tomorrow from home.

I can confirm that even when logged into the console the same issue occurs.
Steps:

  1. Docker compose up.

Once I get:

checkmk | Starting nagios…OK
checkmk | Starting apache…OK
checkmk | Starting crontab…OK
checkmk | ### STARTING CRON
checkmk | ### CONTAINER STARTED

  1. Ctrl-c
  2. docker compose up

Console shows:
heckmk | ### STARTING XINETD
checkmk | * Starting internet superserver xinetd
checkmk | …done.
checkmk | ### STARTING SITE
checkmk | Starting agent-receiver…OK
checkmk | Starting mkeventd…OK
checkmk | Starting rrdcached…OK
checkmk | Starting redis…OK
checkmk | Starting npcd…OK
checkmk | Starting automation-helper…OK
checkmk | Starting ui-job-scheduler…OK
checkmk | Starting nagios…OK
checkmk | Starting apache…OK
checkmk | Starting crontab…OK
checkmk | ### STARTING CRON
checkmk | ### CONTAINER STARTED
checkmk | Stopping crontab…OK
checkmk | Stopping apache…killing 803…OK
checkmk | Stopping nagios…OK
checkmk | Stopping ui-job-scheduler…killing 737…OK
checkmk | Stopping automation-helper…killing 710…OK
checkmk | Stopping npcd…OK
checkmk | Stopping redis…killing 684…OK
checkmk | Stopping rrdcached…waiting for termination…OK
checkmk | Stopping mkeventd…killing 667…OK
checkmk | Stopping agent-receiver…killing 660…OK
checkmk | Stopping 1 remaining site processes…OK
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to s' checkmk | sed: -e expression #1, char 26: unknown option to s’
checkmk | sed: -e expression #1, char 26: unknown option to `s’

@Sara Anything else you can recommend?

3 Ubuntu Docker machines and one RHEL Docker machine all see the same issue. No one has any thoughts? I know this is a free version, but is support/development around to assist?

Found this problem reported in version 2.3:

However, I am NOT using Traefik

I find it odd that that this exact same error has occurred elsewhere.

I think without your compose file no one can reproduce your problem.
Inside my dev environment there are running some docker instances of CMK and no one shows your problem.

1 Like

@andreas-doehler
Great Point:


services:
  monitoring:
    image: checkmk/check-mk-raw:2.4.0p6
    container_name: checkmk
    ports:
      - "8001:8000"
      - "5000:5000"
      - "162:162/udp"
    environment:
      - TZ=America/Los_Angeles
        #- CMK_PASSWORD=${CMK_PASSWORDO}
        #- CMK_SITE_ID=${CMK_SITE_ID:-cmk}
    tmpfs:
      - /opt/omd/sites/cmk/tmp:uid=1000,gid=1000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - data:/omd/sites:rw
    networks:
      - frontend

    restart: unless-stopped

volumes:
  data:
    driver: local

networks:
  frontend:
    external: true

Yes, I have a frontend network. This shows the two lines commented out as I was trying to rule things out.

  #- CMK_PASSWORD=${CMK_PASSWORDO}
  #- CMK_SITE_ID=${CMK_SITE_ID:-cmk}

With uncommented, I had a .env with the CMK_PASSWORD set

I have tried both 2.4.0p6 and 2.4.0p7 version. Same issues.

I’m trialling the raw edition for my org to see if we want to go enterprise and can’t get deployment to work consistently.

I have a basic ansible deployment deploying checkmk via Docker and it works fine UNTIL the container is restarted and I get the errors above:

Site timezone set to America/New_York
### STARTING XINETD
 * Starting internet superserver xinetd
   ...done.
### STARTING SITE
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting redis...OK
Starting npcd...OK
Starting automation-helper...OK
Starting ui-job-scheduler...OK
Starting nagios...OK
Starting apache...OK
Starting crontab...OK
### STARTING CRON
### CONTAINER STARTED
^C[]$ docker restart checkmk
checkmk
[]$ docker logs checkmk --follow
### CREATING SITE 'cmk'
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Updating core configuration...
Executing post-create script "01_create-sample-config.py"...OK
Executing post-create script "02_cmk-compute-api-spec"...OK
Executing post-create script "03_message-broker-certs"...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Skipping Apache restart.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
Site timezone set to America/New_York
### STARTING XINETD
 * Starting internet superserver xinetd
   ...done.
### STARTING SITE
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting redis...OK
Starting npcd...OK
Starting automation-helper...OK
Starting ui-job-scheduler...OK
Starting nagios...OK
Starting apache...OK
Starting crontab...OK
### STARTING CRON
### CONTAINER STARTED
Stopping crontab...OK
Stopping apache...killing 852.........................OK
Stopping nagios.....OK
Stopping ui-job-scheduler...killing 786...OK
Stopping automation-helper...killing 759...OK
Stopping npcd...OK
Stopping redis...killing 727...OK
Stopping rrdcached...waiting for termination...OK
Stopping mkeventd...killing 710...OK
Stopping agent-receiver...killing 704...OK
Stopping 1 remaining site processes...OK
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'

To add to this, I’m running RHEL 9 and here is my docker-compose:

---
services:
  traefik:
    image: traefik:v3.4.4
    container_name: checkmk-traefik-test
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./traefik.yml:/etc/traefik/traefik.yml:ro
      - ./dynamic_conf.yml:/etc/traefik/dynamic_conf.yml:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - checkmk
    labels:
      traefik.enable: "false"

  checkmk:
    image: checkmk/check-mk-raw:2.4.0-latest
    container_name: checkmk-test
    depends_on:
      - traefik
    init: true
    cap_add:
      - SYS_ADMIN
      - SYS_TIME
    security_opt:
      - apparmor:unconfined
    environment:
      - CMK_SITE_ID=cmk
      - CMK_PASSWORD=TestPassword123
      - TZ=America/New_York
      - SYSTEMD_LOG_LEVEL=warning
      - container=docker
    hostname: checkmk
    ports:
      - "8080:5000"
      - "8000:8000"
    tmpfs:
      - /opt/omd/sites/cmk/tmp:uid=1000,gid=1000
      - /tmp
      - /run
      - /run/lock
    shm_size: 256mb
    volumes:
      - /opt/checkmk-test-data/sites:/omd/sites:rw
      - /etc/localtime:/etc/localtime:ro
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    networks:
      - checkmk
    labels:
      traefik.enable: "true"
      traefik.http.routers.checkmk.rule: "Host(`checkmk.xxxx.xxxx`) || Host(`checkmk.xxx.xxxx`)"
      traefik.http.routers.checkmk.tls: "true"
      traefik.http.routers.checkmk.entrypoints: "websecure"
      traefik.http.services.checkmk.loadbalancer.server.port: "5000"
      traefik.http.routers.checkmk.service: "checkmk"

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5000/cmk/check_mk/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    restart: unless-stopped
    stop_signal: SIGTERM
    stop_grace_period: 30s

networks:
  checkmk:
    driver: bridge

@Bazooka6267 So Glad I am not the only one seeing this issue. However, I haven’t received much assistance resolving the issue. Problem with using free software

The problem is more that nearly no one is using CMK raw edition in such a container environment for production I think.
CMK is not a single process or single application container like most other. Especially the raw version has a high fluctuation for resource demand and I saw some systems with real problems in this area.

My dev environment also uses containers but does not show your specific error messages. The difference is that it is no docker compose but vscode devcontainer environment.

@andreas-doehler While I can understand that statement, I find it hard to believe. There are great videos out there on using Checkmk. However, I don’t understand the lack of support even for free software. I would assume even the free version has some of the same code as paid versions.

The problem is, if it is like in my system, that the problem not occurs. How should I help?

@andreas-doehler Again, I feel this is more of a problem with free open source vs what people pay for. I used a RHEL 9.6 system and the same issue occurs. So until someone shows otherwise, the issue IS with the raw (free) version.

I have a fresh RHEL 9.6 EC2 instance and installed the 2.4.0p7-CRE instance and don’t see any obvious problems. If I understand this correctly, it only happens with docker-compse. Correct ?

Thing is, this was a deployment to test out CheckMK vs our very antiquated Nagios setup, I was fully expecting the trial to go well and we would buy the enterprise edition but if we can’t even test the thing it doesn’t bode well.

I just tried with the cloud container too, and the same thing happens. This is not just a RAW edition issue.

[ ~]$ docker logs checkmk-test
### CREATING SITE 'cmk'
Generating configuration for core (type cmc)...
Starting full compilation for all hosts
 Creating global helper config...OK
 Creating cmc protobuf configuration...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Updating core configuration...
Executing post-create script "01_create-sample-config.py"...OK
Executing post-create script "02_cmk-compute-api-spec"...OK
Executing post-create script "03_message-broker-certs"...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Skipping Apache restart.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
Site timezone set to America/New_York
### STARTING XINETD
 * Starting internet superserver xinetd
   ...done.
### STARTING SITE
Starting agent-receiver...OK
Starting mkeventd...OK
Starting liveproxyd...OK
Starting mknotifyd...OK
Starting rrdcached...OK
Starting redis...OK
Starting automation-helper...OK
Starting ui-job-scheduler...OK
Starting cmc...OK
Starting apache...OK
Starting dcd...OK
Starting crontab...OK
### STARTING CRON
### CONTAINER STARTED
[ ~]$
[ ~]$
[ ~]$ docker restart checkmk-test
checkmk-test
[ ~]$
[ ~]$
[ ~]$
[ ~]$
[ ~]$ docker logs checkmk-test --follow
### CREATING SITE 'cmk'
Generating configuration for core (type cmc)...
Starting full compilation for all hosts
 Creating global helper config...OK
 Creating cmc protobuf configuration...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Updating core configuration...
Executing post-create script "01_create-sample-config.py"...OK
Executing post-create script "02_cmk-compute-api-spec"...OK
Executing post-create script "03_message-broker-certs"...OK
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Skipping Apache restart.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
Site timezone set to America/New_York
### STARTING XINETD
 * Starting internet superserver xinetd
   ...done.
### STARTING SITE
Starting agent-receiver...OK
Starting mkeventd...OK
Starting liveproxyd...OK
Starting mknotifyd...OK
Starting rrdcached...OK
Starting redis...OK
Starting automation-helper...OK
Starting ui-job-scheduler...OK
Starting cmc...OK
Starting apache...OK
Starting dcd...OK
Starting crontab...OK
### STARTING CRON
### CONTAINER STARTED
Stopping crontab...OK
Stopping dcd...killing 1051....OK
Stopping apache...killing 1031..................................OK
Stopping cmc...killing 947......OK
Stopping ui-job-scheduler...killing 932...OK
Stopping automation-helper...killing 905...OK
Stopping redis...killing 892...OK
Stopping rrdcached...waiting for termination...OK
Stopping mknotifyd...killing 877...OK
Stopping liveproxyd...killing 863...OK
Stopping mkeventd...killing 855...OK
Stopping agent-receiver...killing 849...OK
Stopping 4 remaining site processes...OK
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
sed: -e expression #1, char 26: unknown option to `s'
[ ~]$

We can see the container starts just fine the first time after deployment, and I am able to load the web gui (directly, without any reverse proxy) but when I issue docker restart checkmk-test the app fails and install is now broken.

Once again, the above testing was done with checkmk/check-mk-cloud:2.4.0p7.