Level=error msg="could not setup mqtt backend,

hi im getting this msg.

level=info msg=“backend: connecting to mqtt broker” in the Lora-gateway-bridge

i tested the cmd sudo netstat -plnt
and mosquitto are bein listened at 1883

i have followed the Quick Install instructions with 0 results.

pls help me fix this issue

level=info msg=“backend: connecting to mqtt broker” in the Lora-gateway-bridge

Could you let me know what is wrong with that message? Please not it is not an error. It indicates that the LoRa Gateway Bridge is about to connect with the MQTT broker :slight_smile:

sorry i copied the wrong line, here’s the real error

level=error msg="could not setup mqtt backend,

Hello @Andres_Espinoza ,
could you show us the loraserver log file.

sudo systemctl start loraserver

journalctl -u loraserver

ok, i granted port 1883 permissions using iplist and
here’s the new output of journalctl -u lora-gateway-bridge

but still getting the same bad output from journalctl -u loraserver

The output is truncated, I think having the full line(s) would be helpful to understand the real error.

ok, im getting far, i restarted the loraserver service before capt the screen an now im getting this
for lora-gateway-bridge (this is the other half of the previus picture)


this for lora server

the weird part is this, how could the lora server get started if the output for the lora app servers is this

I am very surprised by the lack of loraserver log, could you find the full loraserver log file under /var/log/, here you can also find mosquitto log file.

Could you also try this cmd ==> “sudo systemctl status loraserver” and make a screenshot of the std output.

in /var/log/mosquitto i have 3 logs

mosquitto.log, mosquitto.log.1 and mosquitto.log.1.gz which one will lead us on the right track

ok heres what i got from sudo systemctl status loraserver

and here’s the content of the mosquitto log.

and here arme mi iptables just in case

Looks like the same issue as:

https://forum.loraserver.io/t/connecting-to-mqtt-broker-failed/440

I might remove the MQTT authentication part from the quick install guide. It seems to be one of the most occurring issues that people are having, to set this up correctly (also looking at the stats from my side). As this is not an absolute requirement to get everything up and running, I think removing this and documenting it as an optional step makes more sense.

Please let me know if you agree or disagree with this.

@brocaar to be honest I encoutered a pb when I set local.conf so I think, if you tag/highlight more precisely it will be more clear for everybody

@Andres_Espinoza could you show us your local.conf plz ?
/etc/mosquitto/conf.d/local.conf

heres my local.conf and also my mosquitto psw

i think you should use those error screens, in MQTT authentication part of the install guide and point based in this kind of experience, why are the user getting this err msg (which is pretty common among not so friendly linux users) and how may be fixed or prevent

how can i revert the MQTT auth config?

@Andres_Espinoza last line “loraapserver” is not quite good try with loraappserver double PP

remake sudo mosquitto_passwd /etc/mosquitto/pwd loraappserver

And what are the rights of your pwd file?

i secured it just like the quick install guide suggest using sudo chmod 600 /etc/mosquitto/psw