某年某月某日临近中午,用户突然反应系统出了问题,微信小程序的几个界面加载异常,不能正常访问。紧急排查发现,后端应用有大量的如下错误日志,错误信息SSL peer shut down incorrectly字面上看上去是HTTPS请求Nginx后SSL握手错误,于是再去查看Nginx的日志。
1 2 3 4 5 6
Error while extracting response for type [class java.lang.String] and content type [application/json;charset=utf-8]; nested exception is javax.net.ssl.SSLException: SSL peer shut down incorrectly org.springframework.web.client.RestClientException: Error while extracting response for type [class java.lang.String] and content type [application/json;charset=utf-8]; nested exception is javax.net.ssl.SSLException: SSL peer shut down incorrectly at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:115) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:725) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:435)
[root@localhost nginx]# ll total 4 drwx------. 2 webapp webapp 6 Jan 31 05:50 client_body_temp drwxr-xr-x. 2 webapp webapp 4096 Jan 31 05:52 conf drwx------. 2 webapp webapp 6 Jan 31 05:50 fastcgi_temp drwxr-xr-x. 2 webapp webapp 40 Jan 31 05:50 html drwxr-xr-x. 2 webapp webapp 58 Jan 31 05:50 logs drwx------. 2 webapp webapp 6 Jan 31 05:50 proxy_temp drwxr-xr-x. 2 webapp webapp 19 Jan 31 05:50 sbin drwx------. 2 webapp webapp 6 Jan 31 05:50 scgi_temp drwx------. 2 webapp webapp 6 Jan 31 05:50 uwsgi_temp
1 2 3
[root@localhost nginx]# ./sbin/nginx -t nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok nginx: configuration file /opt/nginx/conf/nginx.conf test is successful
1 2 3 4 5 6 7 8 9 10 11
[root@localhost nginx]# ll total 4 drwx------. 2 nobody webapp 6 Jan 31 05:50 client_body_temp drwxr-xr-x. 2 webapp webapp 4096 Jan 31 05:52 conf drwx------. 2 nobody webapp 6 Jan 31 05:50 fastcgi_temp drwxr-xr-x. 2 webapp webapp 40 Jan 31 05:50 html drwxr-xr-x. 2 webapp webapp 58 Jan 31 05:50 logs drwx------. 2 nobody webapp 6 Jan 31 05:50 proxy_temp drwxr-xr-x. 2 webapp webapp 19 Jan 31 05:50 sbin drwx------. 2 nobody webapp 6 Jan 31 05:50 scgi_temp drwx------. 2 nobody webapp 6 Jan 31 05:50 uwsgi_temp