Hey guys,
weird error I'm seeing. I've written a monitoring service that simply checks the health of the RabbitMQ cluster. While everything work fine in Debug, and also when I install the service on my Win7 dev machine, when I move over to installing it to a Win2008R2 server, things break when I try to start the service.
I can install the service, as an admin account user, and I can also run:
> service.exe run
and it works fine. But when I try
> service.exe start
I get the following error:
PS G:\.......\Release> .\service.exe start
Configuration Result:
[Success] Name service_name
[Success] DisplayName service display name
[Success] Description service description
[Success] ServiceName rabbitmq_cluster_monitor
Topshelf v3.1.135.0, .NET Framework v4.0.30319.18408
Topshelf.Hosts.StartHost Error: 0 : The service failed to start., System.InvalidOperationException: Cannot start service
service_name on computer '.'. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
--- End of inner exception stack trace ---
at System.ServiceProcess.ServiceController.Start(String[] args)
at System.ServiceProcess.ServiceController.Start()
at Topshelf.Runtime.Windows.WindowsHostEnvironment.StartService(String serviceName, TimeSpan startTimeOut)
at Topshelf.Hosts.StartHost.Run()
I don't get a different behaviour if I run:
PS G:\.......\Release> .\service.exe start --sudo
In fact it doesn't pop up the UAC to add credentials (I'm guessing since I'm already an admin?)
I don't understand what's special about this 2008 server.
I should mention that I'm running it as a LocalService via Topshelf.
Thanks,
Christos