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. jmeter之关联

    前言:当请求之间有依赖关系,比如一个请求的入参是另一个请求返回的数据,这时候就需要用到关联处理,Jmeter可以通过“后置处理器”中的“正则表达式提取器”来处理关联. 一.后置处理器-------正则 ...

  2. 18-09-09 Linux 系统如何获取外部的数据例如 软件的2中方式

    方式一 利用U盘  手动挂载/卸载 U盘==========================================1, cat /proc/partitions查看U盘插入前后, 多出的 s ...

  3. 使用 <embed> 标签显示 flash文件(swf)格式 ,如何设置 width 和 height 宽度,高度.

    1. embed 标签 支持  .swf 格式.     .flv 的不支持. 2. 通常情况下, 网站中上传 多个 flash文件. 它的默认大小是不一样的. 而且 可以 宽度 大于 高度(横向的) ...

  4. Linux命令rz

    rz :上传文件:sz: 下载文件: 在linux 系统中,使用rz(或 sz) 命令是,提示 -bash: rz(或者是sz): command not found .这个时候,说明没有安装 lrz ...

  5. 剑指Offer 65. 矩阵中的路径 (回溯)

    题目描述 请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字符的路径.路径可以从矩阵中的任意一个格子开始,每一步可以在矩阵中向左,向右,向上,向下移动一个格子.如果一条路径经过了矩阵中 ...

  6. jmeter学习随笔

    1.jmeter配置环境是需要注意jdk版本,不同的jdk版本可支持运行不同版本的jmeter,对应关系如下图 2.HTTP请求和HTTP默认请求的区别 若一个项目中会多次调用相同的接口域名及端口号, ...

  7. vue中 左侧导航条 多个toggleClass

    <ul> <li v-for='item in items' @click="showToggle(item)"> <i :class="{ ...

  8. iptables 添加raw提高服务器性能之路

    前几天准备把线上一批机器添加iptables.于是梳理出几个需要通外网的端口,80,81等. 防火墙规则如下: #### filter table ########################## ...

  9. [亲身实践]linux命令行下配置网路

    1.在命令行下输入setup, 2.之后出现下图,选择网络配置 4.配置IP地址,子网掩码,DNS 5.保存之后回到命令行模式下,输入service network restart,至此网络配置完成

  10. php7编译安装-php-fpm.service

    [Unit]Description=php-fpm - Hypertext PreprocessorAfter=network.target remote-fs.target nss-lookup.t ...