Migration to docker, interface no longer reachable

Hi,

we try to migrate our 1.6.0p22.cre installation to the docker image 1.6.0p22.cre

Backup on the original host and restore on the docker container works fine, but afterwards the web interface is no longer reachable.

omd site is started, no errors from docker logs.

Any hint on which logs to inspect?
Thanks

What port had the old site? The default port 5000?
You can change the container settings to match your old site settings.

The old site was running as part of an apache installation (https://server.domain.com/omd/)

That’s clear - but it is important what port your internal Apache used.
The docker container with default settings is using port 5000 and this is then forwarded to something outside.

Thx, port 80
We changed the port configuration of the docker-compose file to 80 and publish it also to 80, but no web response there.

The site internal Apache is running on 80? I don’t think so.
Can you show the output of netstat from inside the container?

old installation, CentOS, check_mk rpm package, published via default apache configuration https://site.domain.com/omd), omd internal web server running at 127.0.0.1:5000

new installation: docker container, runs fine on port 5000, reachable via webbrowser, restore of backup from centos installation, port 5000 no longer reachable via web browser

root@26ccd8224e75:/# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:6556 0.0.0.0: LISTEN*
tcp 0 0 127.0.0.1:5000 0.0.0.0: LISTEN*
tcp 0 0 127.0.0.11:37748 0.0.0.0: LISTEN*
tcp 0 0 192.168.64.2:36174 192.168.2.52:3306 FIN_WAIT2
tcp 0 0 192.168.64.2:42516 192.168.2.91:6556 ESTABLISHED
udp 0 0 127.0.0.11:50461 0.0.0.0:*

And in your container config you forward port 5000 to some port like 80 or 8080?

yes, that is working fine before I restore the backup (reachable externally also on port 5000).
After the restore of the backup the web interface is no longer reachable

Can you show your current container config?

Sure:

version: "3"

services:
check_mk:
image: checkmk/check-mk-raw:1.6.0-latest
container_name: check_mk
restart: always
cap_add:
- SYS_ADMIN
ulimits:
nofile: 1024
tmpfs:
- /root/docker/cmk/omd/sites/cmk/tmp:uid=1000,gid=1000
volumes:
- ./omd/sites:/omd/sites
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=cmk.domain.com
- VIRTUAL_PORT=5000
- CMK_SITE_ID=devcon
- CMK_PASSWORD=test1234xx
ports:
- 192.168.2.156:5000:5000

Finally found it, the original configuration listens only on 127.0.0.1, which is fine to get published via the locally available apache webserver.

For the docker configuraiton, after restoring the backup:

omd config sitename
Web GUI => APACHE_TCP_ADDR

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