Lost on networking between containers: custom/host/bridge


DK73

Recommended Posts

Hello,

 

UnRaid 6.9.2 on a Dell PowerEdge R720XD, I'm struggling to get this configuration working:

 

I've OpenHab container working with a custom network "br0" with IP 192.168.1.45, here the Docker Run command:

docker run -d --name='openHAB' --net='br0' --ip='192.168.1.45' --cpuset-cpus='5,7,9,11' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -v '/etc/localtime':'/etc/localtime':'ro' -v '/mnt/user/appdata/openhab/conf/':'/openhab/conf':'rw' -v '/mnt/user/appdata/openhab/userdata/':'/openhab/userdata':'rw' --tty --shm-size 2g 'openhab/openhab:latest-debian'

 

OpenHab service can't reach InfluxDB which is in another container but in bridge mode (server ip is 192.168.1.10):

docker run -d --name='Influxdb' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -p '8083:8083/tcp' -p '8086:8086/tcp' -v '/mnt/user/appdata/influxdb':'/var/lib/influxdb':'rw' 'influxdb:1.8'

 

I've telegraf (host nework) and grafana (bridge network) working also as container that connect with the above InfluxDB with no problem at all:

 

docker run -d --name='telegraf' --net='host' --privileged=true -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'HOST_PROC'='/rootfs/proc' -e 'HOST_SYS'='/rootfs/sys' -e 'HOST_ETC'='/rootfs/etc' -e 'HOST_MOUNT_PREFIX'='/rootfs' -v '/var/run/utmp':'/var/run/utmp':'ro' -v '/var/run/docker.sock':'/var/run/docker.sock':'ro' -v '/':'/rootfs':'ro' -v '/sys':'/rootfs/sys':'ro' -v '/etc':'/rootfs/etc':'ro' -v '/proc':'/rootfs/proc':'ro' -v '/mnt/user/appdata/telegraf/telegraf.conf':'/etc/telegraf/telegraf.conf':'rw' -v '/run/udev':'/run/udev':'ro' --user telegraf:$(stat -c '%g' /var/run/docker.sock) 'telegraf:latest'

docker run -d --name='Grafana' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -p '3000:3000/tcp' -v '/mnt/user/appdata/grafana':'/var/lib/grafana':'rw' 'grafana/grafana'

 

I've tried to move InfluxDB from bridge to same custom net 'br0' as openHAB. This actually worked but just for OpenHAB. Telegraf and Grafana stopped working with InfluxDB.

 

Any suggestion how can I configure this networking between containers to be able to reach InfluxDB from all of the others?

 

Thank you for any feedback!

 

DK73

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.