{"No compatible authentication mechanism found - server offered [ANONYMOUS]"} on RabbitMQ tutorial

763 views
Skip to first unread message

Mike Johnson

unread,
Feb 15, 2017, 5:17:00 PM2/15/17
to rabbitmq-users
//   Hi all! I'm a little stuck. I keep getting back this error: {"No compatible authentication mechanism found - server offered [ANONYMOUS]"} when trying to connect to our development databus.
//   I don' have the specifics for the databus, as it's with a different group -- but I still feel like this should work (?)
//   It fails on trying to create the connection (inside the first using statement). Any pointers or help would be greatly appreciated!

var factory = new ConnectionFactory() { HostName = "xxxx", UserName = "xxx", Password = "xxx"};
       
        using(var connection = factory.CreateConnection())
        using(var channel = connection.CreateModel())
        {
            channel.QueueDeclare(queue: "hello", durable: false, exclusive: false, autoDelete: false, arguments: null);

            string message = "Hello World!";
            var body = Encoding.UTF8.GetBytes(message);

            channel.BasicPublish(exchange: "", routingKey: "hello", basicProperties: null, body: body);
            Console.WriteLine(" [x] Sent {0}", message);
        }

        Console.WriteLine(" Press [enter] to exit.");
        Console.ReadLine();

Michael Klishin

unread,
Feb 15, 2017, 5:22:00 PM2/15/17
to rabbitm...@googlegroups.com, Mike Johnson
ANONYMOUS is not an authentication mechanism that RabbitMQ or Pivotal maintained plugins offer:
http://www.rabbitmq.com/authentication.html

So yeah, knowing the specifics of your server is pretty important. And allowing anonymous "authentication"
is… not a very wise idea.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages