Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I change the ports
ip-10-144-55-138 cookbooks # PATH=/usr/local/ey_resin/bin:$PATH /home/ey/bin/chef-solo -j /etc/chef-custom/dna.json -c /root/docker_cookbooks/solo.rb
[2016-07-04T02:56:15+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 12.7.2
[2016-07-04T02:56:15+00:00] INFO: *** Chef 12.7.2 ***
[2016-07-04T02:56:15+00:00] INFO: Chef-client pid: 13474
[2016-07-04T02:56:17+00:00] INFO: Setting the run_list to recipe[main] from CLI options
[2016-07-04T02:56:17+00:00] INFO: Run List is [recipe[main]]
[2016-07-04T02:56:17+00:00] INFO: Run List expands to [main]
[2016-07-04T02:56:17+00:00] INFO: Starting Chef Run for i-518fbcd6
[2016-07-04T02:56:17+00:00] INFO: Running start handlers
[2016-07-04T02:56:17+00:00] INFO: Start handlers complete.
Compiling Cookbooks...
Converging 9 resources
Recipe: customer_docker::default
* docker_installation_tarball[default] action create[2016-07-04T02:56:18+00:00] INFO: Processing docker_installation_tarball[default] action create (customer_docker::default line 4)
* remote_file[/etc/chef-custom/recipes//docker-1.12.0-rc2.tgz] action create[2016-07-04T02:56:18+00:00] INFO: Processing remote_file[/etc/chef-custom/recipes//docker-1.12.0-rc2.tgz] action create (/root/docker_cookbooks/cookbooks/docker/libraries/docker_installation_tarball.rb line 24)
(up to date)
* execute[extract tarball] action nothing[2016-07-04T02:56:18+00:00] INFO: Processing execute[extract tarball] action nothing (/root/docker_cookbooks/cookbooks/docker/libraries/docker_installation_tarball.rb line 34)
(skipped due to action :nothing)
(up to date)
* docker_service_manager_openrc[default] action start[2016-07-04T02:56:18+00:00] INFO: Processing docker_service_manager_openrc[default] action start (customer_docker::default line 11)
* group[docker] action create[2016-07-04T02:56:18+00:00] INFO: Processing group[docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 9)
(up to date)
* template[/etc/conf.d/docker] action create[2016-07-04T02:56:18+00:00] INFO: Processing template[/etc/conf.d/docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 13)
(up to date)
* template[/etc/init.d/docker] action create[2016-07-04T02:56:18+00:00] INFO: Processing template[/etc/init.d/docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 20)
(up to date)
* service[docker] action enable[2016-07-04T02:56:18+00:00] INFO: Processing service[docker] action enable (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 26)
(up to date)
* service[docker] action start[2016-07-04T02:56:18+00:00] INFO: Processing service[docker] action start (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 26)
(up to date)
(up to date)
* directory[/data/youtrack/lib] action create[2016-07-04T02:56:18+00:00] INFO: Processing directory[/data/youtrack/lib] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/logs] action create[2016-07-04T02:56:18+00:00] INFO: Processing directory[/data/youtrack/local/logs] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/conf] action create[2016-07-04T02:56:18+00:00] INFO: Processing directory[/data/youtrack/local/conf] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/data] action create[2016-07-04T02:56:18+00:00] INFO: Processing directory[/data/youtrack/local/data] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/backups] action create[2016-07-04T02:56:18+00:00] INFO: Processing directory[/data/youtrack/local/backups] action create (customer_docker::default line 71)
(up to date)
* docker_image[docker-youtrack] action pull[2016-07-04T02:56:18+00:00] INFO: Processing docker_image[docker-youtrack] action pull (customer_docker::default line 80)
(up to date)
* docker_container[docker-youtrack] action run[2016-07-04T02:56:18+00:00] INFO: Processing docker_container[docker-youtrack] action run (customer_docker::default line 85)
- deleting docker-youtrack
- update docker-youtrack
- set port_bindings to {"8080/tcp"=>[{"HostIp"=>"0.0.0.0", "HostPort"=>"8080"}]} (was {"8080/tcp"=>[{"HostIp"=>"0.0.0.0", "HostPort"=>"80"}]})
- starting docker-youtrack
[2016-07-04T02:56:19+00:00] INFO: Chef Run complete in 1.154283762 seconds
[2016-07-04T02:56:19+00:00] INFO: Skipping removal of unused files from the cache
Running handlers:
[2016-07-04T02:56:19+00:00] INFO: Running report handlers
Running handlers complete
[2016-07-04T02:56:19+00:00] INFO: Report handlers complete
Chef Client finished, 1/16 resources updated in 03 seconds
ip-10-144-55-138 cookbooks # PATH=/usr/local/ey_resin/bin:$PATH /home/ey/bin/chef-solo -j /etc/chef-custom/dna.json -c /root/docker_cookbooks/solo.rb
[2016-07-04T02:52:51+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 12.7.2
[2016-07-04T02:52:51+00:00] INFO: *** Chef 12.7.2 ***
[2016-07-04T02:52:51+00:00] INFO: Chef-client pid: 12220
[2016-07-04T02:52:53+00:00] INFO: Setting the run_list to recipe[main] from CLI options
[2016-07-04T02:52:53+00:00] INFO: Run List is [recipe[main]]
[2016-07-04T02:52:53+00:00] INFO: Run List expands to [main]
[2016-07-04T02:52:53+00:00] INFO: Starting Chef Run for i-518fbcd6
[2016-07-04T02:52:53+00:00] INFO: Running start handlers
[2016-07-04T02:52:53+00:00] INFO: Start handlers complete.
Compiling Cookbooks...
Converging 9 resources
Recipe: customer_docker::default
* docker_installation_tarball[default] action create[2016-07-04T02:52:54+00:00] INFO: Processing docker_installation_tarball[default] action create (customer_docker::default line 4)
* remote_file[/etc/chef-custom/recipes//docker-1.12.0-rc2.tgz] action create[2016-07-04T02:52:54+00:00] INFO: Processing remote_file[/etc/chef-custom/recipes//docker-1.12.0-rc2.tgz] action create (/root/docker_cookbooks/cookbooks/docker/libraries/docker_installation_tarball.rb line 24)
(up to date)
* execute[extract tarball] action nothing[2016-07-04T02:52:54+00:00] INFO: Processing execute[extract tarball] action nothing (/root/docker_cookbooks/cookbooks/docker/libraries/docker_installation_tarball.rb line 34)
(skipped due to action :nothing)
(up to date)
* docker_service_manager_openrc[default] action start[2016-07-04T02:52:54+00:00] INFO: Processing docker_service_manager_openrc[default] action start (customer_docker::default line 11)
* group[docker] action create[2016-07-04T02:52:54+00:00] INFO: Processing group[docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 9)
(up to date)
* template[/etc/conf.d/docker] action create[2016-07-04T02:52:54+00:00] INFO: Processing template[/etc/conf.d/docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 13)
(up to date)
* template[/etc/init.d/docker] action create[2016-07-04T02:52:54+00:00] INFO: Processing template[/etc/init.d/docker] action create (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 20)
(up to date)
* service[docker] action enable[2016-07-04T02:52:54+00:00] INFO: Processing service[docker] action enable (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 26)
(up to date)
* service[docker] action start[2016-07-04T02:52:54+00:00] INFO: Processing service[docker] action start (/root/docker_cookbooks/cookbooks/engineyard_docker/libraries/service_manager.rb line 26)
(up to date)
(up to date)
* directory[/data/youtrack/lib] action create[2016-07-04T02:52:54+00:00] INFO: Processing directory[/data/youtrack/lib] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/logs] action create[2016-07-04T02:52:54+00:00] INFO: Processing directory[/data/youtrack/local/logs] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/conf] action create[2016-07-04T02:52:54+00:00] INFO: Processing directory[/data/youtrack/local/conf] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/data] action create[2016-07-04T02:52:54+00:00] INFO: Processing directory[/data/youtrack/local/data] action create (customer_docker::default line 71)
(up to date)
* directory[/data/youtrack/local/backups] action create[2016-07-04T02:52:54+00:00] INFO: Processing directory[/data/youtrack/local/backups] action create (customer_docker::default line 71)
(up to date)
* docker_image[docker-youtrack] action pull[2016-07-04T02:52:54+00:00] INFO: Processing docker_image[docker-youtrack] action pull (customer_docker::default line 80)
(up to date)
* docker_container[docker-youtrack] action run[2016-07-04T02:52:54+00:00] INFO: Processing docker_container[docker-youtrack] action run (customer_docker::default line 85)
================================================================================
Error executing action `run` on resource 'docker_container[docker-youtrack]'
================================================================================
NameError
---------
uninitialized constant Excon::Errors::InternalServerError
Cookbook Trace:
---------------
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:307:in `block (3 levels) in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/docker/libraries/helpers_base.rb:66:in `with_retries'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:306:in `block (2 levels) in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:304:in `block in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `instance_eval'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `compile_and_converge_action'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:161:in `call_action'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:368:in `block in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `instance_eval'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `compile_and_converge_action'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:229:in `block (2 levels) in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:57:in `converge_if_changed'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:228:in `block in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `instance_eval'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `compile_and_converge_action'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:161:in `call_action'
/root/docker_cookbooks/cookbooks/docker/libraries/docker_container.rb:325:in `block in <class:DockerContainer>'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `instance_eval'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:124:in `compile_and_converge_action'
/root/docker_cookbooks/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /root/docker_cookbooks/cookbooks/customer_docker/recipes/default.rb
85: docker_container 'docker-youtrack' do
86: repo 'dzwicker/docker-youtrack'
87: port '8080:8080'
88: volumes ['/data/youtrack/lib:/var/lib/youtrack', '/data/youtrack/local/logs:/usr/local/youtrack/logs', '/data/youtrack/local/conf:/usr/local/youtrack/conf', '/data/youtrack/local/data:/usr/local/youtrack/data', '/data/youtrack/local/backups:/usr/local/youtrack/backups']
89: restart_policy 'always'
90: action :run
91: end
Compiled Resource:
------------------
# Declared in /root/docker_cookbooks/cookbooks/customer_docker/recipes/default.rb:85:in `from_file'
docker_container("docker-youtrack") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :docker_container
cookbook_name :customer_docker
recipe_name "default"
repo "dzwicker/docker-youtrack"
exposed_ports {"8080/tcp"=>{}}
port_bindings {"8080/tcp"=>[{"HostIp"=>"0.0.0.0", "HostPort"=>"8080"}]}
port "8080:8080"
volumes_binds ["/data/youtrack/lib:/var/lib/youtrack", "/data/youtrack/local/logs:/usr/local/youtrack/logs", "/data/youtrack/local/conf:/usr/local/youtrack/conf", "/data/youtrack/local/data:/usr/local/youtrack/data", "/data/youtrack/local/backups:/usr/local/youtrack/backups"]
restart_policy "always"
connection #<Docker::Connection:0x0055c494cbddc0 @url="unix:///", @options={:socket=>"/var/run/docker.sock", :read_timeout=>60}>
network_mode "default"
api_version "1.24"
end
[2016-07-04T02:53:54+00:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2016-07-04T02:53:54+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-07-04T02:53:54+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 minutes 03 seconds
[2016-07-04T02:53:54+00:00] FATAL: Stacktrace dumped to /etc/chef-custom/recipes/chef-stacktrace.out
[2016-07-04T02:53:54+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-07-04T02:53:54+00:00] ERROR: docker_container[docker-youtrack] (customer_docker::default line 85) had an error: NameError: uninitialized constant Excon::Errors::InternalServerError
[2016-07-04T02:53:54+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@crigor
Copy link
Author

crigor commented Jul 4, 2016

I change the ports from '80:8080' to '8080:8080'

docker_container 'docker-youtrack' do
  repo 'dzwicker/docker-youtrack'
  port '8080:8080'
  volumes ['/data/youtrack/lib:/var/lib/youtrack', '/data/youtrack/local/logs:/usr/local/youtrack/logs', '/data/youtrack/local/conf:/usr/local/youtrack/conf', '/data/youtrack/local/data:/usr/local/youtrack/data', '/data/youtrack/local/backups:/usr/local/youtrack/backups']
  restart_policy 'always'
  action :run
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment