This has started to happen and a reboot fixes the issue
1540916104: mosquitto version 1.4.15 terminating
1540916104: mosquitto version 1.4.15 (build date Sat, 07 Apr 2018 11:16:43 +0100) starting
1540916104: Config loaded from /etc/mosquitto/mosquitto.conf.
1540916104: Opening ipv4 listen socket on port 1883.
1540916104: Error: Address already in use
I reference localhost in my broker.url, any thoughts as to why suddenly?
Or how I can check which ip’s its got an issue with,
kris@openhab2:/etc/openhab2/services$ cat mqtt.cfg
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
#<broker>.url=tcp://<host>:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a random default is generated.
#<broker>.clientId=<clientId>
# Optional. True or false. If set to true, allows the use of clientId values
# up to 65535 characters long. Defaults to false.
# NOTE: clientId values longer than 23 characters may not be supported by all
# MQTT servers. Check the server documentation.
#<broker>.allowLongerClientIds=false
# Optional. User id to authenticate with the broker.
#<broker>.user=<user>
# Optional. Password to authenticate with the broker.
#<broker>.pwd=<password>
# Optional. Set the quality of service level for sending messages to this broker.
# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2
# (Deliver exactly once). Defaults to 0.
#<broker>.qos=<qos>
# Optional. True or false. Defines if the broker should retain the messages sent to
# it. Defaults to false.
#<broker>.retain=<retain>
# Optional. True or false. Defines if messages are published asynchronously or
# synchronously. Defaults to true.
#<broker>.async=<async>
# Optional. Defines the last will and testament that is sent when this client goes offline
# Format: topic:message:qos:retained <br/>
#<broker>.lwt=<last will definition>
broker.url=tcp://127.0.0.1:1883
broker.user=mosquitto
broker.pwd=xxx
broker.clientId=openhab
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
sometimes, this is a misleading message. for example, if the broker is up (active (running)) and you issue mosquitto -v to see the version, you will get the same “error” message.
important is to have the service up (systemctl status mosquitto)
1540876808: New client connected from 192.168.0.237 as gardenlights (c1, k15, u'mosquitto').
1540876810: New connection from 192.168.0.239 on port 1883.
1540876810: New client connected from 192.168.0.239 as DVES_462E34 (c1, k10, u'mosquitto').
1540876811: New connection from 192.168.0.234 on port 1883.
1540876811: New client connected from 192.168.0.234 as DVES_EA4695 (c1, k15, u'mosquitto').
1540876812: New connection from 192.168.0.240 on port 1883.
1540876812: New client connected from 192.168.0.240 as DVES_2D2E43 (c1, k15, u'mosquitto').
1540876866: New connection from 127.0.0.1 on port 1883.
1540876866: New client connected from 127.0.0.1 as openhab (c1, k60, u'mosquitto').
1540878604: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540880405: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540882206: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540884007: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540885808: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540887609: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540889410: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540891211: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540893012: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540894813: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540896614: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540898415: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540900216: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540902017: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540903818: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540905619: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540907420: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540909221: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540911022: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540912823: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540914624: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1540916104: mosquitto version 1.4.15 terminating
1540916104: mosquitto version 1.4.15 (build date Sat, 07 Apr 2018 11:16:43 +0100) starting
1540916104: Config loaded from /etc/mosquitto/mosquitto.conf.
1540916104: Opening ipv4 listen socket on port 1883.
1540916104: Error: Address already in use
kris@openhab2:/var/log$
Loaded: loaded (/etc/init.d/mosquitto; generated)
Active: active (exited) since Wed 2018-10-31 03:15:04 AEDT; 4h 59min ago
Docs: man:systemd-sysv-generator(8)
Process: 22734 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
Process: 22740 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)
Oct 31 03:15:04 openhab2 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Oct 31 03:15:04 openhab2 mosquitto[22740]: * Starting network daemon: mosquitto
Oct 31 03:15:04 openhab2 mosquitto[22740]: ...done.
Oct 31 03:15:04 openhab2 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
kris@openhab2:/var/log$
kris@openhab2:/var/log$ lsof -i TCP:1883
kris@openhab2:/var/log$ netstat | grep 1883
kris@openhab2:/var/log$ cat /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
listener 1883 0.0.0.0
kris@openhab2:/var/log$
I dont understand why it would change. The only thing thats new on the network is a NAS using a different IP address on a totally different machine, and it doesnt run MQTT/Mosquitto