question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"None of the specified endpoints were reachable", "connection.start was never received, likely due to a network timeout"

See original GitHub issue

We are trying to publish a message to a queue to RabbitMQ. We are using .NET Framework 4.7.2. We are having issues with the code below:

var connection = new ConnectionConfiguration()
{
    UserName = "guest",
    Password = "guest",
    VirtualHost = "/",
    PrefetchCount = 1
};

var host = new HostConfiguration()
{
    Host = "localhost",
    Port = 5672,
};

connection.Hosts = new List<HostConfiguration> { host };

using (var bus = RabbitHutch.CreateBus(connection, x =>
{
    x.Register<IConventions>(c => new ErrorConventions(c.Resolve<ITypeNameSerializer>()));
}))
{
    var exchange = bus.Advanced.ExchangeDeclare("ex", ExchangeType.Direct);
    bus.Advanced.Publish(exchange, "test", false, new Message<object>(data));
}

We are using ASP.NET and this code works as expected when we execute it in an .aspx page. However, the exact same code does not work when we execute it through an API function and we always end up getting the following exception: image

We are unable to figure out why the exact same code works in the .aspx pages but not in our API.

We are using the following setup for our queue and exchange: image image

  • EasyNetQ version: 6.5.2
  • RabbitMQ version: 3.11.15

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zidadcommented, May 11, 2023

looks like a “normal” connectivity problem, can’t really say something useful without a reproducible sample with code, can you provide that?

0reactions
AkyrosXDcommented, May 11, 2023

yes, it;'s fine. thank you anyway 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

RabbitMQ Connection Error " None of the specified ...
BrokerUnreachableException: None of the specified endpoints were reachable\r\n","stream":"stdout","time":"2022-04-04T08:26:55.7889752Z"} ...
Read more >
RabbitMQ.Client.Exceptions.BrokerUnreachableException: ...
IO.IOException: connection.start was never received, likely due to a network timeout at RabbitMQ.Client.Framing.Impl.Connection.
Read more >
[RabbitMQ Test] None of the specified end points are ...
[RabbitMQ Test] None of the specified end points are reachable. ... connection.start was never received, likely due to a network timeout.
Read more >
Cannot connect to RabbitMQ server after upgrading .net ...
3 and the client cannot connect to the server anymore saying "connection.start was never received, likely due to a network timeout". Stacktrace ...
Read more >
RabbitMQ.Client.Exceptions.BrokerUnreachableException
Message=None of the specified endpoints were reachable ... SocketException: No connection could be made because the target machine actively refused it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found