502 Bad Gateway/while SSL handshaking to upstream

teege teege.b at gmail.com
Fri Apr 23 12:36:48 MSD 2010


and I'm running the following versions, meant to include this originally:

$ nginx/sbin/nginx -v
nginx version: nginx/0.7.65
$ haproxy/bin/haproxy -v
HA-Proxy version 1.4.2 2010/03/17
$ apache/bin/httpd -v
Server version: Apache/2.2.14 (Unix)
$ tomcat/bin/version.sh
Server version: Apache Tomcat/6.0.20

teege


On Fri, Apr 23, 2010 at 1:28 AM, teege <teege.b at gmail.com> wrote:
> I have been fighting with this one for some time, would appreciate
> some assistance.
>
> in my test environment on ec2, I have:
>
> [ nginx -> haproxy ] -> [ apache w/ ajp -> tomcat ] -> [ mysql cluster ]
>
> nginx and haproxy on the same machine, apache and tomcat on the same
> machine - and the mysql cluster has 2-4 sql nodes+data nodes.
>
> I have been testing with a single GET request, which exercises all of
> the above (ex. ab -n 200 -c 200). the net of the problem is that 95%
> of the time, 1/3 to 1/2 of my connections result in a 502 returned by
> nginx. I've yet to have the full 200 completed requests.
>
> the nginx error.log contains both types of errors below, but there is
> a direct relation to the failures - if 93/200 connections result in a
> 502, I will have exactly 93 SSL handshake errors - so I've narrowed
> the problem down I believe.
>
> a)
> 2010/04/23 07:49:43 [error] 18430#0: *364 SSL_do_handshake() failed
> (SSL: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or
> bad record mac) while SSL handshaking to upstream, client: 174.1.X.X,
> server: api.example.com, request: "GET /1.0/getName HTTP/1.0",
> upstream: "https://127.0.0.1:8003/1.0/getName", host:
> "api.example.com"
>
> b)
> 2010/04/23 07:49:41 [info] 18430#0: *260 peer closed connection in SSL
> handshake while SSL handshaking to upstream, client: 174.10.X.X,
> server: api.example.com, request: "GET /1.0/getName HTTP/1.0",
> upstream: "https://127.0.0.1:8003/1.0/getName", host:
> "api.example.com"



More information about the nginx mailing list