Closed blob8129 closed 5 years ago
Hi @blob8129, The unacceptableProtocolVersion
means that the Broker does not support the client specified MQTT protocol version (The CocoaMQTT used MQTT v3.1.1 ).
However, In my test, The CocoaMQTT can successfully connect to EMQX 3.0.0. Where did you get the EMQX 3.0.0?
Hi @HJianBo, thanks for response, I am with @blob8129 :)
We are using version 3.0.0 of EMQX broker https://github.com/emqx/emqx/releases/tag/v3.0.0 Downloaded from https://github.com/emqx/emqx/releases/download/v3.0.0/emqx-centos7-v3.0.0.zip
We are using authentication plugin to authenticate by username&password, did you test with credentials also?
I tested it with emqx_centos7_v3.0.0
by opening emqx_auth_username
plugin. But it connecting successfully again. Does there some key miss??
The client and server is:
Client: Example application of CocoaMQTT on the master branch
Server: emqx-centos7-v3.0.0
with enable emqx_auth_username
plugin (and added available user)
Can you provide a reproducible step?? Or, Capture the TCP data to check it Protocol Level field.
@HJianBo is protocol version defined here https://github.com/emqtt/CocoaMQTT/blob/master/Source/CocoaMQTTFrame.swift#L172 actually relevant?
Yes, but more accurately the client will send version info by using PROTOCL_LEVEL(4) and PROTOCL_MAGIC(mqtt).
@HJianBo we found the source of the problem 🎉
Removing mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout")
solved the issue because our user didn't have access to /will
topic in ACLs.
I think ACLs validation of will topic was added in https://github.com/emqx/emqx/releases/tag/v3.0.0.
Of course I can also authorize our user to have publish access to /will
topics (or any other topic for "last will and testament") and connection works without any problems!
Thanks for your great support :)
This issue can be closed
One more thing worth mentioning is that:
unacceptableProtocolVersion
notAuthorized
@mdrobny We finally resolved this problem, it caused by this PR: https://github.com/emqx/emqx/pull/2168
I am trying to connect to EMQX Broker and getting
What could be the reason for this issue?