amazon web services - Chef:Error executing action `install` on resource 'package[httpd]' -
i using chef create server in aws amazon environment using knife ec2 plugin.
i have created ec2 server using next command:
knife ec2 server create --image ami-7c807d14 --flavor t1.micro --region us-east-1 --security-group-ids sg-id --ebs-size 10 --ebs-no-delete-on-term --tags name=test_server --server-connect-attribute private_ip_address --subnet subnet-id --ssh-user ec2-user --identity-file ~/.ssh/key.pem --environment testing --node-name redhat-server
when ssh chef node , run next command sudo chef-client
install apache on node, gives me error:
[2014-06-24t07:44:55+00:00] warn: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ssl validation of https requests disabled. https connections still encrypted, chef not able observe forged replies or man in middle attacks. prepare issue add together entry configuration file: ``` # verify https connections (recommended) ssl_verify_mode :verify_peer # or, verify connections chef-server verify_api_cert true ``` check ssl configuration, or troubleshoot errors, can utilize `knife ssl check` command so: ``` knife ssl check -c /etc/chef/client.rb ``` * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * starting chef client, version 11.12.8 resolving cookbooks run list: ["apache-tutorial-1"] synchronizing cookbooks: - apache-tutorial-1 compiling cookbooks... converging 4 resources recipe: apache-tutorial-1::default * package[httpd] action install ================================================================================ error executing action `install` on resource 'package[httpd]' ================================================================================ mixlib::shellout::shellcommandfailed ------------------------------------ expected process exit [0], received '1' ---- begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides ---- stdout: [option installonlypkgs] kernel kernel-devel kernel-source installonlypkg(kernel) installonlypkg(kernel-module) installonlypkg(vm) stderr: yum-dump repository error: failure: repodata/repomd.xml amzn-main: [errno 256] no more mirrors try. ---- end output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides ---- ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides returned 1 resource declaration: --------------------- # in /var/chef/cache/cookbooks/apache-tutorial-1/recipes/default.rb 11: bundle 'httpd' 12: action :install 13: end 14: compiled resource: ------------------ # declared in /var/chef/cache/cookbooks/apache-tutorial-1/recipes/default.rb:11:in `from_file' package("httpd") action [:install] retries 0 retry_delay 2 guard_interpreter :default package_name "httpd" cookbook_name "apache-tutorial-1" recipe_name "default" end running handlers: [2014-06-24t07:45:04+00:00] error: running exception handlers running handlers finish [2014-06-24t07:45:04+00:00] error: exception handlers finish [2014-06-24t07:45:04+00:00] fatal: stacktrace dumped /var/chef/cache/chef-stacktrace.out chef client failed. 0 resources updated in 9.101137934 seconds [2014-06-24t07:45:04+00:00] error: package[httpd] (apache-tutorial-1::default line 11) had error: mixlib::shellout::shellcommandfailed: expected process exit [0], received '1' ---- begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides ---- stdout: [option installonlypkgs] kernel kernel-devel kernel-source installonlypkg(kernel) installonlypkg(kernel-module) installonlypkg(vm) stderr: yum-dump repository error: failure: repodata/repomd.xml amzn-main: [errno 256] no more mirrors try. ---- end output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides ---- ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/provider/package/yum-dump.py --options --installed-provides returned 1 [2014-06-24t07:45:05+00:00] fatal: chef::exceptions::childconvergeerror: chef run process exited unsuccessfully (exit code 1)
please help me resolve issue.
in case there problem yum on linux ami.
the same command ran create centos machine worked.
amazon-web-services amazon-ec2 chef-recipe bootstrapping
No comments:
Post a Comment