Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4150220

RMI Scalability Test fails with the following when lots of clients connected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.2.0
    • core-libs
    • sparc
    • solaris_2.6


      arthur.frechette@East 1998-06-18

      JDK1.2Beta4-J Build

      When performing RMI Scalability Testing with lots of client connections the
      following exception stack trace occurs when performing a remote method call
      to a remote server on the client holding a reference to the remote server:

      TestClient exception: Exception creating connection to: 129.148.27.233; nested exception is:
              java.net.NoRouteToHostException: Connection timed out
      java.rmi.ConnectIOException: Exception creating connection to: 129.148.27.233; nested exception is:
              java.^M
      net.NoRouteToHostException: Connection timed out
              at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:487)
              at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:149)
              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:87)
              at scal^M
      ability.TestImpl_Stub.nullCall(TestImpl_Stub.java)
              at scalability.TestClient.run(TestClient.java:341)
              at java.lang.Thread.run(Thread.java:472)

      This problem occurs most frequently as the number of clients increases. There
      seems to be a contention problem on the server if a lot of clients are trying
      to make a remote call to a remote server at approximately the same instant.

      A work around for this in the application or test code is to catch the
      exception and do retry's. By doing this it now passes. This appears to
      me to be unacceptable. If the client has a reference to the server and
      is performing a remote method call I believe if there is a contention
      problem due to number of simultaneous connections happening at server at
      once that the RMI sub-system would perform the retry's until it succeeds.

      My code was modified in the clients thread run() method from:

          try {
           rRef.nullCall();
           }
           catch (Exception e) {
           System.err.println("Exception: " + e);
           e.printStackTrace();
           }

      To the following to bypass this problem:

      connectionAttempts=0;
      succeeded=false;
           do {
      try {
      rRef.nullCall();
      succeeded = true;
           } catch (Exception e) {
      connectionAttempts++;
      sleep(2000);
           }
           } while ((!succeeded) && (connectionAttempts <= MAX_ATTEMPTS));
          
           if (connectionAttempts > MAX_ATTEMPTS) {
           System.err.println("Could not perform remote call");
      return;
           }

      The above problem occurred for a scalability run of over 480 client connections
      to a single RMI remote server object. Also was seen with approximately 300
      client connections.

            acolleysunw Adrian Colley (Inactive)
            afrechet Art Frechette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: