mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

using Mosquitto as a client to VerneMQ, but see error 'unknown_protocol_version'

Open ashyshka opened this issue 6 years ago • 6 comments

Hi there! I am trying use Mosquitto as a client to VerneMQ. Mosquitto setup as bridge for local connection on localhost and connecting to VerneMQ with parameters

connection bridge-to-vernemq
address vernemq:1883
topic # out 2
topic # in 2 sender/receiver/ sender/receiver/

bridge_protocol_version mqttv311
cleansession false
notifications true
keepalive_interval 29
idle_timeout 90

remote_username username
remote_password userpasswd

but every time i see error message on vernemq like this

2019-05-22 16:30:21.187 [debug] <0.1005.0>@vmq_ranch:handle_message:210 [tcp] parse error 'unknown_protocol_version' for data: <<......>> and  parser state: <<>>
2019-05-22 16:30:21.187 [warning] <0.1005.0>@vmq_ranch:teardown:143 session stopped abnormally due to 'unknown_protocol_version'

At the VerbneMQ config we have default value there listener.tcp.allowed_protocol_versions = 3,4,131

Maybe, vernemq not allow to work as mqqt bridge receiver ? Can anybody help me with this setup ? Thanks!

ashyshka avatar May 23 '19 08:05 ashyshka

Try adding 132 to your allowed protocol versions config in VerneMQ, this will allow it to accept MQTT v3.1.1 with non-standardised bridge support, which is what Mosquitto and other brokers use.

ralight avatar May 23 '19 09:05 ralight

(or add try_private false to your bridge config)

karlp avatar May 23 '19 11:05 karlp

Thanks! I tried both try_private false - in the mosquitto client config listener.tcp.allowed_protocol_versions = 3,4,131,132 - in the vernemq config but without any success.

with try_private false - just can't auth publish

ashyshka avatar May 23 '19 11:05 ashyshka

You may also need notifications false

ralight avatar Sep 05 '19 20:09 ralight

or, notifications_local_only, because they're still often useful, or notifications_topic to be a topic that you are allowed to publish to on the remote side.

karlp avatar Sep 06 '19 09:09 karlp

@ashyshka did you figure out how to bridge to VerneMQ? Can this issue be closed?

ckrey avatar Oct 15 '24 07:10 ckrey