Reputation: 4188
I've been running NSB locally for a while and everything worked! When it came time to move it to the servers, I seem to have a distributor / worker architecture in place for scalability. However, when running NSB on the server distributor, OR worker, it gives me an error I can't seem to understand or get around :
Unhandled Exception: System.InvalidOperationException: Host doesn't support host
ing of multiple endpoints. Endpoint classes found: Namespace.EndpointCo
nfig, Namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null,
Namespace.EndpointConfig, Namespace, Version=1.0.0.0, Culture
=neutral, PublicKeyToken=null You may have some old assemblies in your runtime d
irectory. Try right-clicking your VS project, and selecting 'Clean'.
at NServiceBus.Hosting.Windows.EndpointTypeDeterminer.AssertThatNotMoreThanOn
eEndpointIsDefined(List`1 endpointConfigurationTypes) in y:\BuildAgent\work\31f8
c64a6e8a2d7c\src\NServiceBus.Hosting.Windows\EndpointTypeDeterminer.cs:line 150
at NServiceBus.Hosting.Windows.EndpointTypeDeterminer.GetEndpointConfiguratio
nType(HostArguments arguments) in y:\BuildAgent\work\31f8c64a6e8a2d7c\src\NServi
ceBus.Hosting.Windows\EndpointTypeDeterminer.cs:line 81
at NServiceBus.Hosting.Windows.Program.Main(String[] args) in y:\BuildAgent\w
ork\31f8c64a6e8a2d7c\src\NServiceBus.Hosting.Windows\Program.cs:line 41
I'm configuring my endpoint like this:
public class EndpointConfig : IConfigureThisEndpoint, AsA_Server,
IWantCustomInitialization
{
My endpoint looks like this:
<add Assembly="HEC.Messages" Endpoint="hec.messageservice@servername" />
The command I'm running to generate this error is...
E:\Services\NServiceBus.Host.exe /install ABC.messageservice
/username:domain\ouruser /password:value NServiceBus.Distributor
NServiceBus.Production NServiceBus.PerformanceCounters
I have no idea what I'm doing wrong here, or what's causing the error for that matter. I suspect my endpoint isn't configured correctly, but am unsure of what to change, I tried following the guides on NSB's site to set up distributor / worker with no luck.
Upvotes: 2
Views: 1859
Reputation: 21
Check your namespace in the endpoint config.
I commented on the endpoint config in one of the shared projects and it works for me.
Upvotes: 0
Reputation: 3258
For me, the message was referencing two different projects, and the problem was that I had referenced one project with another. I removed the reference and stopped getting the error.
Upvotes: 0
Reputation: 579
For me, the problem was I had renamed/moved namespaces, and even after a clean
the old build files still hung around. Had to go into /bin
and /obj
folders to delete them manually.
Upvotes: 1
Reputation: 28046
It looks like the host is finding two implementations of EndPointConfig. From the error message, they both seem to be named the same, and in the same namespace.
Verify that you have only one implementation of IConfigureThisEndpoint in your code. Also, make sure to clean out your bin/runtime directory to ensure that the host is not finding more than one. The latter seems to be the more likely problem based on your error message.
Upvotes: 2