java.net.SocketTimeoutException: Accept timed out while run as Testng in eclipse.

817 views
Skip to first unread message

Raj

unread,
Sep 18, 2012, 1:21:21 PM9/18/12
to testng...@googlegroups.com
Hi All,

I am using Testng 5.12.1 jar. When I try to run tests in eclipse (Helios), eclipse hangs while launching(57%). 
Already it was working fine. 

I could see the following exception in ..//workspace/.metada/.log

!ENTRY org.testng.eclipse 4 4 2012-09-18 21:48:17.886
!MESSAGE Error
!STACK 0
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.testng.remote.strprotocol.BaseMessageSender.initReceiver(BaseMessageSender.java:128)
at org.testng.eclipse.ui.TestRunnerViewPart.startTestRunListening(TestRunnerViewPart.java:402)
at org.testng.eclipse.TestNGPlugin.connectTestRunner(TestNGPlugin.java:215)
at org.testng.eclipse.TestNGPlugin$2.run(TestNGPlugin.java:203)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
!SESSION 2012-09-18 21:51:55.578 -----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64


Please help me how to overcome this.

Krishnan Mahadevan

unread,
Sep 18, 2012, 1:24:21 PM9/18/12
to testng...@googlegroups.com
Is your eclipse TestNG plugin configured to use the TestNG jar from the project instead of it using the embedded version of it? I have seen such errors show up on the eclipse console when there are version differences between the plugin and the jar in the CLASSPATH. 
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/rUqSVIcbvwkJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

Cédric Beust ♔

unread,
Sep 18, 2012, 2:51:00 PM9/18/12
to testng...@googlegroups.com
TestNG 5.12.1 is a very old jar that is very likely to cause hang ups when used in Eclipse. Please upgrade to a more recent one, or make sure that the Eclipse plug-in is using its own internal testng.jar file.

-- 
Cédric




Raj

unread,
Sep 19, 2012, 2:17:52 AM9/19/12
to testng...@googlegroups.com
I am not able to understand the line " Is your eclipse TestNG plugin configured to use the TestNG jar from the project instead of it using the embedded version of it ". Can you please explain me. 

Right now I installed TestNG plugin. I didn add TestNG jar in my build path in eclipse except selenium server jar and client jar.

To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

Krishnan Mahadevan

unread,
Sep 19, 2012, 2:44:30 AM9/19/12
to testng...@googlegroups.com
Raj,
You did state that you are using TestNG 5.x series right ? Does it mean that you are working that version of TestNG plugin as well ?
What is your testng plugin version ? [ Help > About eclipse > Installation details ]


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/5UpNud6Ql7cJ.

To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.

Raj

unread,
Sep 19, 2012, 2:55:22 AM9/19/12
to testng...@googlegroups.com
My TestNG Plug in version in 6.7 and also I changed TestNG jar to 6.7 (TestNG 6.7.jar in my build path). 

Krishnan Mahadevan

unread,
Sep 19, 2012, 3:38:05 AM9/19/12
to testng...@googlegroups.com
ok. So are you still facing this problem ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/lU9g8RQijagJ.

Raj

unread,
Sep 19, 2012, 4:25:50 AM9/19/12
to testng...@googlegroups.com
Yes Krishnan.

Krishnan Mahadevan

unread,
Sep 19, 2012, 5:55:24 AM9/19/12
to testng...@googlegroups.com
Umm.. lets try and go over this one more time.

Are you using the TestNG jar in your classpath or are you using the TestNG jar embedded within the eclipse TestNG plugin ?
[Check if you checked the checkbox "Use project TestNG jar" from Project > Properties > TestNG]

AFAIK If you DONT have the checkbox checked, then you shouldn't see the error that you are seeing.

If you have checked the checkbox, then am pretty sure, that your CLASSPATH contains an older version of TestNG jar somewhere which is triggering this. You might want to uncheck that checkbox and try again. 


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"




To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/BG4hJjb6REkJ.

Raj

unread,
Sep 19, 2012, 11:48:55 PM9/19/12
to testng...@googlegroups.com
HI Krishnan,

Checkbox that you mentioned is not checked. 

Am also attaching the classpath referred from ..//.metada/.log file.

This is a continuation of log file ..\.metadata\.bak_0.log
Created Time: 2012-09-20 09:07:58.479
!SESSION 2012-09-20 09:06:50.747 -----------------------------------------------
eclipse.buildId=I20100608-0911
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

!ENTRY org.eclipse.core.resources 2 10035 2012-09-20 09:07:58.481
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.testng.eclipse 1 0 2012-09-20 09:12:25.377
!MESSAGE [TestNGLaunchConfigurationDelegate] Launching:
  Classpath: /C:/xxx/Softwares/eclipse-java-helios-win32-x86_64_study/eclipse_helios/plugins/org.testng.eclipse_6.7.0.20120825_1316/lib/testng.jar C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriverTests\bin C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\Jars\testng-6.7.jar
  VMArgs:    -ea
  Class:     org.testng.remote.RemoteTestNG
  Args:      -serport 50292 -d C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\test-output C:\Users\xxx\AppData\Local\Temp\testng-eclipse--265517564\testng-customsuite.xml
java -ea -classpath /C:/xxx/Softwares/eclipse-java-helios-win32-x86_64_study/eclipse_helios_study/plugins/org.testng.eclipse_6.7.0.20120825_1316/lib/testng.jar:C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\bin:C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\Jars\testng-6.7.jar org.testng.remote.RemoteTestNG -serport 50292 -d C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\test-output C:\Users\xxx\AppData\Local\Temp\testng-eclipse--265517564\testng-customsuite.xml

!ENTRY org.testng.eclipse 4 4 2012-09-20 09:12:33.764
!MESSAGE Error
!STACK 0
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.testng.remote.strprotocol.BaseMessageSender.initReceiver(BaseMessageSender.java:128)
at org.testng.eclipse.ui.TestRunnerViewPart.startTestRunListening(TestRunnerViewPart.java:402)
at org.testng.eclipse.TestNGPlugin.connectTestRunner(TestNGPlugin.java:215)
at org.testng.eclipse.TestNGPlugin$2.run(TestNGPlugin.java:203)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Krishnan Mahadevan

unread,
Sep 20, 2012, 3:43:51 AM9/20/12
to testng...@googlegroups.com
Raj,
I guess Cedric would be the best person to help you out here, because I think I have stated all that I know of .


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/h15b32WTyBwJ.

Raj

unread,
Sep 20, 2012, 4:04:24 AM9/20/12
to testng...@googlegroups.com
Sure Krishnan.

Thanks a ton for providing all possible solutions and timely response.

Raj

unread,
Sep 20, 2012, 4:06:29 AM9/20/12
to testng...@googlegroups.com, ced...@beust.com
Hi Cedric,

As you suggested, I upgraded TestNG version to 6.7 both plugin and jar. Still I face this issue.
Please find below the stack trace from //.medatada/.log file .


This is a continuation of log file ..\.metadata\.bak_0.log
Created Time: 2012-09-20 09:07:58.479
!SESSION 2012-09-20 09:06:50.747 -----------------------------------------------
eclipse.buildId=I20100608-0911
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

!ENTRY org.eclipse.core.resources 2 10035 2012-09-20 09:07:58.481
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.testng.eclipse 1 0 2012-09-20 09:12:25.377
!MESSAGE [TestNGLaunchConfigurationDelegate] Launching:
  Classpath: /C:/xxx/Softwares/eclipse-java-helios-win32-x86_64_study/eclipse_helios/plugins/org.testng.eclipse_6.7.0.20120825_1316/lib/testng.jar C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriverTests\bin C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\Jars\testng-6.7.jar
  VMArgs:    -ea
  Class:     org.testng.remote.RemoteTestNG
  Args:      -serport 50292 -d C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\test-output C:\Users\xxx\AppData\Local\Temp\testng-eclipse--265517564\testng-customsuite.xml
java -ea -classpath /C:/xxx/Softwares/eclipse-java-helios-win32-x86_64_study/eclipse_helios_study/plugins/org.testng.eclipse_6.7.0.20120825_1316/lib/testng.jar:C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\bin:C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\Jars\testng-6.7.jar org.testng.remote.RemoteTestNG -serport 50292 -d C:\xxx\Eclipse_Projects\Eclipse_Helios_Projects\WebDriver\test-output C:\Users\xxx\AppData\Local\Temp\testng-eclipse--265517564\testng-customsuite.xml

!ENTRY org.testng.eclipse 4 4 2012-09-20 09:12:33.764
!MESSAGE Error
!STACK 0
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.testng.remote.strprotocol.BaseMessageSender.initReceiver(BaseMessageSender.java:128)
at org.testng.eclipse.ui.TestRunnerViewPart.startTestRunListening(TestRunnerViewPart.java:402)
at org.testng.eclipse.TestNGPlugin.connectTestRunner(TestNGPlugin.java:215)
at org.testng.eclipse.TestNGPlugin$2.run(TestNGPlugin.java:203)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Raj

unread,
Sep 24, 2012, 11:24:39 AM9/24/12
to testng...@googlegroups.com, ced...@beust.com


Hi Cedric, 



When I try to run tests using TestNG, I get this message.
Eclipse : 3.6 Helios
TestNG plugin: 6.7

.
I also unchecked "Use Project TestNG jar".

Please help me how to overcome this issue 

Thanks in advance.

amit tatiya

unread,
Jan 7, 2013, 3:29:50 AM1/7/13
to testng...@googlegroups.com
Hi Raj,
Did you get anything working on this issue. Please let me know if you got any solution for this.

Veena Devi

unread,
Jul 9, 2013, 6:45:09 AM7/9/13
to testng...@googlegroups.com
Have you resolved? I am getting the same error  :-(

Snigdha

unread,
Nov 7, 2013, 10:00:12 PM11/7/13
to testng...@googlegroups.com
Hi Frens,
      I am facing the same issue... exactly same log messages in eclipse logs. Also, testNG version used is 6.8.6.... Was there a solution found to this Raj?

Amit

unread,
Nov 8, 2013, 12:28:52 AM11/8/13
to testng...@googlegroups.com, testng...@googlegroups.com
Hi,
In my case it was just I had mapped a server to localhost in my hosts
file. I just removed that and it all started working fine. Though I am
not sure if that is the solution. Just give it a try.

Sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/bEYU6cgMF2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.

To post to this group, send email to testng...@googlegroups.com.

Snigdha

unread,
Nov 8, 2013, 2:59:15 AM11/8/13
to testng...@googlegroups.com
Amit,
    I am not connected to any server. I am just trying to print a  statement in @Test function, just to debug the issue. I have tried almost all options given by Cedric here...
Reply all
Reply to author
Forward
0 new messages