Gateway in Azure Service Fabric - Reply channels

41 views
Skip to first unread message

ad...@prairieapps.com

unread,
Sep 21, 2017, 6:05:43 PM9/21/17
to particula...@googlegroups.com
Helpful information to include
Product name: Gateway
Version: 2.0.1

We have a service fabric service that is experiencing an error health state once upgrading our Gateway package to the new 2.0.1 version that supports wildcards URI's.

We originally got the warning that "Default channel http://+:22000/endpoint/ is using a wildcard URI. Please add an extra channel with a fully qualified non-wildcard URI in order for replies to be transmitted properly"

After reading this PR thread (https://github.com/Particular/NServiceBus.Gateway/pull/66), the solution seems to be creating a dummy channel to avoid the exception (we aren't using reply, just a one-way gateway)

Our Gateway configuration now looks like this:

public NServiceBus.Config.GatewayConfig GetConfiguration()
       
{
           
return new NServiceBus.Config.GatewayConfig
           
{
               
TransactionTimeout = TimeSpan.FromMinutes(10),
               
Channels = new ChannelCollection
               
{
                   
new ChannelConfig
                   
{
                       
Address = "http://ourdomain.ca:22000/endpoint/",
                       
ChannelType = "http",
                       
Default = true
                   
},
                   
new ChannelConfig
                   
{
                       
Address = "http://+:22000/endpoint/",
                       
ChannelType = "http"
                   
}
               
}
           
};
       
}



Although now we are getting the exception "Failed to start listener for http://ourdomain.ca:22000/endpoint/ make sure that you have admin privileges". This causes our service to enter an error health state. Oddly enough, it seems like the gateway is open and accepting messages, but the health states are an issue.

I know there was a discussion in the same thread about creating a configuration option for disabling replies in a Gateway, but I'm not sure if that went anywhere.

Any insight is greatly appreciated.

Jan Ove Skogheim

unread,
Sep 22, 2017, 7:58:50 AM9/22/17
to Particular Software
Hi, Adam!

TL;DR: netsh http add urlacl url=http://ourdomain.ca:22000/endpoint/ user=DOMAIN\user

Windows denies non-administrator access to all HTTP namespaces by default. Use the netsh command to configure which user is allowed to listen to incoming HTTP requests for specific URL/namespace.

Run 'netsh http add urlacl url=http://ourdomain.ca:22000/endpoint/ user=DOMAIN\user' in a cmd/Powershell window with administrator rights. Substitute relevant domain and user. Run the command once on each machine hosting the endpoint.

More info:  https://docs.particular.net/nservicebus/gateway/troubleshooting#corrupted-urlacls

Hope that helps!

Regards,
Jan Ove Skogheim
Reply all
Reply to author
Forward
0 new messages