Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketException: Software caused connection abort #91

Closed
krampstudio opened this issue Jul 9, 2013 · 63 comments
Closed

SocketException: Software caused connection abort #91

krampstudio opened this issue Jul 9, 2013 · 63 comments

Comments

@krampstudio
Copy link

After updated the plugin to the version 6.8.6.20130607_0745 we get this exception at each test:

java.net.SocketException: Software caused connection abort: socket write error
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
       at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1676)
       at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1585)
       at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1167)
       at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1121)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1278)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
       at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1392)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:294)
       at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:25)
       at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
       at org.testng.remote.strprotocol.RemoteTestListener.onTestStart(RemoteTestListener.java:49)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1904)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:685)
       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
       at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
       at org.testng.TestRunner.privateRun(TestRunner.java:767)
       at org.testng.TestRunner.run(TestRunner.java:617)
       at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
       at org.testng.SuiteRunner.run(SuiteRunner.java:240)
       at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
       at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
       at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
       at org.testng.TestNG.run(TestNG.java:1031)
       at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
       at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
       at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

By downgrading to 6.8.1 the exception has gone.

@art-licis
Copy link

I experience the same with 6.9.4 on Eclipse 3.6.4.

@atul2710
Copy link

I am also getting the same error with Eclispe and TestNG Plugin 6.9.4. How can I downgrade to 6.8.1?

@cbeust
Copy link
Collaborator

cbeust commented May 22, 2015

Uninstall and install again from the update site:
http://beust.com/eclipse-previous (which points to 6.8.6).

Cédric

On Fri, May 22, 2015 at 11:59 AM, atul2710 notifications@github.com wrote:

I am also getting the same error with Eclispe and TestNG Plugin 6.9.4. How
can I downgrade to 6.8.1?


Reply to this email directly or view it on GitHub
#91 (comment)
.

@wutingbupt
Copy link
Contributor

I also met this problem after maybe one week not used TestNG plugin.

@jhalterman
Copy link

I'm hitting something similar w/Eclipse 4.4.2, TestNG Eclipse 6.9.5.201506081335:

java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1847)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1756)
    at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1257)
    at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1211)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1395)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
    at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1547)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:333)
    at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:25)
    at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
    at org.testng.remote.strprotocol.RemoteTestListener.onTestSuccess(RemoteTestListener.java:92)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1887)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1867)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:775)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:894)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1219)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:768)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1188)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1113)
    at org.testng.TestNG.run(TestNG.java:1025)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)

Downgrading to 20141201 seems to fix things.

@missedone
Copy link
Collaborator

@jhalterman

what's the JDK version you used for running Eclipse and launching the test cases?
could you make the version consistent, both 1.7 or both 1.8.
as the test results are marshalled/unmarshalled with objectinputstream via socket between plugin and testng runtime

could you also try with latest snapshot of testng:
https://oss.sonatype.org/content/repositories/snapshots/org/testng/testng/6.9.5-SNAPSHOT/
still, everything running with JDK 1.7

thanks

reference #144

@jhalterman
Copy link

@missedone The compiler source/target for my project are 1.6. Eclipse is running via 1.8 (I believe). Is this what you mean? If so, I can't really update my project to 1.8 since I have users who are still on 1.6 and 1.7...

@missedone
Copy link
Collaborator

OK then, the minimum jdk version required by testng 6.9.5 is 1.7.
So could you run it with 1.7?
otherwise, you might need stay on the older version
thanks

@jhalterman
Copy link

No Problem - I guess that's as good a reason as any to force users to move to 1.7 :)

@jhalterman
Copy link

Just hit this error again on a new Eclipse (Mars) install. Running against a project targeted at 1.7. Brand new setup! Surely others are hitting this.

Will downgrade the plugin, again.

@workmonitored
Copy link

I can confirm. This is happening to me again but even downgrading did not help me. The stack trace is as follows:

java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1876)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1785)
at java.io.ObjectOutputStream.(ObjectOutputStream.java:247)
at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
at org.testng.remote.strprotocol.RemoteTestListener.onTestFailure(RemoteTestListener.java:72)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1895)

I am on Eclipse Version: Luna Service Release 2 (4.4.2)Build id: 20150219-0600 . The testng version I use as a dependency is 6.8.1. Project conforms to 1.6 and uses 1.7 as jdk. Testng version is 6.8.6.20140201 .

I am running it as ordinary user with no admin rights on windows machine due to government policies. Not sure if this is related windows firewall but did not see any popups. This is a failing test.

@workmonitored
Copy link

Upgrading my testng dependency to 6.8.7 fixes the problem. This is a maven project which I switch between Eclipse and Netbeans due to lack of support for mybatis in netbeans.

@missedone
Copy link
Collaborator

regards to the testng version, as you are using 6.8.x so it's recommended to use 6.8.21 (the last of 6.8.x)

@eliasbalasis
Copy link

I had same problems with Eclipse 4.5 (Mars),

setting TestNG plugin in "Preferences" to not use the "project TestNG JAR" solved the problem

I hope this helps

@eliasbalasis
Copy link

A more balanced solution, which I was yet unable to test, would be best to upgrade TestNG JAR on project side instead

@otavioprado
Copy link

This issue needs to be fixed. In eclipse Mars is also occurring in version 6.9.5

@eliasbalasis
Copy link

I confirm

@missedone
Copy link
Collaborator

@eliasbalasis @otavioprado could you try enable String protocol rather than default Object Serialization protocol by adding VM arguments: -Dtestng.eclipse.stringprotocol=true
in addition, you can add following args to double check if String protocol enabled or not:
-Dtestng.eclipse.verbose=true -Dtestng.eclipse.debug=true

here is the sample output on Eclipse console:

[RemoteTestNG] Invoked with -port 57334 -d /Users/nick/Documents/workspace/mytest/test-output /var/folders/54/wsbhhvxs4v92kc0d9rh6h2zr0000gp/T/testng-eclipse--698040180/testng-customsuite.xml 
[BaseMessageSender] Waiting for Eclipse client on localhost:57334
[BaseMessageSender] Received a connection from Eclipse on localhost:57334
[BaseMessageSender] Connection established, starting reader thread
[BaseMessageSender] ReaderThread waiting for an admin message
[StringMessageSender] Sending message:[GenericMessage suiteCount:1 testCount:1]
[StringMessageSender]   String version:1�testCount1�suiteCount1
[StringMessageSender]   word:[1]
[StringMessageSender]   word:[testCount1]
[StringMessageSender]   word:[suiteCount1]
[BaseMessageSender] ReaderThread received admin message:>ACK
[BaseMessageSender] Received ACK:>ACK
[TestNG] Running:
  /private/var/folders/54/wsbhhvxs4v92kc0d9rh6h2zr0000gp/T/testng-eclipse--698040180/testng-customsuite.xml

[StringMessageSender] Sending message:[SuiteMessage suite:Default suite starting methodCount:0]
[StringMessageSender]   String version:11�Default suite�0
[StringMessageSender]   word:[11]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[0]
[BaseMessageSender] Received ACK:>ACK
[StringMessageSender] Sending message:[TestMessage suite:Default suite testName:Default test passed:0 failed:0]
[StringMessageSender]   String version:101�Default suite�Default test�1�0�0�0�0
[StringMessageSender]   word:[101]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[Default test]
[StringMessageSender]   word:[1]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[0]
[StringMessageSender] Sending message:[TestResultMessage suite:Default suite test:Default test method:testGreeting]
[StringMessageSender]   String version:1016�Default suite�Default test�mytest.GreetingTest�testGreeting��1438269815856�0�null�testGreeting
[StringMessageSender]   word:[1016]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[Default test]
[StringMessageSender]   word:[mytest.GreetingTest]
[StringMessageSender]   word:[testGreeting]
[StringMessageSender]   word:[]
[StringMessageSender]   word:[1438269815856]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[null]
[StringMessageSender]   word:[testGreeting]
hello
/Users/nick/Documents/workspace/mytest/target/test-classes/
/Users/nick/Documents/workspace/mytest/target/classes/
/Users/nick/workspace/myproject/testng-eclipse/testng-eclipse-plugin/lib/testng.jar
/Users/nick/workspace/myproject/testng-eclipse/testng-eclipse-plugin/lib/jcommander.jar
/Users/nick/workspace/myproject/testng-eclipse/testng-eclipse-plugin/lib/bsh-2.0b4.jar
/Users/nick/workspace/myproject/testng-eclipse/testng-eclipse-plugin/lib/snakeyaml.jar
/Users/nick/.m2/repository/org/codehaus/groovy/groovy-all/2.4.3/groovy-all-2.4.3.jar
/Users/nick/.m2/repository/org/testng/testng/6.9.4/testng-6.9.4.jar
/Users/nick/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
/Users/nick/.m2/repository/com/beust/jcommander/1.48/jcommander-1.48.jar
/Users/nick/.m2/repository/junit/junit/4.12/junit-4.12.jar
/Users/nick/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[StringMessageSender] Sending message:[TestResultMessage suite:Default suite test:Default test method:testGreeting]
[StringMessageSender]   String version:1001�Default suite�Default test�mytest.GreetingTest�testGreeting��1438269815856�1438269815865�null�testGreeting
[StringMessageSender]   word:[1001]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[Default test]
[StringMessageSender]   word:[mytest.GreetingTest]
[StringMessageSender]   word:[testGreeting]
[StringMessageSender]   word:[]
[StringMessageSender]   word:[1438269815856]
[StringMessageSender]   word:[1438269815865]
[StringMessageSender]   word:[null]
[StringMessageSender]   word:[testGreeting]
[StringMessageSender] Sending message:[TestMessage suite:Default suite testName:Default test passed:1 failed:0]
[StringMessageSender]   String version:102�Default suite�Default test�1�1�0�0�0
[StringMessageSender]   word:[102]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[Default test]
[StringMessageSender]   word:[1]
[StringMessageSender]   word:[1]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[0]
[StringMessageSender]   word:[0]
PASSED: testGreeting

===============================================
    Default test
    Tests run: 1, Failures: 0, Skips: 0
===============================================

[StringMessageSender] Sending message:[SuiteMessage suite:Default suite ending methodCount:1]
[StringMessageSender]   String version:12�Default suite�1
[StringMessageSender]   word:[12]
[StringMessageSender]   word:[Default suite]
[StringMessageSender]   word:[1]

===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 0
===============================================

[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@34985fc6: 7 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@693b004c: 3 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@3f9ab1bf: 6 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 0 ms
[BaseMessageSender] Received ACK:>ACK
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@78293354: 8 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@1ee94df: 31 ms

as you can see StringMessageSender was used for data communication between TestNG Eclipse Plugin (acts as client) and RemoteTestNG runtime (acts as server)

@missedone
Copy link
Collaborator

@cbeust, in my limit test, i think 'testng.eclipse.stringprotocol' is functional, so i'd like to know why this is second to 'serialization protocol'?
now that 'string protocol' can bypass socket 'Broken pipe' error when serialize/deserialize the object input/output stream, I'd like to add new radio button "data protocol" in "Runtime" group (under "Log Level (0-10)" ) on the main "Test" tab, so that people can see it and easily switch between them rather than configure within VM argument.
along with that, i like to add checkbox for 'testng.eclipse.verbose' and 'testng.eclipse.debug' in "Runtime" group as well.

what do you think?

@cbeust
Copy link
Collaborator

cbeust commented Jul 31, 2015

I deprecated the string protocol because it was not flexible and it was written quickly for the 1.0 version of the plugin, are you absolutely sure the broken socket comes from the serialization protocol? I'm having a hard time believing that.

If I started from scratch today, I would probably use JSON, and maybe it would be pretty trivial to add this (since we already have two protocols, adding a third should be easy). Serialization is easy but fickle since the binary layout of objects can change if the two processes are using different JVM's (which might be the cause for the problem). JSON would make this a non issue, maybe that would be the way to go, what do you think?

@missedone
Copy link
Collaborator

yes, i totally agree with the json part, i thought that too, even further, i think it would be a good chance to make testng into multi module:

  • testng
    • testng core
    • remote testng with object serialization
    • remote testng with json serialization
    • utils depends on snakeyaml
    • etc.

this can benefit the user that they can better control the dependencies, e.g. for most people they only need testng-core so that they can have a clean dependency tree that wont import unexpected dependent lib (e.g. snakeyaml)

anyway, i just jumped to other topic.
back to this thread, my concern to implement a new protocol, e.g. json, it could take some time to get it done. at the meanwhile, if the string protocol is 90% functional, we can have a small start first that allow user to use it for now to bypass the socket issue. and even have json support in near future, it still make sense to have the switch on the GUI.
it also can give us some time to impl the new json protocol.

@deshpandeashu
Copy link

For Eclipse Luna (4.4.2), uninstalling TestNG plugin that I had from here: http://beust.com/eclipse and installing with http://beust.com/eclipse-previous worked for me.

@eliasbalasis
Copy link

I confirm, I had to do the same.
But mostly for previous generations of TestNG (6.0.1 if I remember correctly) and related techniques (e.g. abstact test classes etc.)
I hope this helps

-------- Original message --------
From: Ashutosh Deshpande notifications@github.com
Date: 2015/08/19 13:06 (GMT+02:00)
To: cbeust/testng-eclipse testng-eclipse@noreply.github.com
Cc: eliasbalasis eliasbalasis@gmail.com
Subject: Re: [testng-eclipse] SocketException: Software caused connection
abort (#91)

For Eclipse Luna (4.4.2), uninstalling TestNG plugin that I had from here: http://beust.com/eclipse and installing with http://beust.com/eclipse-previous worked for me.


Reply to this email directly or view it on GitHub.

@missedone
Copy link
Collaborator

@deshpandeashu and @eliasbalasis

did you tried to use string protocol by specifying it in the VM arguments?
-Dtestng.eclipse.stringprotocol=true

if you switch to string protocol, do you still have the socket broken pipe issue?

@cbeust
Copy link
Collaborator

cbeust commented Aug 20, 2015

I would love to see the answer to this question too. @missedone has been trying to convince me that switching the protocol would fix the issue and I've been disputing that claim. I would love to be proven wrong so we can finally put this issue behind us :)

@PriyadharshiniV
Copy link

@missedone
Suddenly I started seeing this exception on every testrun consistently
Version: Luna Service Release 2 (4.4.2)
JRE version: JRE 1.8.0_31
TestNG: 6.9.5.201508210528

The exception occurs thrice for each test
Once before execution of @AfterMethod and twice after the @AfterMethod

2015-09-21 19:40:01,078 INFO c.v.v.e.OutcomePrinter [afterInvocation:49] [main] - OUTCOME:PASS
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unknown Source)
at java.io.ObjectOutputStream.(Unknown Source)
at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
at org.testng.remote.strprotocol.RemoteTestListener.onTestSuccess(RemoteTestListener.java:92)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1899)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:778)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
2015-09-21 19:40:01,083 INFO l.TestBase [testCleanUp:31] [main] - _Test CleanUp starts_*
. . . . . .
.. . . .
...

Default test
Tests run: 1, Failures: 0, Skips: 0

java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unknown Source)
at java.io.ObjectOutputStream.(Unknown Source)
at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
at org.testng.remote.strprotocol.RemoteTestListener.onFinish(RemoteTestListener.java:34)
at org.testng.TestRunner.fireEvent(TestRunner.java:1246)
at org.testng.TestRunner.afterRun(TestRunner.java:1039)
at org.testng.TestRunner.run(TestRunner.java:621)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unknown Source)
at java.io.ObjectOutputStream.(Unknown Source)
at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
at org.testng.remote.RemoteTestNG$RemoteSuiteListener.onFinish(RemoteTestNG.java:250)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:200)
at org.testng.SuiteRunner.run(SuiteRunner.java:243)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

@mfpinheiro
Copy link

@missedone i so sorry, i couldn't respond that. I move to another project. So i can't get a print, but the error is pretty similar to the error which the @PriyadharshiniV and @krampstudio post.

@missedone
Copy link
Collaborator

@PriyadharshiniV
thanks for reporting that, could you post the plugin error message by running eclipse in debug mode with following #91 (comment), that will help diagnose this issue.

also, as you said "suddenly", do you mean it works well until today even you don not change anything?

thanks

@missedone
Copy link
Collaborator

@mfpinheiro, no worry, that's still helpful, thanks very much:)

@PriyadharshiniV
Copy link

sorry it was working fine till date with a older version of testNG plugin.
Yesterday after the latest plugin update TestNG: 6.9.5.201508210528 the tests started to throw the exception.
I again changed the plugin version to 6.8.6.20141201_2240 and now there are no exception thrown.
To post error in debug mode I might have to again update to the new version. May be in a day time I will update the plugin error with the latest testNG plugin

@PriyadharshiniV
Copy link

Posting the plugin error message in debug mode for TestNG version: 6.9.5.201508210528

[TestNGLaunchConfigurationDelegate] Using the serialized protocol
[BaseMessageSender] initReceiver on port 54135
[SerializedMessageSender] Received message [GenericMessage suiteCount:1 testCount:1]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [SuiteMessage suite:Default suite starting methodCount:0]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [TestMessage suite:Default suite testName:Default test passed:0 failed:0]
[BaseMessageSender] Sending ACK 0
java.io.InvalidClassException: org.testng.remote.strprotocol.TestResultMessage; local class incompatible: stream classdesc serialVersionUID = 4879160978936577182, local class serialVersionUID = -4157150777889117479
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.testng.remote.strprotocol.SerializedMessageSender.receiveMessage(SerializedMessageSender.java:39)
at org.testng.remote.strprotocol.MessageHub.receiveMessage(MessageHub.java:52)
at org.testng.remote.strprotocol.AbstractRemoteTestRunnerClient$ServerConnection.run(AbstractRemoteTestRunnerClient.java:199)
[BaseMessageSender] Sending ACK 0


Whereas, with testNG version : 6.8.6.20141201_2240, i dont see this exception "java.io.InvalidClassException: org.testng.remote.strprotocol.TestResultMessage"

[TestNGLaunchConfigurationDelegate] Using the serialized protocol
[BaseMessageSender] initReceiver on port 54453
[SerializedMessageSender] Received message [GenericMessage suiteCount:1 testCount:1]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [SuiteMessage suite:Default suite starting methodCount:0]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [TestMessage suite:Default suite testName:Default test passed:0 failed:0]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [TestResultMessage suite:Default suite test:Default test method:test]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [TestResultMessage suite:Default suite test:Default test method:test]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [TestMessage suite:Default suite testName:Default test passed:1 failed:0]
[BaseMessageSender] Sending ACK 0
[SerializedMessageSender] Received message [SuiteMessage suite:Default suite ending methodCount:7]
[BaseMessageSender] Sending ACK 0
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.(Unknown Source)
at org.testng.remote.strprotocol.SerializedMessageSender.receiveMessage(SerializedMessageSender.java:37)
at org.testng.remote.strprotocol.MessageHub.receiveMessage(MessageHub.java:53)
at org.testng.remote.strprotocol.AbstractRemoteTestRunnerClient$ServerConnection.run(AbstractRemoteTestRunnerClient.java:199)
[BaseMessageSender] Sending ACK 0

@missedone
Copy link
Collaborator

@PriyadharshiniV
great, that error message is what expected to see.
thanks

@missedone
Copy link
Collaborator

@cbeust
i think the issue is quite clear now, the solution is as i stated in testng-team/testng#777.
but at the moment, i can build a remote testng only jar on my local, and make it as the agent to be communicating with testng eclipse plugin

any comments?
thanks

@cbeust
Copy link
Collaborator

cbeust commented Sep 28, 2015

Just want to make sure I understand the solution you propose.

Right now, I include the whole testng.jar inside the Eclipse plug-in.

You seem to be suggesting to not do that and instead, include a smaller "remote" TestNG jar file with just the remote agent? But you still need testng.jar, right?

Adding @juherr to the discussion.

@missedone
Copy link
Collaborator

@cbeust
correct, i'm working on a prototype, will show you later.
the point is, i need a separate testng-remote.jar which acts like an agent to be communicating with eclipse plugin, the RemoteTestNG and relate classes in the testng-remote.jar should be compitable to older version of testng, for example, 6.8.x as the minium.

@juherr
Copy link
Member

juherr commented Sep 29, 2015

As testng-remote should not updated too often once ready, and because there is no reason that testng-remote will be released with testng-eclipse or testng itself, why not having a specific repository for it?

@missedone
Copy link
Collaborator

@juherr
right, actually I have one on my local at the moment, let me finish the prototype to prove that works, for now i have some compile error with older version of testng 6.8.8, some API breaks

@missedone
Copy link
Collaborator

@cbeust and @juherr
PR #171 is the change at the plugin side to use testng-remote.jar as the agent to communicate TestNG runtime with plugin.
I created a new testng-remote git repo, and make some changes to make it compatible with testng 6.8.x:
https://github.com/missedone/testng-remote/commit/7b45bc8444ea447b9e5a25a8efc0d9075bf58ce0

cbeust added a commit that referenced this issue Oct 16, 2015
issue #91: SocketException: Software caused connection abort
cbeust added a commit that referenced this issue Oct 20, 2015
issue #91: verify the minimum required version of testng
cbeust added a commit that referenced this issue Oct 25, 2015
issue #91: add testng-remote agent jar only for testng version prior to 6.9
@rrbadam
Copy link

rrbadam commented Dec 8, 2015

image 1
Unchecking "Use project TestNG jar" under preferences>>TestNG solved my problem. I hope it helps

@missedone
Copy link
Collaborator

@rrbadam
this issue has already been fixed in latest version of testng eclipse plugin, you can update the plugin.

@kiranyajamanyam
Copy link

I am seeing the same issue with the latest TestNg plugin. When I connect to my office network it gives me this issue but it works fine with home network.

@cbeust
Copy link
Collaborator

cbeust commented Feb 10, 2016

Sounds like a proxy problem on your work firewall.

Cédric

On Wed, Feb 10, 2016 at 8:18 AM, kiranyajamanyam notifications@github.com
wrote:

I am seeing the same issue with the latest TestNg plugin. When I connect
to my office network it gives me this issue but it works fine with home
network.


Reply to this email directly or view it on GitHub
#91 (comment)
.

@kiranyajamanyam
Copy link

I have turned my firewall setting off. Do you have any work around how to fix this issue on Mac.
But it works fine in my windows VM(On my mac machine)

@missedone
Copy link
Collaborator

I dont think we can do anything for this, could you add rule to bypass localhost or 127.0.0.1 in your firewall settings?

@vijaydevhub
Copy link

Updated my TestNG and Eclipse helped me. current version -
TestNG 6.9.12.201607091356 org.testng.eclipse.feature.group Cedric Beust
Eclipse IDE for Java Developers 4.5.2.20160218-0600 epp.package.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests