Error msg="could not setup mqtt backend [...] read: connection reset by peer"

Hello everybody,

here is the situation.
I’ve set up lora-gatewaybridge on the gateway and lora server. The problem seems really easy to solve but, googling doesn’t give any result.
So after gateway reboot lora-gateway-bridge.log is next :
time="2017-10-05T20:26:51-05:00" level=info msg="backend: connecting to mqtt broker" server="ssl://"
time="2017-10-05T20:26:51-05:00" level=error msg="could not setup mqtt backend, retry in 2 seconds: Network Error : read tcp> read: connection reset by peer"

How to resolve the problem?

EDIT: here is the file(credentials part, rest is the same as in example):
export MQTT_SERVER="ssl://"
export MQTT_USERNAME="loraserver"
export MQTT_PASSWORD="somepass"
loraserver it’s server user, like my user. The logic of using it next. When I tried to stop MQTT server, it’s said like:“You need to enter password to mosquitto user:“loraserver””. I’ll try to use mosquitto user.
Also tried:’MQTT_SERVER=""

UPD:Changed usarname and password to mosquitto and somepass
password for user created using next command:
sudo mosquitto_passwd -c /etc/mosquitto/passwd mosquitto
Also I checked connection with this username and pass with mosquitto_sub and *_pub.

Result is the same.

This looks like a networking / firewall issue.

Ok, so yesterday, almost right after I wrote this question I’ve fixed it. Problem was, that I didn’t specify MQTT_USERNAME and MQTT_PASSWORD in loraserver and lora-app-server configuration files. And I got my gateway online yesterday.
But it was only gateway, I tried to send some information to the Appserver and didn’t see even join request.

TODAY I have my server rebooted, gateway wasn’t rebooted, and again, the same problem. I did all MQTT user/pass configurations. Saved them, restarted all services, and viola, magic. Everything working!

But initially problem was in the MQTT settings.
Thank you, @brocaar.

A post was split to a new topic: Manually decode PHYPayload or decrypt FRMPayload