Hello all
I have a self-hosted web service where I use TopShelf to install the application as a service. Generally this works very well however I have a problem, when the whole server hosting the service is restarted. Very often in this case the service is not started. In the Windows log I have the following entries:
1. A timeout was reached (30000 milliseconds) while waiting for the Name.Service service to connect.
2. The PoolAdmin.Backend.Service service failed to start due to the following error: The service did not respond to the start or control request in a timely Fashion.
In the application log I have the following entries in cases when the servcie does not start:
2015-03-06 00:17:56.4839 Info --> Configuration Result:
[Success] Name Bane.Service
[Success] ServiceName Name.Service
2015-03-06 00:17:56.9839 Info --> Topshelf v3.1.135.0, .NET Framework v4.0.30319.34209
2015-03-06 00:17:58.2183 Info --> Creating server at https://srv-test-285/
Normally I have some more entries when my service is started:
2015-03-06 09:30:57.2568 Info --> Starting as a Windows service
2015-03-06 09:30:57.2881 Info --> [Topshelf] Starting
2015-03-06 09:30:57.4443 Info --> Starting backend 'backend' with connection string 'xy'
… and then some more application log
It seems that in this special cases the internal call to tc.Start() is not executed (this would directly write the red log entry). So instanciating the servcie seems to be the problem (the blue log Comes from the service constructor).
x.Service<Service>(s =>
{
s.ConstructUsing(tc => new Service(baseAddress));
s.WhenStarted(tc => tc.Start());
s.WhenStopped(tc => tc.Stop());
});
I do not have any additional messages in the log or exceptions. So what exactly is happening? Why does the service not start? Is there a way to get some more logging information out of TopShelf?
Philipp
--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.