文章20 | 阅读 8465 | 点赞0
问题描述:
在使用consul过程中,经常会进行版本检查,日志如下:
==> Failed to check for updates: Get https://checkpoint-api.hashicorp.com/v1/check/consul?arch=amd64&os=linux&signature=33c85560-784e-27cf-802d-6ae0ec8d197f&version=1.1.0: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
如何禁止哪?
解决方案:
在版本v1.0.5之后,提供了新的配置选项disable_update_check
可禁止检查
但仅在企业版中有效
参见
https://github.com/hashicorp/consul/blob/v1.1.0/CHANGELOG.md#105-february-7-2018
方案二:
修改代码
diff --git a/agent/config/flags.go b/agent/config/flags.go
index 3bad0ea..02b8200 100644
--- a/agent/config/flags.go
+++ b/agent/config/flags.go
@@ -70,6 +70,7 @@ func AddFlags(fs *flag.FlagSet, f *Flags) {
add(&f.Config.Ports.DNS, "dns-port", "DNS port to use.")
add(&f.Config.DNSDomain, "domain", "Domain to use for DNS interface.")
add(&f.Config.EnableScriptChecks, "enable-script-checks", "Enables health check scripts.")
+ add(&f.Config.DisableUpdateCheck, "disable_update_check", "Disable consul update check.")
add(&f.Config.EncryptKey, "encrypt", "Provides the gossip encryption key.")
add(&f.Config.Ports.HTTP, "http-port", "Sets the HTTP API port to listen on.")
add(&f.Config.StartJoinAddrsLAN, "join", "Address of an agent to join at start time. Can be specified multiple times.")
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://younger.blog.csdn.net/article/details/80550343
内容来源于网络,如有侵权,请联系作者删除!