rabbitmq / rabbitmq-mqtt

RabbitMQ MQTT plugin
https://www.rabbitmq.com/mqtt.html
Other
174 stars 67 forks source link

Unable to Connect MQTT Client #198

Closed TNChalise closed 5 years ago

TNChalise commented 5 years ago

Dont know, where to ask this question. I have been trying to connect MQTT client but unable to connect to rabbitmq. Here are the server logs:

[error] <0.2479.0> MQTT cannot parse frame for connection '127.0.0.1:58978 -> 127.0.0.1:1883', unparseable payload: <<128,44,0,1,0,39,98,108,117,101,114,104,105,110,111,115,47,112,104,112,77,81,84,84,47,101,120,97,109,112,108,101,115,47,112,117,98,108,105,115,104,116,101,115,116,1>>, error: {{badmatch,0}, [{rabbit_mqtt_frame,parse_frame,3,[{file,"src/rabbit_mqtt_frame.erl"},{line,108}]},{rabbit_mqtt_reader,parse,2,[{file,"src/rabbit_mqtt_reader.erl"},{line,319}]},{rabbit_mqtt_reader,process_received_bytes,2,[{file,"src/rabbit_mqtt_reader.erl"},{line,268}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1050}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}

And Rabbitmq Configuration:

mqtt.listeners.tcp.default = 1883
## Default MQTT with TLS port is 8883
# mqtt.listeners.ssl.default = 8883

# anonymous connections, if allowed, will use the default
# credentials specified here
mqtt.allow_anonymous  = true
mqtt.default_user     = guest
mqtt.default_pass     = guest

mqtt.vhost            = /
mqtt.exchange         = amq.topic
# 24 hours by default
mqtt.subscription_ttl = 86400000
mqtt.prefetch         = 10

# TCP Listeners
mqtt.listeners.tcp.1 = 127.0.0.1:1883
mqtt.listeners.tcp.2 = ::1:1883

mqtt.tcp_listen_options.backlog = 4096
mqtt.tcp_listen_options.recbuf  = 131072
mqtt.tcp_listen_options.sndbuf  = 131072

mqtt.tcp_listen_options.keepalive = true
mqtt.tcp_listen_options.nodelay   = true

mqtt.tcp_listen_options.exit_on_close = true
mqtt.tcp_listen_options.send_timeout  = 120

Connection Attempt:

michaelklishin commented 5 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes that we have a certain amount of information to work with.

Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you're observing and sharing as much relevant information as possible on the list:

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have a complete enough understanding of what's going on, a recommendation will be provided or a new issues with more context will be filed.

Thank you.

michaelklishin commented 5 years ago

The message says that the parser could not handle the payload. Without a runnable example that can be used to reproduce and any RabbitMQ version information we cannot suggest much.

rmathias86 commented 5 years ago

@TNChalise did you find a solution for this problem? I'm facing the same situation here.

TNChalise commented 4 years ago

@rmathias86 Yes, after I enable ssl.