openresty 错误日志报错内容:

// :: [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: 10.4.101.11, server: localhost, request: "GET /xxx.jsp HTTP/1.1", upstream: "http://[::1]:8080/xxx.jsp", host: "10.1.3.42", referrer: "http://10.1.3.42/xxxindex.jsp"
// :: [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: 10.4.101.11, server: localhost, request: "GET /xxx.jsp HTTP/1.1", upstream: "http://[::1]:8080/xxx.jsp", host: "10.1.3.42", referrer: "http://10.1.3.42/xxxxxex.jsp"

nginx.conf配置如下:

    upstream tomcat {
server localhost: weight= max_fails=;
server localhost: weight= max_fails=;
server 10.1.3.43: weight= max_fails=;
ip_hash;
} upstream file_tomcat {
server localhost: weight= max_fails=;
server localhost: weight= max_fails=;
ip_hash;
}

报错信息中看到:

upstream: "http://[::1]:8080/xxx.jsp

显然是 localhost 使用了 IPV6 去访问,导致出现问题。

将 locaohost改成 127.0.0.1 即可:

    upstream tomcat {
server 127.0.0.1: weight= max_fails=;
server 127.0.0.1: weight= max_fails=;
server 10.1.3.43: weight= max_fails=;
ip_hash;
} upstream file_tomcat {
server 127.0.0.1: weight= max_fails=;
server 127.0.0.1: weight= max_fails=;
ip_hash;
}

upstream timed out (10060: A connection attempt failed because the connected party did not properly respond的更多相关文章

  1. BUG: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

    更换Apache扑向Nginx,刚搭建完WNMP,nginx能访问php页面 但是访问现有开发项目报错 [error] 4112#3724: *9 upstream timed out (10060: ...

  2. python下载时报错 Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time

    def downloadXml(isExists,filedir,filename): if not isExists: os.mkdir(filedir) local = os.path.join( ...

  3. VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected..

    在将VScode升级至 1.13后让升级gocode,在升级时报出如下错误 D:\go_work\src>go get -u -v github.com/mdempsky/gocode gith ...

  4. vs code解决golang开发环境问题 dial tcp 216.239.37.1:443: connectex: A connection attempt failed

    安装插件是出现 如下错误提示, https fetch failed: Get https://golang.org/x/tools/cmd/gorename?go-get=1: dial tcp 2 ...

  5. mongoDB服务器连接不上Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException:

    一大早打开node项目就报错,终端报 UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connect ECONNREFU ...

  6. nginx 的 upstream timed out 问题

    nginx 作为负载服务,表现为网站访问很慢,有些文件或页面要等待到60s才会返回,我注意到60s就是超时时间,但是超时后返回状态是正常值200,网站可以正常打开,就是会一直等待到超时才打开,而且问题 ...

  7. nginx 报错 upstream timed out (110: Connection timed out)解决方案

    nginx 作PHP的web接口服务器. 在线上发现时不时经常崩溃.504,导致接口访问无响应回复. 查看日志: [error] 11618#0: *324911 upstream timed out ...

  8. 压测 502 日志报错 upstream timed out (110: Connection timed out)

    环境介绍 服务器:centos6.5服务:nginx proxy 问题描述: 压测 开发同事 的开发环境项目没事,但是 线上机器 命中%50 ,大量502 php的某些页面打不开,页面提示gatewa ...

  9. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

随机推荐

  1. lvm语法2

    LVM组成; LVM:logic volume manager .LVM即逻辑卷管理,现在使用版本为第二版,即version2 逻辑卷:pv,physical volume,即计算机上的磁盘设备,例如 ...

  2. WebService中用CXF框架的wsdl部署生成客户端代码时,使用cmd命令口出现wsimport不是内部或外部命令的问题

    网上有很多,都不好用,这个立竿见影的 set JAVA_HOME = *:\Program Files\Java\jdk1.8.0_181(此处为自己jdk的安装路径) set CLASSPATH = ...

  3. Sonar 平台搭建及 Sonar 自定义规则打包部署篇

    引言 基于阿里开发手册的sonar自定义插件工程 开源地址: https://github.com/tigerge000/sonar-java-custom-rules.git由于最近来问童鞋,就算写 ...

  4. IDEA 自动生成Hibernate实体类和Mapping文件

    一.新建工程Demo(如果选的时候勾选了hibernate,IDEA会自动下载Hibernate包,不需要手动导入) 二.导入相关包 Mysql && Hibernate 三.添加Hi ...

  5. 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai

    之前一直使用的mysql5,突然换成8之后,有许多地方不一样,今天就碰到一个. 在使用sql语句创建表时,报错:  1055 - Expression #1 of ORDER BY clause is ...

  6. Javascript 严格模式(strict mode)详解

    Javascript 严格模式详解   一.概述 除了正常运行模式,ECMAscript 5添加了第二种运行模式:"严格模式"(strict mode).顾名思义,这种模式使得Ja ...

  7. iOS CATransition 动画的简单使用

    下面是实现的代码 //选择动画 - (IBAction)selectAnimationTypeButton:(id)sender { UIButton *button = sender; animat ...

  8. eclipse中的项目为什么无法添加到tomcat中?

    1.右键点击项目,选择properties 2.点击Project facets 3.在右侧的Runtimes中选中apache tomcat 4.勾选Dynamic Web Module 最终改为下 ...

  9. Javascript 3.3 编写DOM脚本的四个基本方法

    id属性的用途是给某个元素加上独一无二的标识符,搭配"#"使用 class搭配"."使用 getElementById()方法:方法名称的大小写不能写错,方法将 ...

  10. pychrom 快捷键

    1.pycharm使多行代码同时缩进 鼠标选中多行代码后,按下Tab键,一次缩进四个字符 2.pycharm使多行代码同时左移 鼠标选中多行代码后,同时按住shift+Tab键,一次左移四个字符 1. ...