Event Flow Debugger cannoct connect to Service - Error 503
-
Tuesday, March 19, 2013 1:42 PM
Hi,
I am getting an error when trying to connect from Event Flow Debugger to StreamInsight.
I followed this blogpost:
http://blogs.msdn.com/b/appfabriccat/archive/2010/10/21/streaminsight-getting-started-with-using-the-event-flow-debugger-viewing-diagnostics-and-exposing-the-management-service.aspx
This is what I'm executing within my StreanInsight application:
var streamInsightInstanceName = Properties.Settings.Default.InstanceName; var server = Server.Create(streamInsightInstanceName); var application = server.CreateApplication("twittertest"); ServiceHost host = new ServiceHost(server.CreateManagementService()); host.AddServiceEndpoint(typeof(IManagementService), new WSHttpBinding(SecurityMode.Message), "http://localhost:81/StreamInsight/CEP1"); host.Open();This is what I ran as Administrator within PowerShell on my Windows Server 2012:
netsh http add urlacl url=http://+:81/StreamInsight user=Sebastian
Before I did with "domain/Sebastian" and got AccessDenied Error which was also described in the blogpost, now theres (within my StreamInsight application) no further Exception thrown.
I saw another reserved URL of StreamInsight (guess due to its installation):
Reserved URL : http://localhost:80/StreamInsight/CEP1/ User: NT SERVICE\MSSI$CEP1 Listen: Yes Delegate: Yes SDDL: D:(A;;GA;;;S-1-5-80-4084170305-954585098-923303314-3856196276-3067866772)There Port 80 is used, for the Event Flow Debugger I use 81 because 80 is reserved for a SharePoint Application Server.
So changing this Port 80 to 81 is another battlefield because I cant find any clear information about what to do or just to change this entry?´!I am just wondering if there are some correlations to my problem.
I'm also worried about the URLs:
The blogpost told me to reserve "/StramInsight" while trying to connect with debugger to "/StreamInsight/CPE1" while starting service in Visual Studio with "/StreamInsight". Hopefully this is correct.I cannot see what I'm missing, any ideas?
Thanks much!
All Replies
-
Tuesday, March 19, 2013 2:02 PM
Theres a service "MSSI$CEP1" "StreamInsight (CEP1)" which is not started because its set to manual.
Is this service created by installation of StreamInsight or by creating the service within visual studio (ManagementService)?
What does this service do?
Why isnt it started whily my apllication is running?
Why isnt the ManagementService listed in my services list? How is it named?When trying to start it powershell return the following error:
PS C:\Windows\system32> Start-Service 'MSSI$CEP1' WARNING: Waiting for service 'StreamInsight (CEP1) (MSSI$CEP1)' to start... Start-Service : Failed to start service 'StreamInsight (CEP1) (MSSI$CEP1)'. At line:1 char:1 + Start-Service 'MSSI$CEP1' + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
-
Tuesday, March 19, 2013 2:29 PM
First, I'm assuming that you didn't get an exception when opening the service host (host.Open()).
Other than that, it looks like you did everything correctly. What I have noticed, however, is that when the StreamInsight instance is very busy (high CPU), you'll occassionally get a 503 - Server Unavailable. If you need to record events to see the flow, try using the command-line trace.cmd. This will record all queries (instead of just one) and also show you any startup events that you'd miss when connecting to the service.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Tuesday, March 19, 2013 2:32 PMThe service is optionally installed when you install StreamInsight ... there's a checkbox to install the service that's checked by default. You don't need the service, especially if you are running in the embedded model (as you are). The service will run an instance of StreamInsight that you can connect to (using Server.Connect rather than Server.Create). The management service isn't a separate Windows service - it's a WCF service that, again, is optional when starting StreamInsight but allows you to connect to a remote instance and manage it from another process.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Tuesday, March 19, 2013 2:34 PMAlso, you need to make sure that you are in the group to manage the StreamInsight instance. It'll be called StreamInsightUsers$[InstanceName]. If you aren't a member of this group, you won't be able to connect. And ... you'll need to log off and log back on after adding yourself to this group so that the group membership is attached to your Windows token.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Tuesday, March 19, 2013 3:52 PM
Youre assuming right, no exception.
I'm still member of that group.
Looks like command-line trace.cmd is my only way out.
Do you know any articles about that what to do and if neccessary how to filter on StreamInsight?Thanks.
-
Tuesday, March 19, 2013 4:02 PM
The docs on MSDN mention how to use trace.cmd: http://msdn.microsoft.com/en-us/library/ff518532.aspx.
It's installed in your StreamInsight folder, under the Tools folder. You'll want to run the command prompt as admin.
When you tried to connect, what was the CPU utilization of the process? Also, did you have the VS debugger attached on a breakpoint? If you are on a breakpoint, you will get a 503 also. And the VS debugger will really add to the CPU utilization, especially if you are running multiple queries.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Wednesday, March 20, 2013 9:49 AM
Thanks for the link (you also linked the point, so links not working directly).
But its not showing me the part of trace, I still knew this site but you now told me to have a look in tools.CPU is consitently about 15% while working, RAM got at least another 3GB free.
How about the breakpoint? Just having one will generate this failure or reaching a breakpoint? Error occurs when breakpoint is reached or also when a breakpoint has been reached before?
I will check this.
- Edited by Kaspatoo Wednesday, March 20, 2013 10:25 AM
-
Thursday, March 21, 2013 2:15 PM
If you are currently on a breakpoint, yes, you will get a 503. When the debugger breaks, ALL threads in the process stop, not just the current thread. This is by design and a part of Windows, not Visual Studio. Just having a breakpoint, however, won't cause a 503. Still, the VS debugger has difficulty with attaching to all of the threads in a StreamInsight process and I've noticed that having the debugger attached reduces your throughput and performance pretty substantially.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Thursday, April 11, 2013 11:01 AM
Hi,
I'm still not able to connect by Flowdebugger after moving my StreamInsight to a local VM ware.
My local user is member of the StreamInsight Instance group, I did not start the EventFlowDebugger with explicit admin rights.Connecting to neither localhost:81/StreamInsight nor to localhost:81/StreamInsight/CEP1 will succeed (old error).
There is a urlacl entry to http://+:81/StreamInsight/ for my local user.CPU and memory consumption stay low, no Breakpoints are even set. Running code in visual Studio (which implies standard debug mode).
Using offline trace will succeed, but I want to get this running.
Any further ideas?Thank.
- Edited by Kaspatoo Thursday, April 11, 2013 11:03 AM
-
Thursday, April 11, 2013 3:08 PM
Are you running Visual Studio as Admin? This will launch your SI host app as admin as well. If not, try launching Visual Studio as admin and start the app from there. Since you are getting a 503, it seems that your management service is started and running (otherwise you'd get "actively refused" the connection).
Also, try setting your HostNameComparisonMode (when creating the management service binding) to WeakWildcard.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Thursday, April 11, 2013 4:08 PM
ran both debugger and vsc# with admin rights, also tries weakly wildcards.
But I got another look into error and it changed, it is the one you meant:
<--
There was no endpoint listening at http://localhost/StreamInsight/CEP1 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
-------------------
Unable to connect to the remote server
-------------------
No connection could be made because the target machine actively refused it 127.0.0.1:80-->
Well the Service which is installed when installing the instance is not running but you said I dont need this for local connections.
I cannot see any service else like CEP1 or ManagementService.The other thing I'm wondering about is that the error refers to port 80 while I want to use port 81. I know that InstanceInstallation creates a urlacl entry with port 80 (still opened another thread with this port issue port issues)
-
Friday, April 12, 2013 4:09 PM
When you connect with the event flow debugger, are you including the port? Is the URL that you are specifying exactly the same as the URL for the Management Service?
You'll get an "actively refused" when the management service isn't opened (this is not a Windows Service, it's a WCF service) or you have a firewall blocking the port.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Monday, April 15, 2013 9:27 AM
no im not including the port, but doing this will throw the same error (just with additional port at the url)
Is the URL that you are specifying exactly the same as the URL for the Management Service?
What do you mean with specifying (where and how) and which url? I guess you mean wihtin my c# code?.
The current code is specified as follows:var streamInsightInstanceName = StreamInsightKrings.Properties.Settings.Default.InstanceName; var server = Server.Create(streamInsightInstanceName); var application = server.CreateApplication("twittertest"); ServiceHost host = new ServiceHost(server.CreateManagementService()); WSHttpBinding binding = new WSHttpBinding(SecurityMode.Message); binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard; host.AddServiceEndpoint(typeof(IManagementService), binding, "http://localhost:81/StreamInsight"); host.Open();I tried the following URls: within my c# code:
http://localhost:81/StreamInsight
http://localhost:81/StreamInsight/CEP1These are the current urlacl entries:
Reserved URL : http://+:81/StreamInsight/ User: WIN-6NPR0MPFQL9\osd044n0 Listen: Yes Delegate: No SDDL: D:(A;;GX;;;S-1-5-21-1025858138-1456710780-1060593087-1001) Reserved URL : http://localhost:80/StreamInsight/CEP1/ User: NT SERVICE\MSSI$CEP1 Listen: Yes Delegate: Yes SDDL: D:(A;;GA;;;S-1-5-80-4084170305-954585098-923303314-3856196276-3067866772)In event flow debugger I tried all these urls:
http://localhost/StreamInsight/CEP1:81
http://localhost/StreamInsight/CEP1:80
http://localhost/StreamInsight/CEP1
http://localhost/StreamInsightI ran both programs with and withoud explicit admin rights.
I tried connecting during StreamInsight code is running and before.Its looking like he wants to connect via port 80 and not 81. I did an explicit In- and Outbound port acception for 80 and 81, no effect here.
So how about the Management service what and where I can check?
- Edited by Kaspatoo Monday, April 15, 2013 9:33 AM
-
Tuesday, April 16, 2013 3:39 PM
Based on your URL ACL entries, you should use http://localhost:81/StreamInsight. The other one is for the default, installed service.
When using Event Flow Debugger, you should connect to http://localhost:81/StreamInsight. The URLs that you specified above for the Event Flow Debugger won't work ...
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.- Marked As Answer by Kaspatoo Friday, April 19, 2013 11:26 AM
-
Friday, April 19, 2013 11:26 AM
Hey
yes of course it must be localhost:81 and not localhost/bla:81^^
I just wrote it wrong here but tested it correct.
Well ok, thx for the URL the fault must be somewhere else, I guess its system specific (which is wondering since I installed an own clear system).If I am right my specific problem is not solutable yet. I will try it later on an other system.
Not to let it open, I will mark your last response as answer, you have well done :) Thanks.


