Invocation service kraschar

Supportfrågor för server och klient (Windows, iPhone, Android, Linux).
Forum rules
För att kunna hjälpa dig med supportfrågor behöver vi så mycket information som möjligt.
Innan du skapar en ny tråd, läs gärna:
viewtopic.php?f=10&t=20
Post Reply
fabz
3 stars
3 stars
Posts: 140
Joined: Fri 19 Aug 2011, 10:23

Invocation service kraschar

Post by fabz » 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:

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.
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:

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"
Vad kan vara fel tros? :?

Martin
Administrator
Administrator
Posts: 2655
Joined: Tue 09 Nov 2010, 20:25

Re: Invocation service kraschar

Post by Martin » Thu 21 Jun 2012, 20:11

Om man startar om en av Switch Kings tjänster utan att stänga alla tjänster så kan detta uppstå. Det verkar som om tjänsterna inte stoppar ordentligt innan de skjuts igång igen.

Om du kör Telldus Center 2.1.1 bör du dock kunna ta bort beroendet mellan Switch King och Telldus Center. När jag har labbat på senare tid så innebär nämligen inte en omstart av Telldus Center att även Switch King måste startas om.

Om du går in i Regedit under:

Code: Select all

Computer/HKEY_LOCAL_MACHINE/System/CurrentControlSet/services/SwitchKingFrameworkService
så kan du ta bort (eller döpa om) nyckeln

Code: Select all

DependOnService
Då kommer inte Switch King att stoppa när Telldus Center startas om. I nästa version så kommer detta beroende också att försvinna, vilket gör att man kan starta om Telldus Center oberoende av Switch King.
Martin | Switch King

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests