Checkmk container randomly dies with error: tarfile.ReadError: unexpected end of data

Checkmk version:
2.0.0p25 raw

OS version of Checkmk server or monitored system:
Debian 11 host, checkmk running in docker container.

Description of the problem :
A few times now my checkmk container will throw an error and endlessly restart the container.

Error message and/or output from below commands:
Since the docker container keeps restarting I’m unable to execute any commands from it, however the container outputs the following before restarting:

### STARTING XINETD
 * Starting internet superserver xinetd
   ...done.
### STARTING SITE
Temporary filesystem already mounted
Traceback (most recent call last):
  File "/usr/bin/omd", line 60, in <module>
    omdlib.main.main()
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/main.py", line 4022, in main
    command.handler(version_info, site, global_opts, args, command_options)
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/main.py", line 3534, in <lambda>
    handler=lambda version_info, site, global_opts, args_text, opts: main_init_action(
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/main.py", line 2556, in main_init_action
    exit_status = init_action(version_info, site, global_opts, command, args, options)
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/main.py", line 1382, in init_action
    prepare_and_populate_tmpfs(version_info, site)
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/main.py", line 321, in prepare_and_populate_tmpfs
    restore_tmpfs_dump(site)
  File "/omd/versions/2.0.0p25.cre/lib/python3/omdlib/tmpfs.py", line 271, in restore_tmpfs_dump
    tarfile.TarFile(_tmpfs_dump_path(site)).extractall(site.tmp_dir)
  File "/omd/versions/2.0.0p25.cre/lib/python3.8/tarfile.py", line 2021, in extractall
    for tarinfo in members:
  File "/omd/versions/2.0.0p25.cre/lib/python3.8/tarfile.py", line 2434, in __iter__
    tarinfo = self.next()
  File "/omd/versions/2.0.0p25.cre/lib/python3.8/tarfile.py", line 2312, in next
    raise ReadError("unexpected end of data")
tarfile.ReadError: unexpected end of data

Does anyone know how to fix it?

Notes
I’m running an unofficial image since the official one does not support running on ARM (I’m using a raspberry pi) the image in question is this: Docker Hub

Addidtionally the error has occured 2 times within a couple of weeks, and it seems to happen after the container is restarted using the docker-compose down command.

Hi,

I know this is an old post but i ran into the same issue today and would like to post my solution for anyone having this issue in the future.

I am not sure what causes it but this worked out for me…

  1. Stop the checkmk container
  2. Move the tmpfs-dump.tar in your docker volume under /var/omd/ outside of the docker volume.
    For example:
    mv [PATH_TO_VOLUME]/[SITE]/var/omd/tmpfs-dump.tar /tmp
  3. Start the checkmk container

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.