<div dir="ltr">Hi all,<div><br></div><div>I'm having problems trying to send messages from a C# client to a RabbitMQ server on a Ubuntu Machine (default settings).</div><div><br></div><div><b>This is my C# code:</b></div><div><div>            var factory = new ConnectionFactory();</div><div>            factory.UserName = "admin";</div><div>            factory.Password = "password"; </div><div>            factory.VirtualHost = "/";</div><div>            factory.Protocol = Protocols.FromEnvironment();</div><div>            factory.HostName = "192.168.20.6";</div><div>            factory.Port = AmqpTcpEndpoint.UseDefaultPort;</div><div>            IConnection connection = factory.CreateConnection();</div></div><div><br></div><div><b>The server log (on the Ubuntu server) shows:</b></div><div><div>=ERROR REPORT==== 26-May-2014::11:10:47 ===</div><div>closing AMQP connection <0.10933.9> (192.168.20.4:22780 -> 192.168.20.6:5672):</div><div>{handshake_error,starting,0,</div><div>                 {amqp_error,access_refused,</div><div>                             "PLAIN login refused: user 'guest' - invalid credentials",</div><div>                             'connection.start_ok'}}</div></div><div><br></div><div><br></div><div>The odd thing is that form the same windows machine, <b>if I use the Java client, all works great with the following code (using STS)</b>:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre;">            </span>ConnectionFactory factory = new ConnectionFactory();</div><div><span class="Apple-tab-span" style="white-space:pre">         </span>factory.setHost("192.168.20.6");</div><div><span class="Apple-tab-span" style="white-space:pre">           </span>factory.setUsername("admin");</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>factory.setPassword("password");</div><div>                factory.setVirtualHost("/");</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>Connection connection = factory.newConnection();</div><div><span class="Apple-tab-span" style="white-space:pre">             </span>Channel channel = connection.createChannel();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>channel.queueDeclare(QUEUE_NAME, false, false, false, null);</div><div><span class="Apple-tab-span" style="white-space:pre">         </span>String message = "Hello World!";</div><div><span class="Apple-tab-span" style="white-space:pre">           </span>channel.basicPublish("", QUEUE_NAME, null, message.getBytes());</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>System.out.println(" [x] Sent '" + message + "'");</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>channel.close();</div><div><span class="Apple-tab-span" style="white-space:pre">             </span>connection.close();</div></div><div><br></div><div>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.</div><div><br></div><div>Could you help me to connect from a C# client to a Linux RabbitMQ server?</div><div>Thanks a lot.</div><div>D.</div></div>