Menu

timeout in wating for rekeying process.

2014-05-21
2014-06-09
  • Jon Gorrono

    Jon Gorrono - 2014-05-21

    I have looked thru the code and I see that this occurs if the timeout passed into connect() is exceeded while negotiating... but what it confounding to me is that this message sometimes occurs immediately. My timeout is a static value in the same class and so cannot be null and it is set to 20000.

    jsch.setKnownHosts(knownHostsFile);
    jsch.addIdentity((String)settings.get(SSHTunnel.KEY_IDFILE), "");
    session = jsch.getSession((String)settings.get(SSHTunnel.KEY_REMOTEACCOUNT), (String)settings.get(SSHTunnel.KEY_REMOTEHOST));
    session.setDaemonThread(true);
    session.setServerAliveCountMax((Integer)settings.get(SSHTunnel.KEY_SERVER_ALIVE_COUNTMAX));
    session.setServerAliveInterval((Integer)settings.get(SSHTunnel.KEY_SERVER_ALIVE_INTERVAL));
    session.connect(TIME_WAIT);
    assigned_port=session.setPortForwardingL(
    (Integer)settings.get(SSHTunnel.KEY_LOCALPORT),
    (String)settings.get(SSHTunnel.KEY_REMOTEHOST_TUNNEL),
    (Integer)settings.get(SSHTunnel.KEY_REMOTEPORT));
    ~~~~~

     

    Last edit: Jon Gorrono 2014-05-21
    • Jon Gorrono

      Jon Gorrono - 2014-06-09

      More supporting information....
      code:

       line 0: private static int TIME_WAIT = 20000;
      ...
       line 1: l.debug("starting connection @ " + System.currentTimeMillis());
       line 2: session.connect(TIME_WAIT);
       line 3 l.debug("starting tunnel @ " + System.currentTimeMillis());
      
      log output:
      
      2014-06-06 19:59:13 DEBUG SSHTunnel$Tunnel:125 - starting connection @ 1402109953613
      2014-06-06 19:59:13 ERROR SSHTunnel$Tunnel:341 - timeout in wating for rekeying process.
      2014-06-06 19:59:13 INFO  SSHTunnel$Tunnel:197 - tunnel will remain open for 180 seconds
      2014-06-06 19:59:13 INFO  SSHTunnel$Tunnel:197 - Exiting SSH Tunnel thread - Thread[Thread-29,7,main]
      

      ... line 3 is never reached after the exception and the logoutput from line 1 is in the same second as the log output just before the connection attempt

       

Log in to post a comment.