1 Reply Latest reply: May 11, 2012 7:18 PM by EJP RSS

    "Software caused connection abort: socket write error after 300 connections

    843793
      I have a fairly simple RMI server and I am stress testing it using an applet that attempts 1000 connections and operations. After about 300 or so I get the following exceptions on the server. Any idea what might be causing them? The method call in question is a callback.

      java.rmi.MarshalException: error marshalling arguments; nested exception is:
      java.net.SocketException: Software caused connection abort: socket write error
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138)
      at com.test.TestApplet_Stub.render(Unknown Source)
      at com.test.TestServerDaemon$2.run(TestServerDaemon.java:118)
      Caused by: 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.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
      at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
      at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
      at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1876)
      at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1537)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
      at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      ... 3 more
      java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
      java.net.SocketException: Connection reset
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
      at com.test.TestApplet_Stub.render(Unknown Source)
      at com.test.TestServerDaemon$2.run(TestServerDaemon.java:118)
      Caused by: java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
      at java.io.DataInputStream.readByte(DataInputStream.java:248)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
      ... 5 more

      Thanks,

      -KP

      Edited by: EJP on 12/05/2012 10:16: fixed your title to include the entire message. Don't trim exception messages.