首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用chef安装eclipse时出现套接字错误

使用chef安装eclipse时出现套接字错误
EN

Stack Overflow用户
提问于 2014-06-18 18:56:54
回答 1查看 456关注 0票数 0

从下面的站点https://github.com/geocent-cookbooks/eclipse获得了食谱

当我运行eclipse cookbook时,我得到以下套接字错误。我在代理后面工作。并且已经正确地设置了代理。除了eclipse之外,所有其他的食谱都运行得很好。

请在下面找到错误日志。

代码语言:javascript
复制
[2014-06-17T05:38:15+05:30] INFO: Forking chef instance to converge...
[2014-06-17T05:38:15+05:30] WARN: Chef client 306 is running, will wait for it to finish and then run.
[2014-06-17T05:38:43+05:30] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.

To fix this issue add an entry like this to your configuration file:

验证所有HTTPS连接(推荐)

ssl_verify_mode :verify_peer

或者,仅验证与chef-server的连接

verify_api_cert true

代码语言:javascript
复制
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:

刀式ssl检查-c solo.rb

代码语言:javascript
复制
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

[2014-06-17T05:38:43+05:30] INFO: *** Chef 11.12.8 ***
[2014-06-17T05:38:43+05:30] INFO: Chef-client pid: 422
[2014-06-17T05:38:57+05:30] INFO: Setting the run_list to ["recipe[eclipse-master]"] from CLI options
[2014-06-17T05:38:57+05:30] INFO: Run List is [recipe[eclipse-master]]
[2014-06-17T05:38:57+05:30] INFO: Run List expands to [eclipse-master]
[2014-06-17T05:38:57+05:30] INFO: Starting Chef Run for ubuntu
[2014-06-17T05:38:57+05:30] INFO: Running start handlers
[2014-06-17T05:38:57+05:30] INFO: Start handlers complete.
[2014-06-17T05:38:57+05:30] INFO: WindowsPackage light-weight resource already initialized -- overriding!
[2014-06-17T05:38:57+05:30] WARN: Cloning resource attributes for execute[eclipse plugin install] from prior resource (CHEF-3694)
[2014-06-17T05:38:57+05:30] WARN: Previous execute[eclipse plugin install]: /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb:44:in `block in from_file'
[2014-06-17T05:38:57+05:30] WARN: Current execute[eclipse plugin install]: /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb:44:in `block in from_file'
[2014-06-17T05:38:57+05:30] WARN: Cloning resource attributes for execute[eclipse plugin install] from prior resource (CHEF-3694)
[2014-06-17T05:38:57+05:30] WARN: Previous execute[eclipse plugin install]: /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb:44:in `block in from_file'
[2014-06-17T05:38:57+05:30] WARN: Current execute[eclipse plugin install]: /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb:44:in `block in from_file'
[2014-06-17T05:38:57+05:30] INFO: Processing package[openjdk-6-jdk] action install (java::openjdk line 46)
[2014-06-17T05:38:58+05:30] INFO: Processing package[openjdk-6-jre-headless] action install (java::openjdk line 46)
[2014-06-17T05:38:58+05:30] INFO: Processing java_alternatives[set-java-alternatives] action set (java::openjdk line 50)
[2014-06-17T05:39:15+05:30] INFO: Processing link[/usr/lib/jvm/default-java] action create (java::default_java_symlink line 16)
[2014-06-17T05:39:15+05:30] INFO: Processing ruby_block[set-env-java-home] action run (java::set_java_home line 19)
[2014-06-17T05:39:15+05:30] INFO: ruby_block[set-env-java-home] called
[2014-06-17T05:39:15+05:30] INFO: Processing directory[/etc/profile.d] action create (java::set_java_home line 26)
[2014-06-17T05:39:15+05:30] INFO: Processing file[/etc/profile.d/jdk.sh] action create (java::set_java_home line 30)
[2014-06-17T05:39:15+05:30] INFO: Processing package[libtool] action install (ark::default line 22)
[2014-06-17T05:39:15+05:30] INFO: Processing package[autoconf] action install (ark::default line 22)
[2014-06-17T05:39:16+05:30] INFO: Processing package[unzip] action install (ark::default line 22)
[2014-06-17T05:39:16+05:30] INFO: Processing package[rsync] action install (ark::default line 22)
[2014-06-17T05:39:17+05:30] INFO: Processing package[make] action install (ark::default line 22)
[2014-06-17T05:39:17+05:30] INFO: Processing package[gcc] action install (ark::default line 22)
[2014-06-17T05:39:17+05:30] INFO: Processing package[autogen] action install (ark::default line 22)
[2014-06-17T05:39:17+05:30] INFO: Processing ark[eclipse] action install (eclipse-master::default line 31)
[2014-06-17T05:39:17+05:30] INFO: Processing directory[/usr/local/eclipse-kepler] action create (/home/test/chef-repo2/cookbooks/ark/providers/default.rb line 39)
[2014-06-17T05:39:17+05:30] INFO: Processing remote_file[/home/test/chef-solo/eclipse-kepler.tar.gz] action create (/home/test/chef-repo2/cookbooks/ark/providers/default.rb line 45)
[2014-06-17T05:39:17+05:30] WARN: remote_file[/home/test/chef-solo/eclipse-kepler.tar.gz] cannot be downloaded from http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1: Error connecting to http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1 - getaddrinfo: Name or service not known
[0m
================================================================================[0m
[31mError executing action `create` on resource 'remote_file[/home/test/chef-solo/eclipse-kepler.tar.gz]'[0m
================================================================================[0m

[0m
SocketError[0m
-----------[0m
Error connecting to http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1 - getaddrinfo: Name or service not known[0m

[0m
Resource Declaration:[0m
---------------------[0m
# In /home/test/chef-repo2/cookbooks/ark/providers/default.rb

 45: remote_file new_resource.release_file do
 46: Chef::Log.debug('DEBUG: new_resource.release_file')
 47: source new_resource.url
 48: checksum new_resource.checksum if new_resource.checksum
 49: action :create
 50: notifies :run, "execute[unpack #{new_resource.release_file}]"
 51: end
 52:
[0m

[0m
Compiled Resource:[0m
------------------[0m
# Declared in /home/test/chef-repo2/cookbooks/ark/providers/default.rb:45:in `block in class_from_file'

remote_file("/home/test/chef-solo/eclipse-kepler.tar.gz") do
  provider Chef::Provider::RemoteFile
  action [:create]
  retries 0
  retry_delay 2
  guard_interpreter :default
  path "/home/test/chef-solo/eclipse-kepler.tar.gz"
  backup 5
  atomic_update true
  source ["http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1"]
  use_etag true
  use_last_modified true
  cookbook_name :"eclipse-master"
end
[0m

[0m
[2014-06-17T05:39:17+05:30] INFO: Running queued delayed notifications before re-raising exception
[0m
================================================================================[0m
[31mError executing action `install` on resource 'ark[eclipse]'[0m
================================================================================[0m

[0m
SocketError[0m
-----------[0m
remote_file[/home/test/chef-solo/eclipse-kepler.tar.gz] (/home/test/chef-repo2/cookbooks/ark/providers/default.rb line 45) had an error: SocketError: Error connecting to http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1 - getaddrinfo: Name or service not known[0m

[0m
Resource Declaration:[0m
---------------------[0m
# In /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb

 31: ark "eclipse" do
 32: url eclipse_url
 33: version node['eclipse']['version']
 34: extension "tar.gz"
 35: has_binaries ['eclipse']
 36: append_env_path true
 37: action :install
 38: end
 39:
[0m

[0m
Compiled Resource:[0m
------------------[0m
# Declared in /home/test/chef-repo2/cookbooks/eclipse-master/recipes/default.rb:31:in `from_file'

ark("eclipse") do
  provider Chef::Provider::Ark
  action [:install]
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name :"eclipse-master"
  recipe_name "default"
  url "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1"
  version "kepler"
  extension "tar.gz"
  has_binaries ["eclipse"]
  append_env_path true
  prefix_bin "/usr/local/bin"
  home_dir "/usr/local/eclipse"
  path "/usr/local/eclipse-kepler"
  release_file "/home/test/chef-solo/eclipse-kepler.tar.gz"
  strip_components 1
  owner "root"
  group 0
end
[0m

[0m
[2014-06-17T05:39:17+05:30] INFO: Running queued delayed notifications before re-raising exception
[2014-06-17T05:39:17+05:30] ERROR: Running exception handlers
[2014-06-17T05:39:17+05:30] ERROR: Exception handlers complete
[2014-06-17T05:39:17+05:30] FATAL: Stacktrace dumped to /home/test/chef-solo/chef-stacktrace.out
[2014-06-17T05:39:17+05:30] ERROR: ark[eclipse] (eclipse-master::default line 31) had an error: SocketError: remote_file[/home/test/chef-solo/eclipse-kepler.tar.gz] (/home/test/chef-repo2/cookbooks/ark/providers/default.rb line 45) had an error: SocketError: Error connecting to http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-linux-gtk-x86_64.tar.gz&r=1 - getaddrinfo: Name or service not known
[2014-06-17T05:39:18+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

请帮帮忙。谢谢

EN

回答 1

Stack Overflow用户

发布于 2014-06-18 21:57:59

您已在knife.rb中配置了代理

代码语言:javascript
复制
http_proxy 'http://PROXY_IP:3128'
https_proxy 'http://PROXY_IP:3128'
no_proxy 'localhost, 192.168. *'


knife [: bootstrap_proxy] = 'http://PROXY_IP:3128'
knife [: bootstrap_no_proxy] = 'localhost, 192.168 *.'
knife [: publisher] = "vim"

在客户端配置中,bootsraping节点必须使用这把刀来完成。

在/ etc / chef / client.rb中的节点上应该是:

代码语言:javascript
复制
log_level: auto
log_location STDOUT
chef_server_url "https://CHEFSERVER.domain.com:443"
validation_client_name "chef-validator"
# Using default node name (fqdn)
http_proxy "http://PROXY_IP:3128"
https_proxy "http://PROXY_IP:3128"
no_proxy "localhost, 192.168. *"

对不起,我的英语

诚挚的问候。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24283782

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档