Remote RabbitMQ Connection Timeout using .NET Core 2.0
See original GitHub issueI am not sure if this is due to Core 2.0 but I can run it fine on non core.
The code I am using is below.
Options
"RabbitMQ": {
"Host": "rabbitmq://192.168.160.131/",
"Username": "test",
"Password": "1"
},
Bus
var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host(new Uri(_rabbitMQOptions.Host), h =>
{
h.Username(_rabbitMQOptions.Username);
h.Password(_rabbitMQOptions.Password);
});
cfg.ReceiveEndpoint(host, nameof(TestCommand), e =>
{
e.Consumer(() =>
{
return new TestConsumer();
});
e.PrefetchCount = 2;
});
});
_logger.LogInformation("Starting bus");
busControl.Start();
_logger.LogInformation("Bus started");
_logger.LogInformation("Waiting for messages");
Command & Consumer
public class TestCommand
{
}
public class TestConsumer : IConsumer<TestCommand>
{
public TestConsumer()
{
}
public async Task Consume(ConsumeContext<TestCommand> context)
{
Console.WriteLine("Consumed");
}
}
When I run the code, it fails with
'Connect failed: test@192.168.160.131:5672/'
TimeoutException: The operation has timed out.
This issue occurs with both 3.5.7 and 4.0.0.1216-develop.
I have confirmed that I can connect fine by following the rabbitmq hello world tutorial.
Each connection creates the following log entries in rabbitmq.
=INFO REPORT==== 25-Jul-2017::05:00:19 ===
accepting AMQP connection <0.31858.0> (192.168.160.1:51098 -> 192.168.160.131:5672)
=ERROR REPORT==== 25-Jul-2017::05:00:19 ===
closing AMQP connection <0.31858.0> (192.168.160.1:51098 -> 192.168.160.131:5672):
{handshake_timeout,handshake}
Issue Analytics
- State:
- Created 6 years ago
- Comments:37 (17 by maintainers)
Top Results From Across the Web
RabbitMQ Connection Error " None of the specified ...
I created a small application using .netcore and rabbitmq and created the image in docker for both of them using below docker-compose code...
Read more >Overview
To open a connection with the .NET client, first instantiate a ConnectionFactory and configure it to use desired hostname, virtual host, credentials, TLS ......
Read more >Troubleshooting Network Connectivity
Troubleshooting Network Connectivity. Overview. This guide accompanies the one on networking and focuses on troubleshooting of network connections.
Read more >Management Plugin
Management Plugin. Overview. The RabbitMQ management plugin provides an HTTP-based API for management and monitoring of RabbitMQ nodes and clusters, ...
Read more >Java Client API Guide
The core API classes are Connection and Channel, representing an AMQP 0-9-1 ... client library failure, a remote network request or network failure....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@phatboyg I have been using the pre-release package on netcore1.1 and netcore2 without any issue. think we can close this issue.
I’m going to close this, enough have it working with core that this isn’t an MT issue.