Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.07k stars 647 forks source link

When hosting on premise with "AzureServiceBus" transport and not explicitly supplying timeout or subscription providers causes errors. #1448

Closed CallumHibbert closed 11 years ago

CallumHibbert commented 11 years ago

When hosting on premise with "AzureServiceBus" transport and not explicitly supplying timeout or subscription providers causes errors.

NSB v4.0.2

Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'Autofac.Core.DependencyResolutionException' in assembly 'NServiceBus.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c' is not marked as serializable. at Topshelf.Internal.ServiceControllerProxy.Start() at Topshelf.Internal.ServiceCoordinator.Start() in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ServiceCoordinator.cs:line 54 at Topshelf.Internal.Hosts.ConsoleHost.Run() in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\Hosts\ConsoleHost.cs:line 53 at NServiceBus.Hosting.Windows.Program.Main(String[] args) in c:\TeamCity\buildAgent\work\d4de8921a0aabf04\src\hosting\NServiceBus.Hosting.Windows\Program.cs:line 139

This is actually hiding an underlying exception, starting in the debugger yields the following information:

Exception: Microsoft.WindowsAzure.Storage.StorageException - "Unable to connect to the remote server" Inner exception: System.Net.WebException - "Unable to connect to the remote server" Inner exception: System.Net.Sockets.SocketException - "No connection could be made because the target machine actively refused it 127.0.0.1:10002"

What is happening is that NSB is automatically trying to use Azure Table Storage as a persistence mechanism. If you are running on premise (even if using Azure Service Bus transport) this is surprising, I would expect NSB to default to Raven as it does with other on premise scenarios.

CallumHibbert commented 11 years ago

Please see "http://tech.groups.yahoo.com/group/nservicebus/message/20061" for full history.

andreasohlund commented 11 years ago

Confirmed as an issue

yvesgoeleven commented 11 years ago

This is the default configuration when hosting in azure, which indeed makes no sense when hosting on premises, how can we split this? How do we know the user's intent while autoconfiguring everything, without changing the behaviour in azure?

SimonCropp commented 11 years ago

moved to https://github.com/Particular/NServiceBus.Azure/issues/11