MQTT protocol error

I was enjoying this server without any problems before.
But I just installed it with the latest version of Bridge, Network and App server on another system.
And I have a new issue with MQTT.
It seems the mosquitto works well. I can access the broker using commands without a password. I didn’t set up the password as below.

:~$ sudo mosquitto_passwd -b
Error: -b argument given but password file, username or password missing.

I’m having this error from Gateway Bridge server(same error on Network and App server)

Apr 10 14:50:02 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:02+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:04 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:04+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:06 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:06+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:08 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:08+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:10 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:10+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:12 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:12+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”
Apr 10 14:50:14 smartserver-17q48qc chirpstack-gateway-bridge[862]: time=“2020-04-10T14:50:14+09:00” level=error msg=“integration/mqtt: connection error” error=“Identifier rejected”

So I have checked the log of mosquitto
It says the protocol error.

1586495290: New connection from 127.0.0.1 on port 1883.
1586495290: Client disconnected due to protocol error.
1586495292: New connection from 127.0.0.1 on port 1883.
1586495292: Client disconnected due to protocol error.
1586495294: New connection from 127.0.0.1 on port 1883.
1586495294: Client disconnected due to protocol error.
1586495296: New connection from 127.0.0.1 on port 1883.

I didn’t modify the toml file at all.
Could you advise on this?

It seems MQTT is not real problem.
If I run sudo chirpstack-gateway-bridge --config=/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml command, I got

FATA[0000] setup backend error: new backend error: listen udp error: listen udp 0.0.0.0:1700: bind: address already in use

I confirmed that there is no process that uses 1700 port.
The state of chirpstack gateway bridge is empty. It doesn’t listen.

Any idea?

Hi,

I’m not a pro, but here is what I think:
chirpstack-gateway-bridge is a service, so you shouldn’t run it this way, but by running:
sudo service chirpstack-gateway-bridge start
or
sudo service chirpstack-gateway-bridge restart

So, I guess that your bridge is already running, this process is listening to port 1700, and this is why you cannot run it again.
If you still have an issue running the service, try to run:
lsof -i -P -n | grep LISTEN

This should give you the name of the process listening on port 1700, so that you can kill it.

Hi manuouan,

If I stop the chirpstack-gateway-bridge, I don’t any PID which uses 1700.
If I start it again, I see below

sudo netstat -alp | grep :1700
udp6 0 0 [::]:1700 [::]:* 20957/chirpstack-ga

Does it mean working well?
If so 1700 is not cause of my problem. Back to the first post, still MQTT could be a cause…