junit socket error

M

MileHighCelt

I am using JUnit 3.8.1 (that came with Eclipse 3.1) to run some tests.
Yesterday everything was fine, but this morning after rebooting my
windows box, none of my tests will run. When I click the test class
and select "run as junit test" it takes 10-15 seconds before throwing
an exception such as:

Could not connect to: : 2248
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:754)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:336)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



It is interesting that the port noted at the beginning of this message
increments after each attempt (it was originally 1989 when I noticed
it). Anyone know why this might suddenly be happening. I am not
trying to run any remote applications, so I don't know why junit is
trying to open sockets to various ports.

Thanks for your help.
 
R

Roedy Green

It is interesting that the port noted at the beginning of this message
increments after each attempt (it was originally 1989 when I noticed
it). Anyone know why this might suddenly be happening. I am not
trying to run any remote applications, so I don't know why junit is
trying to open sockets to various ports.

Eclipse has a auto update feature. You might check that your Internet
connection is functioning. You also might check that the connection to
your Eclipse mirror is working and the mirror site is up. If not, pick
a different mirror.

Click Help | software updates
 
O

Oliver Wong

MileHighCelt said:
I am using JUnit 3.8.1 (that came with Eclipse 3.1) to run some tests.
Yesterday everything was fine, but this morning after rebooting my
windows box, none of my tests will run. When I click the test class
and select "run as junit test" it takes 10-15 seconds before throwing
an exception such as:

Could not connect to: : 2248
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:754)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:336)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

It is interesting that the port noted at the beginning of this message
increments after each attempt (it was originally 1989 when I noticed
it). Anyone know why this might suddenly be happening. I am not
trying to run any remote applications, so I don't know why junit is
trying to open sockets to various ports.

I've encountered this error too, and unfortunatelly I really cannot
remember what I did to fix it.

However, it's my understanding that the JUnit uses sockets to connect to
itself so that the GUI component (i.e. the progress bar that shows up in
Eclipse) can communicate with the backend (the code that actually runs all
the tests). So this has nothing to do with whether or not YOUR code uses
sockets.

Did you try rebooting the computer since the error started happening?

- Oliver
 
Joined
Nov 7, 2006
Messages
1
Reaction score
0
A friend told me to log in at windows as an administrator

How is this done and do you think it would help?
 
Joined
Jul 18, 2007
Messages
1
Reaction score
0
I had this same error. It went away after I restarted (full shut down) my computer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top