Hi,
I am running mosquitto version 1.4.3 (build date Wed, 19 Aug 2015 12:10:03 +0100) and am having trouble getting mosquitto to bind to specific IP addresses for websockets connections. It seems to work fine for 1883 & 8883. Am I missing something ?
Here is my config:
# CAN bind port 1883 to any address listener 1883 127.0.0.1 protocol mqtt
# CAN bind port 8883 to any address listener 8883 127.0.0.1 ##listener 8883 cafile /etc/mosquitto/ca_certificates/server-cafile.pem certfile /etc/mosquitto/certs/server-certificate.pem keyfile /etc/mosquitto/certs/server-private-key.pem
# CANNOT bind port 8080 to any address - it binds to 0.0.0.0 listener 8080 127.0.0.1 protocol websockets
# CANNOT bind port 8081 to any address - It binds to 0.0.0.0 listener 8081 127.0.0.1 protocol websockets cafile /etc/mosquitto/ca_certificates/server-cafile.pem certfile /etc/mosquitto/certs/server-certificate.pem keyfile /etc/mosquitto/certs/server-private-key.pem
With the following results:
# uname -a Linux iotgroup-07818742 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
# netstat -an | grep -i LIST tcp 0 0 127.0.0.1:1883 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8883 0.0.0.0:* LISTEN
No obvious error messages:
1441046179: Opening ipv4 listen socket on port 1883. 1441046179: Opening ipv4 listen socket on port 8883. 1441046179: Opening websockets listen socket on port 8080. 1441046179: Opening websockets listen socket on port 8081. 1441046193: mosquitto version 1.4.3 terminating 1441046193: mosquitto version 1.4.3 (build date Wed, 19 Aug 2015 12:10:03 +0100) starting
Any help greatly appreciated. Many thanks, Chris.
|