Unable to connect to RabbitMq from different server

86 views
Skip to first unread message

Sini Venugopal

unread,
Mar 5, 2021, 9:02:20 AM3/5/21
to masstransit-discuss
Hello, in my .net application am using masstransit to connect to rabbitMQ cluster. Everything works well when application and rabbitMQ are on same server. When rabbitMQ is deployed as container in seperate server, application fails to connect. Receives Broker unreachable error.   Any sugegstions what am missing here?

 Thank you!!

Chris Patterson

unread,
Mar 5, 2021, 10:39:56 AM3/5/21
to masstrans...@googlegroups.com
are you configuring the host in the UsingRabbitMq() configuration, via cfg.Host("hostname")? 

It defaults to localhost if not specified. I'd suggest referring to the documentation.


On Fri, Mar 5, 2021 at 8:02 AM 'Sini Venugopal' via masstransit-discuss <masstrans...@googlegroups.com> wrote:
Hello, in my .net application am using masstransit to connect to rabbitMQ cluster. Everything works well when application and rabbitMQ are on same server. When rabbitMQ is deployed as container in seperate server, application fails to connect. Receives Broker unreachable error.   Any sugegstions what am missing here?

 Thank you!!

"Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender, delete the material from any computer and destroy all copies. Nothing in this email message or any attachment hereto constitutes a binding offer, acceptance, agreement or legal commitment by Qwikcilver Solutions Private Limited unless the same is explicitly stated in the email message."

"Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender, delete the material from any computer and destroy all copies. Nothing in this email message or any attachment hereto constitutes a binding offer, acceptance, agreement or legal commitment by Qwikcilver Solutions Private Limited unless the same is explicitly stated in the email message."

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/b47262ed-27df-464a-8111-8ff7e8ba1c68n%40googlegroups.com.

Sini Venugopal

unread,
Mar 5, 2021, 11:20:10 AM3/5/21
to masstransit-discuss
Am using below method. With the rabbitMQHost lije 'rabbitmq://clustername/vhost' and hostnames  as ip addresses. 
do you suggest any change here? 

public static IBusControl CreateBus()
        {
            return Bus.Factory.CreateUsingRabbitMq(x =>
            {
                x.Host(new Uri(rabbitMQHost), h =>
                {
                    h.Username(queueUserName);
                    h.Password(queuePassword);

                    if (hasCluster)
                    {
                        h.UseCluster(c =>
                        {
                            if (!string.IsNullOrEmpty(hostNames))
                            {
                                string[] hostnames = hostNames.Split(';');
                                c.ClusterMembers = hostnames;
                            }
                        });
                    }
                });

Chris Patterson

unread,
Mar 5, 2021, 3:09:09 PM3/5/21
to masstrans...@googlegroups.com
I don't have any idea, sounds like a networking issue.

Sini Venugopal

unread,
Mar 6, 2021, 12:07:38 AM3/6/21
to masstransit-discuss
ok, Have opened the port 5672 on the linux server where rabbitMq is installed? Is there any additional setting required?

Thank you

Reply all
Reply to author
Forward
0 new messages