Particular / ServiceControl

Backend for ServiceInsight and ServicePulse
https://docs.particular.net/servicecontrol/
Other
53 stars 47 forks source link

After installation Particular.NServiceBus-4.2.0-Beta2.exe #93

Closed seanfarmar closed 10 years ago

seanfarmar commented 11 years ago

After installation Particular.NServiceBus-4.2.0-Beta2.exe

ServiceControl service is not started, no logs are available.

Trying to manually run it we get :

Unhandled Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HR
ESULT: 0x80131040)
   at Autofac.Core.Registration.ComponentRegistration..ctor(Guid id, IInstanceActivator activator, IComponentLifetime lifetime, InstanceSharing sharin
g, InstanceOwnership ownership, IEnumerable`1 services, IDictionary`2 metadata)
   at Autofac.Core.Container..ctor()
   at Autofac.ContainerBuilder.Build(ContainerBuildOptions options)
   at Particular.ServiceControl.EndpointConfig.Init() in c:\BuildAgent\work\b7f882efc2cd360b\src\ServiceControl\EndpointConfig.cs:line 23
   at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0
   at NServiceBus.Hosting.GenericHost.Start() in :line 0
   at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0   at NServiceBus.Hosting.Windows.Program
.Main(String[] args) in :line 0
andreasohlund commented 11 years ago

Does it work if you install the stand alone sc installer?

Sent from my iPhone

On 3 nov 2013, at 18:58, Sean Farmar notifications@github.com wrote:

After installation Particular.NServiceBus-4.2.0-Beta2.exe

ServiceControl service is not started, no logs are available.

Trying to manually run it we get :

Unhandled Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HR ESULT: 0x80131040) at Autofac.Core.Registration.ComponentRegistration..ctor(Guid id, IInstanceActivator activator, IComponentLifetime lifetime, InstanceSharing sharin g, InstanceOwnership ownership, IEnumerable1 services, IDictionary2 metadata) at Autofac.Core.Container..ctor() at Autofac.ContainerBuilder.Build(ContainerBuildOptions options) at Particular.ServiceControl.EndpointConfig.Init() in c:\BuildAgent\work\b7f882efc2cd360b\src\ServiceControl\EndpointConfig.cs:line 23 at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0 at NServiceBus.Hosting.Windows.Program .Main(String[] args) in :line 0 — Reply to this email directly or view it on GitHub.

seanfarmar commented 11 years ago

I'm testing this now

seanfarmar commented 11 years ago

When i install it directly: [Particular.ServiceControl-1.0.0-Beta1.19.exe] it fails to start as a service AND

MSMQ doesn't get installed and that's why we get the following error when i run the host as a console

2013-11-03 19:39:00.0221|INFO|NServiceBus.Configure|Invocation of NServiceBus.Config.IFinalizeConfiguration completed in
 0.21 s

Unhandled Exception: System.InvalidOperationException: There is a problem with the input queue: FormatName:DIRECT=OS:WIN
2012-DC\private$\Particular.ServiceControl. See the enclosed exception for details. ---> System.InvalidOperationExceptio
n: Message Queuing has not been installed on this computer.
   at System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName(String pathName, StringBuilder formatName, Int32
& count)
   at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException)
   at System.Messaging.MessageQueue.get_FormatName()
   at System.Messaging.MessageQueue.get_Transactional()
   at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.QueueIsTransactional() in :line 0
   --- End of inner exception stack trace ---
   at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.QueueIsTransactional() in :line 0
   at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.Init(Address address, TransactionSettings settings, Func`2 tryProc
essMessage, Action`2 endProcessMessage) in :line 0
   at NServiceBus.Unicast.Transport.TransportReceiver.StartReceiver() in :line 0
   at NServiceBus.Unicast.Transport.TransportReceiver.Start(Address address) in :line 0
   at NServiceBus.Unicast.UnicastBus.Start(Action startupAction) in :line 0
   at NServiceBus.Hosting.GenericHost.Start() in :line 0
   at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0   at NServ
iceBus.Hosting.Windows.Program.Main(String[] args) in :line 0
seanfarmar commented 11 years ago

After insatlling MSMQ adn restarting the server, trying to start the service failed again,

The workaround (that worked for me) was to run the host from command line passing the NServiceBus.Integration profile argument... then exiting cmd.

After the queues where created the service started ok...

andreasohlund commented 11 years ago

The endpoint name needs to be "ServiceControl" since that is what the endpoint plugin defaults to. We need to make sure that the service is Particular.ServiceControl and the endpoint name is "serviecontrol".

Or change the convention in the pkugin?

@johnsimons thoughts?

Sent from my iPhone

On 3 nov 2013, at 20:45, Sean Farmar notifications@github.com wrote:

When i install it directly: [Particular.ServiceControl-1.0.0-Beta1.19.exe] it fails to start as a service AND

MSMQ doesn't get installed and that's why we get the following error when i run the host as a console

2013-11-03 19:39:00.0221|INFO|NServiceBus.Configure|Invocation of NServiceBus.Config.IFinalizeConfiguration completed in 0.21 s

Unhandled Exception: System.InvalidOperationException: There is a problem with the input queue: FormatName:DIRECT=OS:WIN 2012-DC\private$\Particular.ServiceControl. See the enclosed exception for details. ---> System.InvalidOperationExceptio n: Message Queuing has not been installed on this computer. at System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName(String pathName, StringBuilder formatName, Int32 & count) at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException) at System.Messaging.MessageQueue.get_FormatName() at System.Messaging.MessageQueue.get_Transactional() at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.QueueIsTransactional() in :line 0 --- End of inner exception stack trace --- at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.QueueIsTransactional() in :line 0 at NServiceBus.Transports.Msmq.MsmqDequeueStrategy.Init(Address address, TransactionSettings settings, Func2 tryProc essMessage, Action2 endProcessMessage) in :line 0 at NServiceBus.Unicast.Transport.TransportReceiver.StartReceiver() in :line 0 at NServiceBus.Unicast.Transport.TransportReceiver.Start(Address address) in :line 0 at NServiceBus.Unicast.UnicastBus.Start(Action startupAction) in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0 at NServ iceBus.Hosting.Windows.Program.Main(String[] args) in :line 0 — Reply to this email directly or view it on GitHub.

johnsimons commented 11 years ago

The plugin is using Particular.ServiceControl, see https://github.com/Particular/ServiceControl/blob/release-1.0.0/src/ServiceControl.EndpointPlugin/Operations/ServiceControlBackend/ServiceControlBackend.cs#L73

andreasohlund commented 10 years ago

This is now ok, we also have automated tests that proves that this works across different operating systems