You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Ashutosh Kelkar <as...@clogeny.com> on 2013/09/23 06:30:19 UTC

SSHException('Error reading SSH protocol banner',) while sshing to a machine behind a load balancing rule

I am currently trying to validate the stickiness policy of a load balancing
rule by sshing to the public IP of the LB rule and verifying that the
request goes to the same machine every time.

Here is the config I use to create the LB rule.

"lbrule": {

                                    "name": "SSH",
                                    "alg": "roundrobin",
                                    # Algorithm used for load balancing
                                    "privateport": 22,
                                    "publicport": 22,
                                    "openfirewall": True,
                                    "startport": 22,
                                    "endport": 2222,
                                    "protocol": "TCP",
                                    "cidrlist": '0.0.0.0/0',
                                },

My ssh attempts fail with the following error : SSHException('Error reading
SSH protocol banner',)

Is there some more setup that is needed for SSH to work correctly? The SSH
error points to a possible firewall configuration issue.

Regards
Ashutosh

Re: SSHException('Error reading SSH protocol banner',) while sshing to a machine behind a load balancing rule

Posted by Ashutosh Kelkar <as...@clogeny.com>.
Thanks for the replies Santhosh and Chiradeep.

To answer your questions, the test is running through the marvin unit test
framework and is using paramiko for the connection to the machine.

Chiradeep could you please elaborate on how I could use HTTP in the unit
tests to validate the stickiness of the LB Rule?


Regards
Ashutosh


On Mon, Sep 23, 2013 at 11:23 AM, Santhosh Edukulla <
santhosh.edukulla@citrix.com> wrote:

> Girish,
>
> Please check  whether you were able to telnet to ssh port on that machine?
> If it works and as well, if you were able to manually do an ssh to that
> machine, then it may not be a firewall configuration issue.
>
> If we are using either pexpect\paramiko library( assuming ), then open
> call of these libraries some times gets hung for ssh. You may just wanted
> to restart the ssh daemon on the target, I have seen upgrading ssh daemon
> some times
>
> fixes this issue.
>
> Thanks!
> Santhosh
> ________________________________________
> From: Chiradeep Vittal [Chiradeep.Vittal@citrix.com]
> Sent: Monday, September 23, 2013 1:37 AM
> To: dev@cloudstack.apache.org
> Cc: Girish Shilamkar
> Subject: Re: SSHException('Error reading SSH protocol banner',) while
> sshing to a machine behind a load balancing rule
>
> What tool/library are you using to perform the SSH?
> SSH is not a good way to test the algorithm. How are you going to test
> other stickiness methods?
> Best to use good old HTTP.
>
> On 9/22/13 9:30 PM, "Ashutosh Kelkar" <as...@clogeny.com> wrote:
>
> >I am currently trying to validate the stickiness policy of a load
> >balancing
> >rule by sshing to the public IP of the LB rule and verifying that the
> >request goes to the same machine every time.
> >
> >Here is the config I use to create the LB rule.
> >
> >"lbrule": {
> >
> >                                    "name": "SSH",
> >                                    "alg": "roundrobin",
> >                                    # Algorithm used for load balancing
> >                                    "privateport": 22,
> >                                    "publicport": 22,
> >                                    "openfirewall": True,
> >                                    "startport": 22,
> >                                    "endport": 2222,
> >                                    "protocol": "TCP",
> >                                    "cidrlist": '0.0.0.0/0',
> >                                },
> >
> >My ssh attempts fail with the following error : SSHException('Error
> >reading
> >SSH protocol banner',)
> >
> >Is there some more setup that is needed for SSH to work correctly? The SSH
> >error points to a possible firewall configuration issue.
> >
> >Regards
> >Ashutosh
>
>

RE: SSHException('Error reading SSH protocol banner',) while sshing to a machine behind a load balancing rule

Posted by Santhosh Edukulla <sa...@citrix.com>.
Girish,

Please check  whether you were able to telnet to ssh port on that machine? If it works and as well, if you were able to manually do an ssh to that machine, then it may not be a firewall configuration issue. 

If we are using either pexpect\paramiko library( assuming ), then open call of these libraries some times gets hung for ssh. You may just wanted to restart the ssh daemon on the target, I have seen upgrading ssh daemon some times 

fixes this issue. 

Thanks!
Santhosh
________________________________________
From: Chiradeep Vittal [Chiradeep.Vittal@citrix.com]
Sent: Monday, September 23, 2013 1:37 AM
To: dev@cloudstack.apache.org
Cc: Girish Shilamkar
Subject: Re: SSHException('Error reading SSH protocol banner',) while sshing to a machine behind a load balancing rule

What tool/library are you using to perform the SSH?
SSH is not a good way to test the algorithm. How are you going to test
other stickiness methods?
Best to use good old HTTP.

On 9/22/13 9:30 PM, "Ashutosh Kelkar" <as...@clogeny.com> wrote:

>I am currently trying to validate the stickiness policy of a load
>balancing
>rule by sshing to the public IP of the LB rule and verifying that the
>request goes to the same machine every time.
>
>Here is the config I use to create the LB rule.
>
>"lbrule": {
>
>                                    "name": "SSH",
>                                    "alg": "roundrobin",
>                                    # Algorithm used for load balancing
>                                    "privateport": 22,
>                                    "publicport": 22,
>                                    "openfirewall": True,
>                                    "startport": 22,
>                                    "endport": 2222,
>                                    "protocol": "TCP",
>                                    "cidrlist": '0.0.0.0/0',
>                                },
>
>My ssh attempts fail with the following error : SSHException('Error
>reading
>SSH protocol banner',)
>
>Is there some more setup that is needed for SSH to work correctly? The SSH
>error points to a possible firewall configuration issue.
>
>Regards
>Ashutosh


Re: SSHException('Error reading SSH protocol banner',) while sshing to a machine behind a load balancing rule

Posted by Chiradeep Vittal <Ch...@citrix.com>.
What tool/library are you using to perform the SSH?
SSH is not a good way to test the algorithm. How are you going to test
other stickiness methods?
Best to use good old HTTP.

On 9/22/13 9:30 PM, "Ashutosh Kelkar" <as...@clogeny.com> wrote:

>I am currently trying to validate the stickiness policy of a load
>balancing
>rule by sshing to the public IP of the LB rule and verifying that the
>request goes to the same machine every time.
>
>Here is the config I use to create the LB rule.
>
>"lbrule": {
>
>                                    "name": "SSH",
>                                    "alg": "roundrobin",
>                                    # Algorithm used for load balancing
>                                    "privateport": 22,
>                                    "publicport": 22,
>                                    "openfirewall": True,
>                                    "startport": 22,
>                                    "endport": 2222,
>                                    "protocol": "TCP",
>                                    "cidrlist": '0.0.0.0/0',
>                                },
>
>My ssh attempts fail with the following error : SSHException('Error
>reading
>SSH protocol banner',)
>
>Is there some more setup that is needed for SSH to work correctly? The SSH
>error points to a possible firewall configuration issue.
>
>Regards
>Ashutosh