[rabbitmq-discuss] MQTT login failed for "guest" access_refused even after mentioning loopback_users

Ankur5 C ankur5.c at tcs.com
Fri Jul 18 10:42:08 BST 2014


Also sharing my client code : Do I need to use any user name and password
at the client end?

try {

			client = new MqttClient(
"tcp://ec2-54-179-77-171.ap-southeast-1.compute.amazonaws.com:1883",
"AmazonTest");

			client.connect();

			System.out.println("Connection status :: "+client
.isConnected());

			int i=0;
			MqttMessage message = new MqttMessage();
			while(true){
				try {
					i++;
					Thread.sleep(1000);
					message.setPayload(("Hii I am Raspberry
PI!!!"+Integer.toString(i)).getBytes());
					client.publish("Raspberry/test", message);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}


		} catch (MqttException e) {
			e.printStackTrace();
		}
	}

Thanks and Regards,
Ankur Chakraborty
Tata Consultancy Services
Mailto: ankur5.c at tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.	IT Services
			Business Solutions
			Consulting
____________________________________________



From:	Ankur5 C/KOL/TCS
To:	Michael Klishin <mklishin at gopivotal.com>
Cc:	Legacy list about RabbitMQ
            <rabbitmq-discuss at lists.rabbitmq.com>
Date:	18-07-2014 14:46
Subject:	Re: [rabbitmq-discuss] MQTT login failed for "guest"
            access_refused even after mentioning loopback_users


Thanks , I am going to use a new user. Is it the right way . This time I am
getting Bad user name or password (4). How to set up a new user ?

[{rabbit,        [{tcp_listeners,    [5672]},{ssl_listeners, [5671]},
			{ssl_options,
[{cacertfile,"/etc/rabbitmq/testca/cacert.pem"},
                    {certfile,"/etc/rabbitmq/server/cert.pem"},
                    {keyfile,"/etc/rabbitmq/server/key.pem"},
                    {verify,verify_peer},
			{fail_if_no_peer_cert,false}]}]},
 {rabbitmq_mqtt, [{default_user,     <<"cto">>},
                  {default_pass,     <<"cto">>},
			{allow_anonymous,  true},
                  {vhost,            <<"/">>},
                  {subscription_ttl, 1800000},
                  {prefetch,         10},
                  {ssl_listeners,    [8883]},
                  {tcp_listeners,    [1883]},
                  {tcp_listen_options, [binary,
                                        {packet,    raw},
                                        {reuseaddr, true},
                                        {backlog,   128},
                                        {nodelay,   true}]}]}
].

Thanks and Regards,
Ankur Chakraborty





From:	Michael Klishin <mklishin at gopivotal.com>
To:	Ankur5 C <ankur5.c at tcs.com>
Cc:	Legacy list about RabbitMQ
            <rabbitmq-discuss at lists.rabbitmq.com>
Date:	18-07-2014 14:33
Subject:	Re: [rabbitmq-discuss] MQTT login failed for "guest"
            access_refused even after mentioning loopback_users



On 18 July 2014 at 13:00:44, Ankur5 C (ankur5.c at tcs.com) wrote:
> > {loopback_users, []}

loopback_users is a RabbitMQ server config setting, not the MQTT plugin.

The example on http://www.rabbitmq.com/access-control.html includes it in
the "rabbit" app config.

It is also highly recommended to use a new user with non-obvious
credentials
rather than enabling remote access for "guest".
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you





More information about the rabbitmq-discuss mailing list