Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

2.8K
Vistas
RabbitMQ: None of the specified endpoints were reachable

My rabbitmq application is running on windows 2012 server, randomly I use to get this error.

Exception Type: RabbitMQ.Client.Exceptions.BrokerUnreachableException



None of the specified endpoints were reachable

   at RabbitMQ.Client.ConnectionFactory.CreateConnection()

   at Program.Main(String[] args)

Stream does not support writing.

   at System.IO.BufferedStream.EnsureCanWrite()

   at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)

   at RabbitMQ.Client.Impl.SocketFrameHandler.SendHeader()

   at RabbitMQ.Client.Framing.Impl.Connection.StartAndTune()

   at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist)

   at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)

   at RabbitMQ.Client.Framing.Impl.ProtocolBase.CreateConnection(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)

   at RabbitMQ.Client.ConnectionFactory.CreateConnection()

What could be the reason of failing the connection randomly, and automatically it starts connecting.

Can anyone help me out in this.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I had this problem, and finally I could solve it by adding the "Ssl" property of the ConnectionFactory class, with the "ServerName" sub-property specified.

Here is what I did, and it connected to the Rabbit MQ server. Please pay attention to the "ServerName" part of the code below:

var rabbitMqConnectionFactory
    = new ConnectionFactory
        {
            HostName = rabbitMqHostName,
            Port = rabbitMqPort,
            UserName = rabbitMqUserName,
            Password = rabbitMqPassword,
            VirtualHost = rabbitMqVirtualHost,
            RequestedHeartbeat = 60,
            Ssl =
                {
                    **ServerName** = rabbitMqHostName,
                    Enabled = useSsl
                }
        };
over 4 years ago · Santiago Trujillo Denunciar

0

It's hard to say whats the exactly problem, but one of the reason that cause to occur such issue is RabbitMQ heart beat, you can change this value. for more information you can check this linke Detecting Dead TCP Connections with Heartbeats

ConnectionFactory cf = new ConnectionFactory();

// set the heartbeat timeout to 60 seconds
cf.setRequestedHeartbeat(60);
over 4 years ago · Santiago Trujillo Denunciar

0

I have had the same problem and I solved it by creating new RabbitMQ Docker Container with docker compose:

 rabbitmq:
    container_name: rabbitmq
    tty: true
    hostname: rabbitmq
    ports:
      - "15672:15672"
      - "5672:5672"
    image: rabbitmq:3-management
    environment:
      - RABBITMQ_DEFAULT_USER=user
      - RABBITMQ_DEFAULT_PASS=password

And to access it with trough the code I had to set in my appsettings.json file the host as the my localhost IP Address:

"RabbitMqSend": {
"Hostname": "192.168.0.12",
"QueueName": "SendQueue",
"UserName": "user",
"Password": "password"},

With this it worked for me.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda