问题描述:

nginx连接后台tomcat程序 一直报错

nginx的error日志如下

// :: [error] #: * upstream timed out (: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 42.234.50.129, server: localhost, request: "POST ……", upstream: "http://10.10.:8103/JWebService/JService", host: ""
// :: [error] #: * upstream timed out (: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 125.45.125.107, server: localhost, request: "", upstream: "http://10.10.:8202/JWebService/JService", host: ""
// :: [error] #: * upstream timed out (: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 42.233.94.168, server: localhost, request: "", upstream: "http://10.10.:8201/JWebService/JService", host: ""
// :: [error] #: * upstream timed out (: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 125.46.40.38, server: localhost, request: "", upstream: "http://10.10.:8202/JWebService/JService", host: ""
// :: [error] #: * upstream timed out (: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 219.154.200.226, server: localhost, request: "", upstream: "http://10.10.:8203/JWebService/JService", host: ""

可以看到 用户访问nginx后,nginx将请求转发给 后端tomcat服务器,一直报超时

tomcat无返回数据。

初步判断是tomcat的问题,重启tomcat后问题依旧存在

通过查询得知,服务器使用的windows版本是

通过各种渠道询问后得知,微软官网的一个公告

从系统启动,Windows Vista 中、 在 Windows  中,Windows Server  中和在 Windows Server  R2 中的  天后未关闭 TIME_WAIT 状态的所有 TCP/IP 端口

症状
在计算机上运行的 Windows Vista,Windows ,Windows Server 中,还是 Windows Server R2,您遇到以下问题。 问题
在系统启动时从 天后所有在TIME_WAIT状态的 TCP/IP 端口都不会被关闭。因此, TCP/IP 端口可能会被用光,并且可能不会创建新的 TCP/IP 会话。 注意:这台计算机某些与网络相关的操作可能受此问题。例如,您试图使用某些远程管理工具来管理已超过 天运行的基于 Windows Server 的域控制器。在此示例中,远程管理工具无法连接到域控制器。

查看服务器的开机时间

开机了499天,问题正好是在两天前出现的,正是公告中所说的497天后

确定问题!!!

微软官网公告地址:
https://support.microsoft.com/zh-cn/help/2553549/all-the-tcp-ip-ports-that-are-in-a-time-wait-status-are-not-closed-aft?tdsourcetag=s_pctim_aiomsg

解决方法:

补丁包已经无法下载了,所有直接使用微软官方的更新程序

最新文章

  1. 【译】Unity3D Shader 新手教程(2/6) —— 积雪Shader
  2. checkbox和文本上下对齐
  3. 【读书笔记】.Net并行编程高级教程--Parallel
  4. IM即时通讯
  5. 未能加载文件或程序集“Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30a [问题点数:40分,结帖人u010259408]
  6. iOS 用代码+Xib搭建UI界面实例
  7. SQL Server2008ldf文件太大
  8. 关于wait和notify的用法
  9. 防止IE7,8进入怪异模式
  10. 安装Theano
  11. SQL-Teradata基础
  12. Hadoop-Yarn-框架原理及运作机制
  13. SPOJ 1811 LCS - Longest Common Substring
  14. 【转】让Xcode支持iOS12.0 设备真机测试(不断更新真机支持包)Xcode 真机测试 iOS
  15. 使用python调用淘宝的ip地址库查询接口结合zabbix判断dnspod域名解析是否正确
  16. 行为链分析zipkin
  17. .net 4中使用 dynamic,将json字符串转成对象的 万能方法。
  18. Servlet基本用法(二)接口和类
  19. 用到了yii2 hasMany() 方法,一对多关联
  20. [BZOJ4137]火星商店问题

热门文章

  1. docker使用阿里云加速器
  2. L1-006 连续因子 (20分)
  3. FFT 入门
  4. Java服务端两个常见的并发错误
  5. 机器学习-Tensorflow之Tensor和Dataset学习
  6. 1114 记录一点点吧 RP Axure
  7. BZOJ 1770 lights燈
  8. 04--Java--使用eclipse创建开发java项目步骤
  9. Python PID
  10. 画布 canvas 的相关内容