y2 cookbook을 종속성으로 사용하여 ec2 서버에 nginx를 설치하려고합니다.리소스 패키지 [nginx]에서 작업 설치 실행 중 오류가 발생했습니다
이 내의 nginx/조리법/default.rb의 모습입니다, 또한
include_recipe "yum"
package "nginx" do
version "1.6.2"
action :install
end
template "nginx.conf" do
source "nginx.conf.erb"
path "#{node['nginx']['dir']}/nginx.conf"
action :create
mode 0644
end
template "default.conf" do
source "default-site.erb"
path "#{node['nginx']['dir']}/conf.d/default.conf"
action :create
mode 0644
end
service "nginx" do
supports :restart => :true
action [:enable, :start]
end
, 나는 아래 실행하려고에 metadata.rb
depends "yum"
에 아래 라인을 추가 한 클라이언트 EC2 서버의 명령, 나는 다음과 같은 오류가
sudo chef-client
:
,536 당신이 그렇게 같은knife ssl check
명령을 사용할 수 있습니다,
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
당신의 SSL 구성을 확인하거나 오류를 해결하려면
[2014-12-15T01:38:31-05:00] 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.
91,363,210는 구성 파일에 다음과 같은 항목을 추가한다이 문제를 해결하려면 : 이 라인에 따르면
knife ssl check -c /etc/chef/client.rb
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Starting Chef Client, version 11.16.4
resolving cookbooks for run list: ["yum", "nginx"]
Synchronizing Cookbooks:
- yum
- nginx
Compiling Cookbooks...
Converging 5 resources
Recipe: yum::default
* yum_globalconfig[/etc/yum.conf] action create
* template[/etc/yum.conf] action create (up to date)
(up to date)
Recipe: nginx::default
* package[nginx] action install
================================================================================
Error executing action `install` on resource 'package[nginx]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
STDOUT: [option installonlypkgs] kernel kernel-bigmem installonlypkg(kernel-module) installonlypkg(vm) kernel-enterprise kernel-smp kernel-debug kernel-unsupported kernel-source kernel-devel kernel-PAE kernel-PAE-debug
STDERR: yum-dump Repository Error: failure: repodata/repomd.xml from rhui-REGION-rhel-server-releases: [Errno 256] No more mirrors to try.
https://rhui2-cds01.us-east-1.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/7.0-1.el7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
https://rhui2-cds02.us-east-1.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/7.0-1.el7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 1
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/nginx/recipes/default.rb
13: package "nginx" do
14: version "1.6.2"
15: action :install
16: end
17:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/nginx/recipes/default.rb:13:in `from_file'
package("nginx") do
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "nginx"
version "1.6.2"
timeout 900
cookbook_name "nginx"
recipe_name "default"
end
Running handlers:
[2014-12-15T01:38:33-05:00] ERROR: Running exception handlers
Running handlers complete
[2014-12-15T01:38:33-05:00] ERROR: Exception handlers complete
[2014-12-15T01:38:33-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 2.604475896 seconds
[2014-12-15T01:38:33-05:00] ERROR: package[nginx] (nginx::default line 13) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
STDOUT: [option installonlypkgs] kernel kernel-bigmem installonlypkg(kernel-module) installonlypkg(vm) kernel-enterprise kernel-smp kernel-debug kernel-unsupported kernel-source kernel-devel kernel-PAE kernel-PAE-debug
STDERR: yum-dump Repository Error: failure: repodata/repomd.xml from rhui-REGION-rhel-server-releases: [Errno 256] No more mirrors to try.
https://rhui2-cds01.us-east-1.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/7.0-1.el7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
https://rhui2-cds02.us-east-1.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/7.0-1.el7/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 1
[2014-12-15T01:38:33-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
읽을 수 있도록 텍스트 서식을 지정 하시겠습니까? – StephenKing
커뮤니티 nginx 요리 책을 사용하지 않는 특별한 이유가 있습니까? 그것은 꽤 단단한 일을합니다. –
@TejayCardon 커뮤니티 nginx 요리 책에 나열된 복잡한 구성없이 자체 테스트 레서피를 구성하려고합니다. 이제 템플릿 파일 두 개를 만들면됩니다. –