[rabbitmq-discuss] Getting “None of the specified endpoints were reachable”

Price, John John.Price at basware.com
Tue Jul 9 14:36:32 BST 2013


Hello,

I have some C# code that works most of the time, but occasionally errors when trying to connect to a broker.  Once this error happens service needs restarting to continue.

I get exception “None of the specified endpoints were reachable”
With inner exception “System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.     at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)     at System.Threading.Thread.Start(StackCrawlMark& stackMark)     at System.Threading.Thread.Start()     at RabbitMQ.Client.Impl.ConnectionBase.StartMainLoop()     at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)     at RabbitMQ.Client.Framing.Impl.v0_9_1.ProtocolBase.CreateConnection(ConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)     at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32 maxRedirects, IDictionary connectionAttempts, IDictionary connectionErrors, AmqpTcpEndpoint[]& mostRecentKnownHosts, AmqpTcpEndpoint endpoint)”


Any ideas on what is causing this? And how to prevent it.

RabbitMQ running on Windows 2008 R2 standard (64 bit)

John


private IConnection GetFileConnection()
        {
            var db = new DatabaseAccess();
            var host = ConfigurationManager.AppSettings["amqpHostName"];
            var port = ConfigurationManager.AppSettings["amqpPort"];
            _exchangeName = ConfigurationManager.AppSettings["FILE_EXCHANGE_NAME"];
            _queueName = ConfigurationManager.AppSettings["FILE_QUEUE"];
            _routingKey = _queueName;
            _contentType = "text/plain";
            db.WriteLog(1, _exchangeName + " - " + _queueName + " - " + _routingKey);

            ConnectionFactory factory;
            try
            {
                factory = ConnectToBroker(host, port);
            }
            catch (BrokerUnreachableException ex)
            {
                db.WriteLog(3, "BrokerUnreachableException - " + ex.Message);
                db.WriteLog(3, "BrokerUnreachableException - " + ex.InnerException);
                throw;
            }


            db.WriteLog(1, "connection made");

            IConnection connection = factory.CreateConnection();


            return connection;
        }


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


More information about the rabbitmq-discuss mailing list