Nginx报upstream timed out错误
前两天给客户部署生产环境,客户提供的是windows服务,我们的系统是前后台分离的,前台使用nginx容器,我按正常思路部署好服务后,前台页面正常显示,但是前台连接后台时,时好时坏,经常连不到后台服务器,但是后台正常提供服务,经过简单分析,应该是nginx的问题。看了下nginx的日志,发现error.log果然有错误抛出。
2018/09/20 16:41:47 [error] 2280#4160: *15 upstream timed out (10060: 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: 127.0.0.1, server: 127.0.0.1, request: "POST /*****/pc/sys/login HTTP/1.1", upstream: "http://[::1]:8080/*****/pc/sys/login", host: "localhost", referrer: "http://localhost/loginOld"
2018/09/20 16:44:09 [error] 2280#4160: *47 upstream timed out (10060: 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: 127.0.0.1, server: 127.0.0.1, request: "POST /*****/pc/sys/login HTTP/1.1", upstream: "http://[::1]:8080/*****/pc/sys/login", host: "127.0.0.1", referrer: "http://127.0.0.1/loginOld"
2018/09/20 16:45:40 [error] 2280#4160: *51 upstream timed out (10060: 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: 127.0.0.1, server: 127.0.0.1, request: "POST /*****/pc/sys/login HTTP/1.1", upstream: "http://[::1]:8080/*****/pc/sys/login", host: "127.0.0.1", referrer: "http://127.0.0.1/loginOld"
我把重点标红了,大家看到是不是很奇怪,地址里怎么会有[::1] 这样的地址呢,其实谜底在这里
现在ip地址有两种ipv4和ipv6,区别我就不讲了,大家可以问度娘,关键是现在很多操作系统默认使用IPV6了,如果是这样的话localhost就不好使了,他会被转换成http://[::1]:这种地址。查看nginx配置文件
把所有localhost改为127.0.0.1,完美解决问题
Nginx报upstream timed out错误相关推荐
- Nginx报504 gateway timeout错误的解决方法
提供给客户的bs软件,有一个导出报表的功能,经常性的报504错误 最近在工作中,需要做Excel导入的功能,由于Excel的数据比较多,而且我们的服务端程序需要对数据的内容做校验,会调用很多的外部服务 ...
- nginx报 File not found 错误
原因可能很多,但对于初学者.大部分应该是/etc/nginx/conf.d/default.conf里面的php解析部分配置不对. 解决的话就是把root定义,在server下加上,这样root的作用 ...
- Nginx报错:upstream timed out (110: Connection timed out)和client intended to send too large body【转】...
nginx日志报错 2018/01/26 16:36:49 [error] 23327#0: *54953 upstream timed out (110: Connection timed out) ...
- nginx 报错 upstream timed out (110: Connection timed out)解决方案
nginx 报错 upstream timed out (110: Connection timed out)解决方案 参考文章: (1)nginx 报错 upstream timed out (11 ...
- 记一次网站故障排查过程(nginx 504状态码、 upstream timed out (110: Connection timed out)以及jbd2引起IO高
一.问题描述 客户侧反馈无法正常访问系统,页面转圈,时好时坏,访问不稳定. 二.系统环境: 机器环境:UOS . nginx .php(对接其他服务器kingbase .钉钉.redis .KF) E ...
- nginx响应超时upstream timed out (110: Connection timed out) while reading response header from upstream
问题描述 解决方法 提高nginx网络吞吐量buffers优化指令说明 nginx代理超时配置 nginx缓存区大小设置 问题描述 后台server服务响应时间正常,但是请求没有打到服务器,在ngin ...
- nginx报http400错误解决方法
nginx报http400错误解决方法 参考文章: (1)nginx报http400错误解决方法 (2)https://www.cnblogs.com/hunter-zyg/p/4809708.htm ...
- Nginx PHP 报504 Gateway time-out错误的解决方法
Nginx PHP 报504 Gateway time-out错误的解决方法 参考文章: (1)Nginx PHP 报504 Gateway time-out错误的解决方法 (2)https://ww ...
- mysql405错误_mysql - 在框架内php调用某个方法, nginx 报 405错误 Status Code:405 Method Not Allowed...
在框架内方法某个方法 nginx 报 405错误 Status Code:405 Method Not Allowed Remote Address:102.224.214.168:80 Reques ...
最新文章
- 我们距离AI编程还有多远?
- .Net运行时的相互关系
- 哪里学php开发,哪里学web开发
- python with open 循环建立指定名字文件_Python基础——文件
- 微信网页授权,并获取用户头像,昵称等基本信息代码实例
- linux中命令对c文件进行编译,Linux下C语言编译基础及makefile的编写
- windbg调试windows下的程序
- 2021年最新外卖侠cps小程序,三级分销返利外卖领劵小程序源码,带电影票分销积分商城(外卖侠重要功能)
- RGB 与 RGBA 与 16进制 与 HSL 之间的简单转换
- MapInfo教程--二次开发入门
- Microsoft-Yahoo: Not Again. Why Again?
- 如何将py文件转化为exe
- 2020使用html、js、正则表达式做一个前端注册表单信息验证
- 中划线与下划线的区别
- PHP字符串变量的长度限制问题
- AIGC席卷,抖快、阅文、知乎大战网文圈
- mathmatic engineer
- 80x86的寻址方式及Dosbox演示
- Abaqus软件介绍
- 数据仓库ETL工具箱——清洗和规范化(一)
热门文章
- 超赞!每个设计师都应该了解的IOS编年史
- OSPF——5种报文(图解)
- WPS无法关闭excel表格,提示:关闭窗口前请先退出编辑单元格内容或格式
- ElasticSearch 2 (25) - 语言处理系列之同义词
- Python 斐波那契数
- 采用SAMKeychain钥匙串存储设备唯一标示与何种情况下同一个手机它存储的值会变化
- 实战Nagios NSCA方式监控Linux系统资源使用情况 -- Nagios配置篇 -- Nagios Server端
- win10更新至1909版本后,Primo Ramdisk失效的解决方案
- java中正则表达式校验日期,1999-01-01 ,1991\01\01,-分割和\分割两种形式
- ijkplayer源码---FFPlayer结构体4 SDL_Aout