Cannot Profiler Asp.net Apps - Ants Service Hangs
daridaniel
Posts: 5
Ants system: Ants 2.7
OS : windows xp sp2
IIS 5.1
Asp.net 1.1 (although 2.0 is installed on machine) - app IS configured as a 1.1 app.
:evil:
5 months ago we got a trial of ants profiler and took it through it's paces. Now we just bought 5 licenses and tried to profile the same app on the same machine and the StartingService hourglass never dies - hangs. The only way out is killing the AntsProfiler service process.
Windows services and windows applications can be profiled but web apps cannot. We tried even just a simple web page and the service start up hangs. if we manually re-start the service during the hang then we get the following error in the event log:
Unable to start profiler - exception details System.Exception: Couldn't restart the service (timeout)
Server stack trace:
at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Windows.Forms.MethodInvoker.EndInvoke(IAsyncResult result)
at _3._4(IAsyncResult )
Some other errors we have seen (we have tried many things and the symptom described above is always true - the follwing errors could have been received doing very bad things to processes etc.)
Service cannot be started. System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at System.Net.Sockets.TcpListener.Start()
at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
Unable to start profiler - exception details System.NullReferenceException: Object reference not set to an instance of an object.
Server stack trace:
at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
OS : windows xp sp2
IIS 5.1
Asp.net 1.1 (although 2.0 is installed on machine) - app IS configured as a 1.1 app.
:evil:
5 months ago we got a trial of ants profiler and took it through it's paces. Now we just bought 5 licenses and tried to profile the same app on the same machine and the StartingService hourglass never dies - hangs. The only way out is killing the AntsProfiler service process.
Windows services and windows applications can be profiled but web apps cannot. We tried even just a simple web page and the service start up hangs. if we manually re-start the service during the hang then we get the following error in the event log:
Unable to start profiler - exception details System.Exception: Couldn't restart the service (timeout)
Server stack trace:
at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Windows.Forms.MethodInvoker.EndInvoke(IAsyncResult result)
at _3._4(IAsyncResult )
Some other errors we have seen (we have tried many things and the symptom described above is always true - the follwing errors could have been received doing very bad things to processes etc.)
Service cannot be started. System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at System.Net.Sockets.TcpListener.Start()
at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
Unable to start profiler - exception details System.NullReferenceException: Object reference not set to an instance of an object.
Server stack trace:
at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Comments
sorry that this is causing you problems. The only obvious problem that springs to mind is that you are already using the port that ANTS Profiler Service tries to use for communication. ANTS Profiler uses port 8087 and will not work if you are using this for another app.
Thanks,
Tom Harris
Red Gate Software
The ANTS Profiler Service is the component that needs to start in order to profile ASP .NET, COM+, and service applications. So it does make sense that you can still profile a desktop application.
What platform is this on? Is it a server-class OS? You may want to check your websites to make sure none of them answer port 8087, even the inactive ones.
Ants system: Ants 2.7
OS : windows xp sp2
IIS 5.1
Asp.net 1.1 (although 2.0 is installed on machine) - app IS configured as a 1.1 app.
Yes 'localhost' resovles to 127.0.0.1...What you may want to look at is an older post you made about framework 2.0 and 1.1 on the same box EVEN when the asp.net app is configured as 1.1...Apparently you had some trouble with this before and the people reporting the problems never had (or reported) a resolution. This of course would be a BIG deal breaker. ALL 200 developers are running both.
It may help to configure the default version of ASP .NET for the default website to be version 1.1. If ANTS cannot get the information out of the metabase, it defaults to the default version (previously pre 2.5 it defaulted to the newest version). You can use the ASP .NET tab of the website configuration (2.0) or the aspnet_regiis.exe utility from the relevant Framework installation folder.
This issue doesn't manifest itself this way, however. It normally gives you an 'application has not loaded the .net framework' message.
your problem is unrelated to the issue of profiling ASP.NET apps when both versions of .NET are installed. For your information AP 2.7 fixes that issue. I have asked Brian to follow up via email with another suggestion though.
Regards,
Tom