I get an error saying my port is already in use when starting mosquitto
root@OpenHAB:~# mosquitto -v
[393656.339556]~DLT~23300~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later...
1619595270: mosquitto version 1.6.9 starting
1619595270: Using default config.
1619595270: Opening ipv4 listen socket on port 1883.
1619595270: Error: Address already in use
I configured the port as follows:
lxc config device add OpenHAB myport1883 proxy listen=tcp:0.0.0.0:1883 connect=tcp:127.0.0.1:1883
The port configuration says:
simon@ansi-itx:~$ sudo lsof -i -n | grep 1883
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lsof: no pwd entry for UID 1000000
lxd 3227629 1000000 3u IPv6 13871533 0t0 TCP *:1883 (LISTEN)
lxd 3227629 1000000 8u IPv6 13871533 0t0 TCP *:1883 (LISTEN)
simon@ansi-itx:~$ sudo lxc exec OpenHAB -- /bin/bash
root@OpenHAB:~# sudo lsof -i -n | grep 1883
mosquitto 207 mosquitto 7u IPv4 13249724 0t0 TCP *:1883 (LISTEN)
mosquitto 207 mosquitto 8u IPv6 13249729 0t0 TCP *:1883 (LISTEN)
mosquitto 207 mosquitto 9u IPv4 13464490 0t0 TCP 127.0.0.1:1883->127.0.0.1:35182 (ESTABLISHED)
java 6432 openhab 398u IPv6 13465202 0t0 TCP 127.0.0.1:35182->127.0.0.1:1883 (ESTABLISHED)
I know this it not completely openhab related, but probably someone can help me here.
The errors:
root@OpenHAB:~# tail -f /var/log/mosquitto/mosquitto.log
1619595837: Socket error on client <unknown>, disconnecting.
1619595848: New connection from 127.0.0.1 on port 1883.
1619595848: Socket error on client <unknown>, disconnecting.
1619595848: New connection from 127.0.0.1 on port 1883.
1619595848: Socket error on client <unknown>, disconnecting.
1619595859: New connection from 127.0.0.1 on port 1883.
1619595859: Socket error on client <unknown>, disconnecting.
1619595859: New connection from 127.0.0.1 on port 1883.