Reputation: 2305
I am trying to get a connection to an azure service bus queue 'queue1' with AMQP following the post How to use AMQP 1.0 with the Service Bus .NET API.
In the azure management portal, I can see that the queue 'queue1' was successfully created and if I omit the connection string extension 'TransportType=Amqp' the connection does work. But as soon as I want to use amqp by adding the property 'TransportType' to the connection string I get an exception that the target computer (thus azure) refuses connection.
I searched other blogs but all of them just say "Create a queue, add the transport type property and off you go..." - sound easy but does unfortunately not work for me.
In a few on premises posts something about a runtime port 5671 is mentioned but that does not help either.
Any suggestions? Thanks a lot!
Upvotes: 0
Views: 1107
Reputation: 2305
After opening the ports 5671, 5672, 5760, 5761, 5762, 9350, 9354 on my windows firewall did not help and after disabling the windows firewall completely for debugging did not work, I just tried it with a mobile as a hotspot to work around the company network and now it is working with just adding 'TransportType=Amqp' at the end of the connection string. Modifying default ports is not necessary. I have to talk with the IT guys now... :)
So, if you get the message "No connection could be made because the target machine actively refused it" or in German "Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte" check your firewall...
A nice link worth mentioning: "Windows Azure Service Bus AMQP Firewall Ports":
This indicates a firewall issue. You should then look at opening some TCP ports for outgoing Communication.
EDIT:
An interesting alternative is to use
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;
as mentioned here: How to send messages to Azure Service Bus over Port 80?
Although there seems to be a performance issue:
[...] though its deadly slow and not sure if reliable for large volume of messages
Upvotes: 1