# Ssl test causes nginx to crash (SSL\_do\_handshake() failed)

**URL:** <https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564>\
**Category:** NGINX\
**Created:** [May 4, 2016, 8:39am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564 "2016-05-04T08:39:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [May 4, 2016, 8:39am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/1 "2016-05-04T08:39:44Z")

</div>

I tried to do use the ssltest from [qualys.com](http://qualys.com):  
[SSL Server Test (Powered by Qualys SSL Labs)](https://www.ssllabs.com/ssltest/)

Every time i run it, my nginx server (ssl terminator) crashes and i have  
to  
restart it.

I get the following error in my nginx logs:

\*734 SSL\_do\_handshake() failed (SSL: error:140A1175:SSL  
routines:SSL\_BYTES\_TO\_CIPHER\_LIST:inappropriate fallback) while SSL  
handshaking, client: …, server: …

I’ve got the following configuration:

server{  
listen …:80;  
add\_header Strict-Transport-Security max-age=15768000;  
server\_name …;  
rewrite ^ https://$server\_name$uri? permanent;  
#location / {

# proxy\_pass …:80;

# proxy\_set\_header Host $host;

# proxy\_set\_header X-Real-IP $remote\_addr;

# proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;

# }

}

server {  
listen …:443;  
ssl on;

ssl\_certificate /etc/nginx/certkeys/…crt;  
ssl\_certificate\_key /etc/nginx/certkeys/…key;  
server\_name …;  
access\_log /var/log/nginx/running.log;  
error\_log /var/log/nginx/errorReport.log;  
keepalive\_timeout 70;  
ssl\_session\_timeout 30m;  
ssl\_protocols TLSv1.2 TLSv1.1 TLSv1;

ssl\_ciphers HIGH:!aNULL:!MD5;  
ssl\_prefer\_server\_ciphers on;

location / {  
proxy\_pass …:80/;  
proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
}  
}

Posted at Nginx Forum:

> **[ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266590#msg-266590)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 4, 2016, 9:27am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/2 "2016-05-04T09:27:03Z")

</div>

kostbad:

> Every time i run it, my nginx server (ssl terminator) crashes and i have to  
> restart it.
> 
> I get the following error in my nginx logs:
> 
> \*734 SSL\_do\_handshake() failed (SSL: error:140A1175:SSL  
> routines:SSL\_BYTES\_TO\_CIPHER\_LIST:inappropriate fallback) while SSL  
> handshaking, client: …, server: …

that’s not a “crash”  
Scanning a server using ssllabs generate many error messages of this  
kind.  
That’s intentional.

While the scan run and also after the scan the server should be  
accessible as usual.  
If not, that would be an error - true.  
But the logmessage you presented above don’t show such error.

Andreas

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 4, 2016, 9:56am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/3 "2016-05-04T09:56:50Z")

</div>

When ssllabs tests for deprecated cipher suites, it stays there forever.  
I have to close the ssllabs test page and then my nginx server stays  
down  
until i restart it.

I also got the following error:  
113 upstream prematurely closed connection while reading response header  
from upstream, client: … server: …, request: “GET  
/…/images/logo.jpg HTTP/1.1”, upstream:  
“http:…80/…/images/logo.jpg”, host: “…”,  
referrer: “https://…”

Posted at Nginx Forum:

> **[Re: ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266592#msg-266592)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 4, 2016, 12:59pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/4 "2016-05-04T12:59:06Z")

</div>

The nginx version is 1.2.6.

Posted at Nginx Forum:

> **[Re: RE: ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266603#msg-266603)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 4, 2016, 11:47am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/5 "2016-05-04T11:47:50Z")

</div>

> When ssllabs tests for deprecated cipher suites, it stays there forever.  
> I have to close the ssllabs test page and then my nginx server stays down  
> until i restart it.

Please provide the output ofnginx -V.

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 5, 2016, 7:51am UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/6 "2016-05-05T07:51:48Z")

</div>

Sorry, this is the output i get:  
Thanks, it’s probably time to update my system.

nginx version: nginx/1.2.6  
built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)  
TLS SNI support enabled  
configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid  
–lock-path=/var/run/nginx.lock  
–http-client-body-temp-path=/var/cache/nginx/client\_temp  
–http-proxy-temp-path=/var/cache/nginx/proxy\_temp  
–http-fastcgi-temp-path=/var/cache/nginx/fastcgi\_temp  
–http-uwsgi-temp-path=/var/cache/nginx/uwsgi\_temp  
–http-scgi-temp-path=/var/cache/nginx/scgi\_temp --user=nginx  
–group=nginx  
–with-http\_ssl\_module --with-http\_realip\_module  
–with-http\_addition\_module  
–with-http\_sub\_module --with-http\_dav\_module --with-http\_flv\_module  
–with-http\_mp4\_module --with-http\_gzip\_static\_module  
–with-http\_random\_index\_module --with-http\_secure\_link\_module  
–with-http\_stub\_status\_module --with-mail --with-mail\_ssl\_module  
–with-file-aio --with-ipv6 --with-cc-opt=‘-O2 -g’

Posted at Nginx Forum:

> **[Re: RE: ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266637#msg-266637)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 5, 2016, 2:12pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/7 "2016-05-05T14:12:40Z")

</div>

How do i update to the latest stable version of nginx on a CentOS 6.7  
server?

Are there any precautions before the update? Will if affect my current  
settings-conf ?

Posted at Nginx Forum:

> **[Re: ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266641#msg-266641)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 5, 2016, 5:45pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/8 "2016-05-05T17:45:53Z")

</div>

> nginx version: nginx/1.2.6  
> built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)  
> […]  
> CentOS 6.7 server

Try disabling kerberos cipher suites [1], you may be hitting  
some obscure CentOS/RedHat libc issues [2].

[1]

> **[Redirecting to configurator.tlsref.org...](https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=nginx-1.2.6&openssl=1.0.1e&hsts=no&profile=old)**

[2] [debugging a crash in haproxy - atp](http://blog.tinola.com/?e=36)

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 4, 2016, 2:28pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/9 "2016-05-04T14:28:29Z")

</div>

Hello!

On Wed, May 04, 2016 at 06:58:19AM -0400, kostbad wrote:

> The nginx version is 1.2.6.

That’s not “nginx -V” output you were asked for. Nevertheless,  
it’s probably enough to conclude you should upgrade before doing  
anything else. The 1.2.x branch is not supported for more than 3  
years now.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 11, 2016, 1:51pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/10 "2016-05-11T13:51:03Z")

</div>

> I updated nginx but the problem persists.
> 
> Could it be some sort of misconfiguration of my nginx?

No, but I suggest you try reconfiguring your cipher suitesanyway to  
exclude anything kerberos related like previously suggested.

Lukas

---

<div class="post-metadata">

**Author:** ![kostbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19adc/32.png) [@kostbad](https://www.ruby-forum.com/u/kostbad)\
**Post date:** [May 11, 2016, 1:07pm UTC](https://www.ruby-forum.com/t/ssl-test-causes-nginx-to-crash-ssl-do-handshake-failed/244564/11 "2016-05-11T13:07:49Z")

</div>

I updated nginx but the problem persists.

Could it be some sort of misconfiguration of my nginx?

Posted at Nginx Forum:

> **[Re: RE: ssl test causes nginx to crash (SSL\_do\_handshake() failed)](https://forum.nginx.org/read.php?2,266590,266800#msg-266800)**
>
> I tried to do use the ssltest from qualys.com: https://www.ssllabs.com/ssltest/ Every time i run it, my nginx server (ssl terminator) crashes and i have to restart it. I get the following error in my nginx logs: \*734 SSL\_do\_handshake() failed (SSL:
