Docker restart consistently fails

CMK version: 2.2.0-latest up to 2.4.0-latest
OS version: Linux Debian 13

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

Hello,
Docker container initially starts with no errors.
However, if container has been brough down for any reason and then attempted to be started up, it does not start and leaves these messages in the log:

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'
<...>

This error does not exist in version 2.1.0-latest.
Tested/Failed versions: 2.2.0-latest, 2.3.0-latest, 2.4.0-latest

Please help to resolve. I am very new to checkmk, and might be doing something wrong.

I might be mistaken, but I would suspect docker entrypoint code, https://github.com/Checkmk/checkmk/blob/master/docker_image/docker-entrypoint.sh the lines containing ‘sed’ command (TZ-related, lines 120-132) were changed sometime after version 2.1.0

Thanks in advance.

docker-compose.yml file
services:
  checkmk:
    image: "checkmk/check-mk-raw:${CHECKMK_VERSION}"
    container_name: "checkmk"
    environment:
      - CMK_PASSWORD=my_password_is_here
      - TZ=America/New_York
    volumes:
      - /works/docker/checkmk/sites:/omd/sites
    tmpfs:
      - /works/docker/checkmk/tmp:uid=1000,gid=1000
    ports:
      - 15000:5000
      - 18000:8000
    restart: always

.env file

CHECKMK_VERSION="2.2.0-latest"

Hi,

someone in this post had the same probem when using a Timezone with underscore in the name:

He had changed the Timezone string to PST8PDT, maybe this is also a workaround for you.

1 Like

Perfect! Thanks a lot.

I ended up commenting out TZ line in docker-compose.yml, and it works, but setting up to EST5ETD is much better.
I feel a bit embarrassed that I was not able to find it here, though I’ve spent good amount of time searching.
Now I wonder if the issue for that has been opened, and if not how to do that, it it obviously the bug that is not documented.

Thanks again for pointing to the workaround

FYI
I’ve created PR to apply fix this: See GitHub

1 Like