【问题标题】:chef-server-ctl reconfigure giving error ENETUNREACHchef-server-ctl 重新配置给出错误 ENETUNREACH
【发布时间】:2017-04-24 15:42:09
【问题描述】:

当我运行chef-server-ctl reconfigure 时出现错误:

致命:Errno::ENETUNREACH: apt_repository[chef-stable](private-chef::add_ons_repository 第 15 行)出现错误:Errno::ENETUNREACH:remote_file[/opt/opscode/embedded/cookbooks/cache/gpg。 key](/opt/opscode/embedded/cookbooks/cache/cookbooks/apt/providers/repository.rb 第 59 行)有一个错误:Errno::ENETUNREACH: Network is unreachable - connect(2) for "packagecloud.io" port 443

我已经配置了代理相关的环境变量

http_proxy=http://172.16.x.y:3128
ftp_proxy=http://172.16.x.y:3128
HTTPS_PROXY=172.16.x.y:3128
https_proxy=http://172.16.x.y:3128
HTTP_PROXY=172.16.x.y:3128

如果我运行 wgetcurl,我会收到回复。

 wget https://www.google.com
--2016-12-09 07:20:09--  https://www.google.com/
Connecting to 172.16.x.y:3128... connected.
Proxy request sent, awaiting response... 200 OK

同样的测试也适用于 http。 我在 Ubuntu 14 上使用 Chef 服务器 12.5.0

chef-server-ctl show-config
Starting Chef Client, version 12.5.0.current.0

【问题讨论】:

    标签: chef-infra


    【解决方案1】:

    请检查您是否真的可以访问 packagecloud.io -> https://github.com/chef-cookbooks/push-jobs/issues/100

    【讨论】:

    • 是的,我可以连接。供参考。它是 AWS VPC wget packagecloud.io --2016-12-09 09:23:28-- packagecloud.io Connecting to 172.16.x.y:3128... 已连接。已发送代理请求,等待响应... 200 OK 长度:未指定 [text/html] 保存到:'index.html.5'
    • AWS 子网配置中存在一些路由问题。更改后,重新配置工作。我仍然很困惑为什么 wget 和 curl 有效。
    • 我感觉这是一个路由问题。如果您认为我以任何方式帮助了您,请评价 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多