[rabbitmq-discuss] Upgraded RabbitMQ and now nothing works

Bernhard Mogens Ege bme at saseco.dk
Mon Jan 28 12:43:05 GMT 2013


I have just upgraded my RabbitMQ server from 2.8.7 to 3.0.1 (and erl from 15b02 to 15b03). But now my RabbitMQ clients cannot communicate with the server anymore and I am completely in the dark as to why. This is the error I get:

Unhandled Exception: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.Impl.ConnectionBase.System.IDisposable.Dispose()
   at SendBifrostCommand.Program.sendCommand(String routingKey, IDictionary headers, Byte[] payload) in C:\Users\bme\Documents\Visual Studio 2010\Projects\SendBifrostCommand\SendBifrostCommand\Program.cs:line 97
   at SendBifrostCommand.Program.GetGatewayStatus(String gateway_id) in C:\Users\bme\Documents\Visual Studio 2010\Projects\SendBifrostCommand\SendBifrostCommand\Program.cs:line 66
at SendBifrostCommand.Program.Main(String[] args) in C:\Users\bme\Documents\Visual Studio 2010\Projects\SendBifrostCommand\SendBifrostCommand\Program.cs:line 35

All I do is try to send a message (error is happening in BasicPublish):

        static void sendCommand(string routingKey, IDictionary headers, byte[] payload)
        {
            const string EXCHANGE_NAME = "bifrost";
            const string AMQPURI = "amqp://127.0.0.1:5672/";

            ConnectionFactory factory = new ConnectionFactory { Uri = AMQPURI };

            using (IConnection connection = factory.CreateConnection())
            {
                using (IModel channel = connection.CreateModel())
                {
                    channel.ExchangeDeclare(EXCHANGE_NAME, ExchangeType.Topic, false, true, null);
                    channel.BasicReturn += (o, e) =>
                    {
                        Console.WriteLine("Command was not received: " + System.Text.Encoding.UTF8.GetString(e.Body) + " " + e.ReplyText.ToString());
                    };
                    IBasicProperties bp = channel.CreateBasicProperties();
                    bp.ContentEncoding = "utf-8";
                    bp.Headers = headers;
                    channel.BasicPublish(EXCHANGE_NAME, routingKey, false, true, bp, payload);
                }
            }
        }

This used to work fine with 2.8.7 but not anymore. Has RabbitMQ server changed so much?

Thanks,

Bernhard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130128/210858ca/attachment.htm>


More information about the rabbitmq-discuss mailing list