Subject: channel open getting eagain though server seems to be creating one.

channel open getting eagain though server seems to be creating one.

From: Minal Patil <minalkpatil9_at_yahoo.com>
Date: Fri, 18 May 2018 08:34:54 +0000 (UTC)

Hello All,

I am seeing a strange issue when my client is running for AIX OS and connecting to Linux, at some moment of the Channel open constantly returns EAGAIN, and each next retry seems to be causing a new channel resultin into reach MaxSessions limit. This at ends results into below error at client.
Failure Event: -21 - Channel open failure (administratively prohibited)
I am attaching the sshd debug for refernce. Below is code for open channel
retry = 1;
    while (retry <= 10)
        schan->channel = libssh2_channel_open_session(snp->session);
        if (schan->channel != NULL) {
                debug(DEBUG_INFO,"\nsshChanOpenCB:Session channel open success %s",schan->command);
                return;
        }
        if (schan->errMsg != NULL) {
                free(schan->errMsg);
                schan->errMsg = NULL;
        }
        rc = libssh2_session_last_errno(snp->session);
        switch (rc) {
        case LIBSSH2_ERROR_EAGAIN:
                debug(DEBUG_INFO,"\nsshChanOpenCB:Trying again to open the channel. limit is 10");
                retry++;
                break;
        case 0:
                debug(DEBUG_INFO,"\nsshChanOpenCB:channel open success %s",schan->command);
        case LIBSSH2_ERROR_CHANNEL_FAILURE:
                debug(DEBUG_ERROR,"\nsshChanOpenCB:channel open failure %d %s :%s",rc,schan->command,schan->errMsg);
                break;
        default:
                rc = libssh2_session_last_error(snp->session,&(schan->errMsg),&errLen,1);
                debug(DEBUG_ERROR,"\nsshChanOpenCB:channel open failure %d %s :%s",rc,schan->command,schan->errMsg);
                break;
        }
    }

Any suggestions would be really appreciated.

Thanks & Regards, 
MINAL PATIL
Pune | Mobile : +91 9823613614 | Mail : minalkpatil9_at_yahoo.com

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2018-05-18