Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Win2008-R2 .NET4 CLR , +
Hi,
 
I am trying to execute a NUnit test case (.Net 4.0 .dll, compiled against NUnit 2.5.9 ) using NUnit console in Windows 2008 R2 (X64) but it fails with below error message. Any idea?
 

----
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:61137
 
Server stack trace:
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
   at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
 
Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at NUnit.Core.TestRunner.get_Running()
   at NUnit.Core.ProxyTestRunner.get_Running()
   at NUnit.Util.TestLoader.get_Running()
   at NUnit.Gui.NUnitForm.get_IsTestRunning()
   at NUnit.Gui.NUnitForm.NUnitForm_Closing(Object sender, CancelEventArgs e)
   at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Posted 18-Mar-11 5:57am
Edited 18-Mar-11 8:39am
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Erhm, are you sure your firewall is switched off, or that you've created a rule in your firewall allowing communication over the given port 61137?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi Eduard,
 
Thanks for your response.
 
Port number is changing all the time. Now it's 61137 and last time it was some thing else.
I am executing the DLL manually using NUnit in a single box..should I be checking the firewall even if the DLL is not calling any external services?
 

Thanks,
Venu
  Permalink  
Comments
Eduard Keilholz at 18-Mar-11 12:26pm
   
I do think so, just try to switch it off for a brief moment. If your code works, you know the firewall is in your way, else you have to find the problem somewhere else.
Richard MacCutchan at 18-Mar-11 13:41pm
   
I don't think the firewall looks at messages on the loopback address.
Richard MacCutchan at 18-Mar-11 13:42pm
   
Are you sure you have a listener on this address?
Member 4545580 at 18-Mar-11 14:13pm
   
ping 127.0.0.1:61137 doesn't work
but 127.0.0.1 works fine.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I don't know if this is possible, but I got this same error from NUnit when I actually had an infinite loop going in one of my tests.
 
I had some overloaded assert method that ended up looping back on itself. When I ran the code using the TestDriven.Net tool I saw the stack overflow exception that was causing Nunit to hang, and eventually return the error you mentioned.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 459
1 Maciej Los 325
2 Sergey Alexandrovich Kryukov 234
3 DamithSL 233
4 BillWoodruff 200
0 OriginalGriff 7,168
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,461
3 Manas Bhardwaj 4,876
4 Maciej Los 4,450


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 22 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100