SSL_write() failed errors

Palvelin Postmaster postmaster at palvelin.fi
Fri Jul 19 18:35:44 UTC 2019



> On 19 Jul 2019, at 9.59, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 
> Hello!
> 
> On Thu, Jul 18, 2019 at 10:03:24AM -0700, Palvelin Postmaster via nginx wrote:
> 
>> we’re getting random SSL_write() failed errors on seemingly 
>> legitimate requests. The common denominator seems to be they are 
>> all for static files (images, js, etc.). 
>> 
>> Can anyone help me debug the issue?
>> 
>> Here’s a debug log paste for one incident: 
>> https://pastebin.com/ZsbLuD5N
>> 
>> Our architecture is: Amazon ALB > Nginx 1.14 > PHP-FPM 7.3
> 
> The following debug log:
> 
> 2019/07/18 19:27:25 [debug] 1840#1840: *2037 SSL_write: -1
> 2019/07/18 19:27:25 [debug] 1840#1840: *2037 SSL_get_error: 6
> 2019/07/18 19:27:25 [crit] 1840#1840: *2037 SSL_write() failed (SSL:) while sending response to client...
> 
> suggests that this is due to error 6, that is, 
> SSL_ERROR_ZERO_RETURN.  This looks strange, as we haven't seen 
> this error being returned from SSL_write(), but might be 
> legitimate.  In theory this can happen if nginx got a close notify 
> SSL alert while writing a response, and probably have something to 
> do with Amazon ALB before nginx.
> 
> Just in case, could you please provide details about OpenSSL 
> library you are using ("nginx -V" should contain enough details)?

Certainly:

nginx version: nginx/1.14.0 (Ubuntu)
built with OpenSSL 1.1.0g  2 Nov 2017 (running with OpenSSL 1.1.1c  28 May 2019)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-FIJPpj/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-ndk --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-echo --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/nchan --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-lua --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/rtmp --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx-FIJPpj/nginx-1.14.0/debian/modules/http-subs-filter


More information about the nginx mailing list