New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mosquitto_sub fails with malformed --url while mosquitto_pub succeeds. Error message should be improved instead of looping #2908
Comments
what flags are you using for the respective mosquitto_pub/sub commands? |
mosquitto_sub -L mqtts:https://x:x@x/ -t '/x/x/test' -d --capath /etc/ssl/certs/ |ts this fails, this works: mosquitto_pub -L mqtts:https://x:x@x/ -t '/x/x/test' -d --capath /etc/ssl/certs/ -m 'test4' |
I also tried to setup version without tls, and I get the same behaviour . |
One thing i noticed, is that you can specify the topic straight up in the URL. |
That works, but is a bit confusing. In another situation I use -h (and no authentication) and -t and this works fine. How do I subscribe to multiple topics? and why does this not give an error on the client, but a malformed package on the server. |
yields:
as why -t throws malformed packet, i can only speculate.. Maybe because the url is simply supposed to contain the topic , and a subscription to an empty topic is a malformed packet error? |
That sounds plausible, thanks for helping me resolve this. |
Reading in the spec:
So, it looks like this is the case. But a client side check should probably be put in place if not already done. |
In hind side it is kinda in the message:
but I completely missed this. To me it just looked like it got stuck in loop. |
running |
I've setup a mqtt server (mqtts) and everything works.
I can publish to it via mosquitto_pub, I can subscribe using MQTT explorer without issue.
However when I try to subscribe with mosquitto_sub it keeps reconnecing:
On the server I see:
Server version: 2.0.15
Client version: 2.0.15/2.0.11
I've tested the certificate chain with 'openssl s_client -connect' and it sais it is correct.
mosquitto_pub works, if I use the same but do a
mosquitto_sub
it fails .I must be missing something, any ideas?
The text was updated successfully, but these errors were encountered: