943,723 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 2917
  • Java RSS
May 19th, 2009
0

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

Expand Post »
Java Syntax (Toggle Plain Text)
  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 >_<
Similar Threads
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
May 19th, 2009
0

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

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
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Jun 18th, 2009
0

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

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dmanchester is offline Offline
1 posts
since Jun 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: JSlider to create different number of lables
Next Thread in Java Forum Timeline: How do I connect to the internet in Java?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC