内容简介:错误原文初步判断检测
错误原文
panic: context deadline exceeded goroutine 1 [running]: git.dz11.com/wsd/live/app/listapp-go/vendor/git.dz11.com/vega/etcher.init.0() /home/work/workspace/Go/src/git.dz11.com/wsd/live/app/listapp-go/vendor/git.dz11.com/vega/etcher/init.go:21 +0x130 exit status 2
初步判断
- 由错误提示可知是etcher --- golang的一个etcd客户端 连接超时.
检测
- 直接本地 shell 连接etcd
etcdctl endpoint health --endpoints=[etcd-naming1.dz11.com:2379] # 结果显示etcd连接正常 etcd-naming1.dz11.com:2379 is healthy: successfully committed proposal: took = 46.792953ms
- 直接ping etcd的域名 正常.
- 将golang项目中配置的域名变更为ip 项目启动成功
二次判断
- 怀疑dns有问题. 但是本地的各种命令都显示dns没有问题.
二次检测
- 检测自己所有的nameservers 发现果然又一个 nameserver 是坏的 ... 注释掉坏的dns nameserver . 项目启动成功.
结论
- golang和shell对dns的 nameserver访问不一样. golang底层库中 为了并发的获取 ipv4 以及 ipv6 会同时用到两个nameserver 如果有一个是坏的... 就会超时... 细节参考上面贴出来的地址...
真实蛋疼的bug呢 .... ....
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- Tomcat 7 启动分析(一)启动脚本
- dotnet 启动 JIT 多核心编译提升启动性能
- Win32 程序在启动时激活前一个启动程序的窗口
- 死磕Android_App 启动过程(含 Activity 启动过程)
- HADOOP 启动时 HDFS格式化后启动dfs出现以下错误:
- CentOS7 linux 安装 jdk、tomcat + 配置 tomcat 开机启动 + tomcat 快捷启动命令
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
PHP for the World Wide Web, Second Edition (Visual QuickStart Gu
Larry Ullman / Peachpit Press / 2004-02-02 / USD 29.99
So you know HTML, even JavaScript, but the idea of learning an actual programming language like PHP terrifies you? Well, stop quaking and get going with this easy task-based guide! Aimed at beginning ......一起来看看 《PHP for the World Wide Web, Second Edition (Visual QuickStart Gu》 这本书的介绍吧!