Error creating site user. ### CREATING SITE 'cmk' - Docker

Hello!

I have discovered this application that seems very interesting!

I want to test it in docker but I get this error:

**Error creating site user. **
### CREATING SITE ‘cmk’ - Docker

This is the statement that I execute:

sudo docker container run -dit -p 5555:5000 -p 7777:8000 --tmpfs /opt/omd/sites/cmk/tmp -v monitoring_checkmk:/omd/sites --name checkmk -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.1.0-latest

What am I doing wrong?

Thanks!

CMK version:
OS version:

Error message:

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

Can you try the unmodified command from the documentation and see, if that works?

docker container run -dit -p 8080:5000 -p 8000:8000 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.1.0-latest

I would not recommend changing the ports if you dont have to, as this will lead to confusion afterwards.

I have busy ports:

docker: Error response from daemon: driver failed programming external connectivity on endpoint monitoring (beaef525e6f5c85937970641a5465676a260dc2550c76f8bb0b28d34ccf5355a): Bind for 0.0.0.0:8080 failed: port is already allocated.

Hi,

If I change only the busy port and removing uid=1000,gid=1000. I get the same error.

sudo docker container run -dit -p 5555:5000 -p 8000:8000 --tmpfs /opt/omd/sites/cmk/tmp -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.1.0-latest

CREATING SITE ‘cmk’
Error creating site user.

I’m using debian in a VM:

Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch

Docker version 19.03.15, build 99e3ed8919
docker-compose version 1.23.1, build b02f1306

Thanks.

Such old versions? I would first check with an up2date system if i have the same problems there.

Right now I am upgrading to Debian 10.

I will report on the progress.

Thank you!

I have finished installing Debian 10 and the same error :frowning:

Any ideas?

Thanks!

I checked inside my Docker test system and it is working there without problem.

docker container run -dit -p 8080:5000 -p 8000:8000 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.1.0-latest

result

 docker logs monitoring
### CREATING SITE 'cmk'
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Temporary filesystem already mounted
Updating core configuration...
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Executing post-create script "01_create-sample-config.py"...OK
Created new site cmk with version 2.1.0p24.cre.

  The site can be started with omd start cmk.
  The default web UI is available at http://cf125b78ecb4/cmk/

  The admin user for the web applications is cmkadmin with password: ZmYU4f7U
  For command line administration of the site, log in with 'omd su cmk'.
  After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'.

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.
### STARTING XINETD
 * Starting internet superserver xinetd                                                                                                                                         [ OK ]
### STARTING SITE
Temporary filesystem already mounted
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Starting redis...OK
Initializing Crontab...OK
### STARTING CRON
### CONTAINER STARTED

Used Docker version was

Server: Docker Engine - Community
 Engine:
  Version:          23.0.1

One other point, is there a special reason to start the docker as root?
All my containers are started with normal user accounts.

It looks like there are old containers of the Checkmk image running, and the volume is not empty.

Try to find old containers with docker ps -a, stop them if needed with docker stop, and remove them with docker rm.
Then, search for the volume with docker volume ls. If there is a line like "local monitoring, remove it with docker image rm monitoring`. After that, the unmodified start command from the Checkmk documentation should work. Do not omit the “uid=1000,gid=1000” options in the tmpfs directive.

If this does not work, install a fresh Debian 11 VM and try again.

After updating to the version (23.0.1) you have @andreas-doehler, it worked for me the first time!

I am happy! Of course, I have to think about mounting Debian 11. :slight_smile:

Thank you very much everyone!

1 Like

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.