JUnit Testing: Could not connect to: : <Socket>

Thread Solved

Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

JUnit Testing: Could not connect to: : <Socket>

 
0
  #1
May 19th, 2009
  1. Could not connect to: : 50404
  2. java.net.ConnectException: Connection refused: connect
  3. at java.net.PlainSocketImpl.socketConnect(Native Method)
  4. at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  5. at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  6. at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  7. at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  8. at java.net.Socket.connect(Socket.java:520)
  9. at java.net.Socket.connect(Socket.java:470)
  10. at java.net.Socket.<init>(Socket.java:367)
  11. at java.net.Socket.<init>(Socket.java:180)
  12. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:560)
  13. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:377)
  14. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

has anyone run into this issue and or find a fix? I've not been able to get much from google. I have been running unit tests no problem them wham it poops out .

I've tried restarting, disconnecting the network cable, starting up a new instance of eclipse, disabling the windows firewall...etc

However if I run a "mvn test" on the project from the command line all goes well as expected >_<
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: JUnit Testing: Could not connect to: : <Socket>

 
0
  #2
May 19th, 2009
Ending up being able to solve this one. Debugged the servlet used for the connection to the JUnit window. Found it was using the wrong port (for some reason it was placing it a single digit below the correct port) and stepped through each iteration of the servlet doConnect() method adjusting the port each time.

Once I did that JUnit testing began to work as normal; hopefully however, it will continue to do so next time I start up eclipse
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 1
Reputation: dmanchester is an unknown quantity at this point 
Solved Threads: 0
dmanchester dmanchester is offline Offline
Newbie Poster

Re: JUnit Testing: Could not connect to: : <Socket>

 
0
  #3
Jun 18th, 2009
Hey,

I've seen this problem, too, on a corporate laptop when it wasn't connected to the corporate network (by being either plugged directly into it or tunneled in with the laptop's Nortel VPN client). Stopping the laptop's "McAfee Host Intrusion Prevention Service" would resolve the problem and enable Eclipse to run JUnit tests.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC