[rabbitmq-discuss] C# client and Ubuntu RabbitMQ Server access_denied

Damián Bacalov bdamian at gmail.com
Mon May 26 15:37:00 BST 2014


Hi all,

I'm having problems trying to send messages from a C# client to a RabbitMQ 
server on a Ubuntu Machine (default settings).

*This is my C# code:*
            var factory = new ConnectionFactory();
            factory.UserName = "admin";
            factory.Password = "password"; 
            factory.VirtualHost = "/";
            factory.Protocol = Protocols.FromEnvironment();
            factory.HostName = "192.168.20.6";
            factory.Port = AmqpTcpEndpoint.UseDefaultPort;
            IConnection connection = factory.CreateConnection();

*The server log (on the Ubuntu server) shows:*
=ERROR REPORT==== 26-May-2014::11:10:47 ===
closing AMQP connection <0.10933.9> (192.168.20.4:22780 -> 
192.168.20.6:5672):
{handshake_error,starting,0,
                 {amqp_error,access_refused,
                             "PLAIN login refused: user 'guest' - invalid 
credentials",
                             'connection.start_ok'}}


The odd thing is that form the same windows machine, *if I use the Java 
client, all works great with the following code (using STS)*:

ConnectionFactory factory = new ConnectionFactory();
factory.setHost("192.168.20.6");
factory.setUsername("admin");
factory.setPassword("password");
                factory.setVirtualHost("/");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
String message = "Hello World!";
channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
System.out.println(" [x] Sent '" + message + "'");
channel.close();
connection.close();

So, is not a credentials nor networking problem. Is the C# client. I've 
tried with 2.0 and 3.0 client with the exactly same result.

Could you help me to connect from a C# client to a Linux RabbitMQ server?
Thanks a lot.
D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140526/85fa4469/attachment.html>


More information about the rabbitmq-discuss mailing list