[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [mosquitto-dev] 2.0.15 docker: listener bound solely to localhost | 
Hei folks,
after experimenting with the latest docker container I noticed that the 
listener is apparently bind to localhost, only.
Following https://hub.docker.com/_/eclipse-mosquitto, I run
docker run -it -p 1883:1883 -p 9001:9001 eclipse-mosquitto
1672137262: mosquitto version 2.0.15 starting
1672137262: Config loaded from /mosquitto/config/mosquitto.conf.
1672137262: Starting in local only mode. Connections will only be 
possible from clients running on this machine.
1672137262: Create a configuration file which defines a listener to 
allow remote access.
1672137262: For more details see 
https://mosquitto.org/documentation/authentication-methods/
1672137262: Opening ipv4 listen socket on port 1883.
1672137262: Opening ipv6 listen socket on port 1883.
1672137262: Error: Address not available
1672137262: mosquitto version 2.0.15 running
Connecting to 1883/tcp on the host didn't work, so I checked the container:
docker container exec -it cranky_merkle /bin/sh
# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address 
State       PID/Program name
tcp        0      0 127.0.0.1:1883          0.0.0.0:* 
LISTEN      -
# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02
          inet addr:172.17.0.2  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11888 (11.6 KiB)  TX bytes:0 (0.0 B)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
So .. the container has an ipv4-only eth0 interface - but it looks like 
mosquitto is only bound to localhost.
Is it meant to be like that? It looks a little strange to me, because I 
don't yet see a way to actually connect to mosquitto without supplying a 
custom configuration.
Thanks,
Greetz, Jan