MQTT Errors on local and open server

Hi wondering if anybody could help.

Installed MQTT from Ubuntu repository and get the following error codes

Active: activating (auto-restart) (Result: exit-code) since Tue 2021-12-28 18:46:12 GMT; 4ms ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Process: 8533 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 8534 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 8535 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
Process: 8536 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
Process: 8537 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=3)
Main PID: 8537 (code=exited, status=3)
dpkg: error processing package mosquitto (–configure):
installed mosquitto package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
mosquitto
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then tried sudo /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf and received the following error

1640724718: Loading config file /etc/mosquitto/conf.d/default.conf
1640724718: Error: Invalid protocol value (lora).
1640724718: Error found at /etc/mosquitto/conf.d/default.conf:5.
1640724718: Error found at /etc/mosquitto/mosquitto.conf:11.

Any advice for how to correct this would be appreciated.

Hi hyaluron,

Sorry for the delay replying!

This is the problem, it looks like you’ve set a line protocol lora in your configuration and Mosquitto doesn’t talk lora. The valid choices for protocol are mqtt and websockets

Removing that line should allow you to start Mosquitto, but it won’t help you make any progress with lora I’m afraid. Let us know if there is anything we can help with there.

Regards,

Roger