fisma-ready / ubuntu-lts

Ubuntu 14.04 LTS is FISMA Ready.
Other
54 stars 26 forks source link

Error during provisioning #45

Closed jzonthemtn closed 8 years ago

jzonthemtn commented 8 years ago

Hi, I used this project awhile back with great success. Now when I try to make a new AMI I'm getting an error. I don't think I have changed anything on my side. I'm using packer 0.7.5 and I am provisioning into a VPC by specifying a vpc-id and subnet-id. I get the following error during execution:

embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/bin/chef-solo:25:in `<top (required)>'
    amazon-ebs: /usr/bin/chef-solo:53:in `load'
    amazon-ebs: /usr/bin/chef-solo:53:in `<main>'
    amazon-ebs: [2016-08-30T13:30:13+00:00] INFO: HTTP Request Returned 500 Internal Server Error: error
    amazon-ebs: [2016-08-30T13:30:13+00:00] ERROR: Running exception handlers
    amazon-ebs: [2016-08-30T13:30:13+00:00] ERROR: Exception handlers complete
    amazon-ebs: [2016-08-30T13:30:13+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
    amazon-ebs: [2016-08-30T13:30:13+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    amazon-ebs: [2016-08-30T13:30:13+00:00] ERROR: 500 "Internal Server Error"
    amazon-ebs: [2016-08-30T13:30:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Earlier in the log I saw the following line. I don't know if it is related but it caught my attention:

amazon-ebs: [2016-08-30T13:30:13+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/ip-10-0-0-177.ec2.internal

Here's the contents of the chef-stacktrace.out:

$ sudo cat chef-stacktrace.out 
Generated at 2016-08-30 13:30:13 +0000
Net::HTTPFatalError: 500 "Internal Server Error"
/opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/http.rb:146:in `request'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/http.rb:127:in `post'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/node.rb:605:in `rescue in save'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/node.rb:597:in `save'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:544:in `save_updated_node'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:706:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:283:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:302:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:290:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:290:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:255:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:243:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:60:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/solo.rb:226:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:53:in `load'
/usr/bin/chef-solo:53:in `<main>'

>>>> Caused by Net::HTTPServerException: 404 "Not Found"
/opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/http.rb:146:in `request'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/http.rb:119:in `put'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/node.rb:601:in `save'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:544:in `save_updated_node'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:706:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/client.rb:283:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:302:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:290:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:290:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:255:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:243:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application.rb:60:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/application/solo.rb:226:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:53:in `load'
/usr/bin/chef-solo:53:in `<main>'

Does anyone have any ideas? I did a fresh clone to make sure I had not changed anything and got the same result. I also tried from a second workstation and got the same error. If you need anymore information let me know! Thanks

jzonthemtn commented 8 years ago

I was able to make progress by setting an install command for Chef. (Maybe the version had changed since I used this project last?) I added the following line to packer.json:

"install_command": "wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.6.2-1_amd64.deb -O /tmp/chef.deb && sudo dpkg -i /tmp/chef.deb",

This changed allowed the provisioning to complete. Even though this works if anyone has any input please let me know.