Invocation service kraschar
Posted: Wed 20 Jun 2012, 09:14
Då och då slutar Switchking att svara på REST-kommandon (via webappen). SWK-klienten verkar först fungera, men reagerar inte alls vid scenaribyte och dyl. Jag kan i loggen hitta följande på flera ställen, som verkar stämma tidsmässigt bra överens med då felet uppstår:
Jag har en setup där SWK-tjänsterna, telldustjänst och eventghost startas om automatiskt var 3:e timma. Detta eftersom tellsticken annars riskerar att sluta ta emot data efter ett par timmars körning. BAT-filen som startar om ser ut så här:
Vad kan vara fel tros? 
Code: Select all
{Invocation Service - Shutdown} --<Status> -- 2012-06-20 08:47:59 -- Service shut down requested
{Invocation Service - Shutdown} --<Status> -- 2012-06-20 08:47:59 -- Service shut down gracefully
{Invocation Service - Shutdown} --<Status> -- 2012-06-20 08:48:00 -- Service shut down gracefully
{Data Collector Service - Shutdown} --<Status> -- 2012-06-20 08:48:02 -- Service shut down requested
{Data Collector Service - Shutdown} --<Status> -- 2012-06-20 08:48:26 -- Service shut down gracefully
{REST Service - Startup} --<Status> -- 2012-06-20 08:48:28 -- Opening service channel for REST.
{Invocation Service - Shutdown} --<Fatal> -- 2012-06-20 08:48:28 -- Main Thread Error. Exception:
System.InvalidOperationException
Level 1) Instance of ExternalEventMonitoring is already created.
StackTrace for Level 1:
vid SwitchKing.Server.BusinessAccess.Invocation.Monitoring.ExternalEventMonitoring.CreateInstance(IExternalEventProcessor queueProcessor)
vid SwitchKing.Server.WinSvcServiceHost.InvocationService.SetupExternalEventMonitoring(DeviceEntity deviceAccess, DeviceEventEntity deviceEventAccess, DataSourceEntity dataSourceAccess, DataSourceValueEntity dataSourceValueAccess)
vid SwitchKing.Server.WinSvcServiceHost.InvocationService.ProcessDeviceEvents()
{REST Service - Startup} --<Status> -- 2012-06-20 08:48:28 -- Service channel for REST opened.
{UnhandledExceptionController_Framework} --<Critical> -- 2012-06-20 08:48:28 -- Exception:
System.InvalidOperationException
Level 1) Instance of ExternalEventMonitoring is already created.
StackTrace for Level 1:
vid SwitchKing.Server.WinSvcServiceHost.InvocationService.ProcessDeviceEvents()
vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
vid System.Threading.ThreadHelper.ThreadStart()
{UnhandledExceptionController_Framework} --<Critical> -- 2012-06-20 08:48:28 -- Exception:
System.InvalidOperationException
Level 1) Instance of ExternalEventMonitoring is already created.
StackTrace for Level 1:
vid SwitchKing.Server.WinSvcServiceHost.InvocationService.ProcessDeviceEvents()
vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
vid System.Threading.ThreadHelper.ThreadStart()
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:34 -- Running version 2.0.3.9 of server and version 2.01 of DB.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:34 -- Build date and time for this version is 2012-02-13 21:50:31.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:34 -- Telldus version is 2.1.1.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:34 -- Validating database version and executing upgrade scripts.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:34 -- No upgrade performed. Database version is already up to date.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:35 -- Status of license is Valid.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:35 -- Opening service channel for Framework.
{Framework Service - Startup} --<Status> -- 2012-06-20 08:48:35 -- Service channel for Framework opened.
Code: Select all
taskkill /IM EventGhost.exe
taskkill /IM EventGhost.exe /f
net stop telldusservice /y
net stop "SwitchKing Hub Communicator Service" /y
net stop "SwitchKing REST Service" /y
net stop "SwitchKing Invocation Service" /y
net stop "SwitchKing Data Collector Service" /y
net stop "SwitchKing Framework Service" /y
powershell Stop-Service "telldusservice" -force
taskkill /IM TelldusService.exe
taskkill /IM TelldusService.exe /f
net start telldusservice
net start "SwitchKing Hub Communicator Service"
net start "SwitchKing REST Service"
net start "SwitchKing Invocation Service"
net start "SwitchKing Data Collector Service"
net start "SwitchKing Framework Service"
start "EventGhost" "C:\Program Files (x86)\EventGhost\EventGhost.exe" "C:\inetpub\wwwroot\cmd\mediacenter4.xml"
