Rabbitmq MQTT Bad username or bad password -


i installed rabbit mq on ubuntu 16.04 server. after that, enabled plugins mqtt rabbitmq. in rabbitmq-plugins list can see mqtt plugin enabled , running on server.

i added following configuration file mqtt @ location

/etc/rabbitmq/rabbitmq.config 

and restarted server:

[{rabbit,        [{tcp_listeners,    [5672]}]},  {rabbitmq_mqtt, [{default_user,     <<"myuser">>},               {default_pass,     <<"mypass">>},               {allow_anonymous,  false},               {vhost,            <<"/">>},               {exchange,         <<"amq.topic">>},               {subscription_ttl, 1800000},               {prefetch,         10},               {ssl_listeners,    []},               %% default mqtt tls port 8883               %% {ssl_listeners,    [8883]}               {tcp_listeners,    [1883]},               {tcp_listen_options, [{backlog,   128},                                     {nodelay,   true}]}]} ]. 

now when trying publish message rabbitmq server like:

import paho.mqtt.publish publish import paho.mqtt.client mqtt  publish.single('/',   payload='hello world',   hostname='xxx.xxx.xxx.xxx', # servers ip address   auth={'username':'myuser', 'password':'mypass'},   port=1883, protocol=mqtt.mqttv311) 

it gives me error:

paho.mqtt.mqttexception: connection refused: bad user name or password.

there no encryption now. doing wrong?

i tried same procedure mosquitto mqtt broker , worked fine. think issue rabbitmq configuration.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -