java.net.SocketException

tip

Probably there is a bug in TestNG Eclipse plugin (6.8.6.20130607_0745), try an other version (e.g. 6.8.0.20121120_1820)

tip

before running my test in debug mode, i open the debug view, and remove some breakpoints (such as some remaining on NullPointersExceptions, and Sockets)

tip

Try removing all the breakpoints (even if breakpoints are disabled the problem still occurs, yes even if both disabled entirely and piecewise).

tip

There is a known issue between TestNG 6.4 and IDEA, the next EAP will fix this but in the meantime, use the previous version.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Hello, we have made a Testupgrade (5.5.4 -> 5.9.4) and client-cli worked (even without update) but only for files/attachment uploads with Filesize < 10 MB. For bigger file we get a "Remote error: java.lang.OutOfMemoryError: Java heap space;" (details below). So we updated to latest Java (8) and latest Client Version but the problem still persists. On the server itself, there was no entry in the atlassian-confluence.log. We already tried adding "-d64 -ms512m -mx4g" but this did change nothing - or did we specify something wrong? This is the commandline used: java -d64 -ms512m -mx4g -jar "%dirPath%"/lib/confluence-cli-5.1.0.jar --server http://192.168.10.184:8090 --user admin --password ZZZZZZZZ %* And this the batch used: CALL .\confluence.bat --action addAttachment --space "LL" --title "Handbuecher Dokus LL21" --content "attachment content" --file "\\srvchk\docandhelp\Doc\LL21\DE\release\Designer-Handbuch.pdf" --name "Designer-Handbuch_DE.pdf" --comment "Designer-Handbuch DE" Thanks in advance for any hint, Bye Sven PS: This is the error in detail: D:\Wiki\atlassian-cli-5.1.0>CALL .\confluence.bat --action addAttachment --space "LL" --title "Handbuecher Dokus LL21" --content "attachment content" --file "\\srvchk\docandhelp\Doc\LL21\DE\release\Designer-Handbuch.pdf" --name "Designer-Handbuch_DE.pdf" --comment "Designer-Handbuch DE" Remote error: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space Attachment 'Programmierer-Referenz_DE.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328232, url: http://192.168.10.184:8090/download/attachments/41877823/Programmierer-Referenz_DE.pdf?version=4&modificationDate=1455530318079&api=v2 Attachment 'Update-Hinweise_DE.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328233, url: http://192.168.10.184:8090/download/attachments/41877823/Update-Hinweise_DE.pdf?version=4&modificationDate=1455530321521&api=v2 0 [main] ERROR org.apache.axis.Message - java.io.IOException: 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.BufferedOutputStream.write(Unknown Source) at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265) at org.apache.axis.Message.writeTo(Message.java:539) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:5751) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3145) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3016) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:751) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:312) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:171) Remote error: ; nested exception is: java.net.SocketException: Software caused connection abort: recv failed Remote error: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space Attachment 'Programmers-Manual_US.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328234, url: http://192.168.10.184:8090/download/attachments/41877823/Programmers-Manual_US.pdf?version=3&modificationDate=1455530421984&api=v2 Attachment 'Update-Information_US.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328235, url: http://192.168.10.184:8090/download/attachments/41877823/Update-Information_US.pdf?version=4&modificationDate=1455530423767&api=v2 0 [main] ERROR org.apache.axis.Message - java.io.IOException: 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.BufferedOutputStream.write(Unknown Source) at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265) at org.apache.axis.Message.writeTo(Message.java:539) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:5751) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3145) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3016) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:751) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:312) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:171) Remote error: ; nested exception is: java.net.SocketException: Software caused connection abort: recv failed Press any key to continue . . .
    via by Sven Schaetzl,
  • Hello, we have made a Testupgrade (5.5.4 -> 5.9.4) and client-cli worked (even without update) but only for files/attachment uploads with Filesize < 10 MB. For bigger file we get a "Remote error: java.lang.OutOfMemoryError: Java heap space;" (details below). So we updated to latest Java (8) and latest Client Version but the problem still persists. On the server itself, there was no entry in the atlassian-confluence.log. We already tried adding "-d64 -ms512m -mx4g" but this did change nothing - or did we specify something wrong? This is the commandline used: java -d64 -ms512m -mx4g -jar "%dirPath%"/lib/confluence-cli-5.1.0.jar --server http://192.168.10.184:8090 --user admin --password ZZZZZZZZ %* And this the batch used: CALL .\confluence.bat --action addAttachment --space "LL" --title "Handbuecher Dokus LL21" --content "attachment content" --file "\\srvchk\docandhelp\Doc\LL21\DE\release\Designer-Handbuch.pdf" --name "Designer-Handbuch_DE.pdf" --comment "Designer-Handbuch DE" Thanks in advance for any hint, Bye Sven PS: This is the error in detail: D:\Wiki\atlassian-cli-5.1.0>CALL .\confluence.bat --action addAttachment --space "LL" --title "Handbuecher Dokus LL21" --content "attachment content" --file "\\srvchk\docandhelp\Doc\LL21\DE\release\Designer-Handbuch.pdf" --name "Designer-Handbuch_DE.pdf" --comment "Designer-Handbuch DE" Remote error: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space Attachment 'Programmierer-Referenz_DE.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328232, url: http://192.168.10.184:8090/download/attachments/41877823/Programmierer-Referenz_DE.pdf?version=4&modificationDate=1455530318079&api=v2 Attachment 'Update-Hinweise_DE.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328233, url: http://192.168.10.184:8090/download/attachments/41877823/Update-Hinweise_DE.pdf?version=4&modificationDate=1455530321521&api=v2 0 [main] ERROR org.apache.axis.Message - java.io.IOException: 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.BufferedOutputStream.write(Unknown Source) at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265) at org.apache.axis.Message.writeTo(Message.java:539) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:5751) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3145) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3016) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:751) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:312) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:171) Remote error: ; nested exception is: java.net.SocketException: Software caused connection abort: recv failed Remote error: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space Attachment 'Programmers-Manual_US.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328234, url: http://192.168.10.184:8090/download/attachments/41877823/Programmers-Manual_US.pdf?version=3&modificationDate=1455530421984&api=v2 Attachment 'Update-Information_US.pdf' of type 'application/pdf' added to page 'Handbuecher Dokus LL21' in space 'LL', id: 56328235, url: http://192.168.10.184:8090/download/attachments/41877823/Update-Information_US.pdf?version=4&modificationDate=1455530423767&api=v2 0 [main] ERROR org.apache.axis.Message - java.io.IOException: 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.BufferedOutputStream.write(Unknown Source) at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265) at org.apache.axis.Message.writeTo(Message.java:539) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:5751) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3145) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3016) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:751) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:312) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:171) Remote error: ; nested exception is: java.net.SocketException: Software caused connection abort: recv failed Press any key to continue . . .
    via by Sven Schaetzl,
  • Issue while uploading document more than 4MB by using Apache Axis 2
    via by chandrasekhar bodireddy,
  • File Retrieval from java code
    via Stack Overflow by user725455
    ,
    • 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.BufferedOutputStream.write(Unknown Source) at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265) at org.apache.axis.Message.writeTo(Message.java:539) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:5751) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3145) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:3016) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:751) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:312) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:171)

    Users with the same issue

    Aria PahlavanAria Pahlavan
    1312 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    BardhBardh
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    209 more bugmates