Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install consul-template #75

Open
dmigous opened this issue Aug 21, 2017 · 4 comments
Open

Can't install consul-template #75

dmigous opened this issue Aug 21, 2017 · 4 comments

Comments

@dmigous
Copy link

dmigous commented Aug 21, 2017

Trying to install consul-template into docker debian:jessie.
Version 0.14.0 works fine. But now I need >= 0.18.0, and it doesn't work.

My node json docker-consul-template.json:

{
  "consul_template" : {
    "version" : "0.19.0",
    "checksums": {
      "consul-template_0.19.0_linux_amd64": "31dda6ebc7bd7712598c6ac0337ce8fd8c533229887bd58e825757af879c5f9f"
    }
  },
  "run_list": [
    "recipe[consul-template]",
    "recipe[rubber::consul-template]"
  ],
  "automatic": {
    "ipaddress": "localhost"
  }
}

at "recipe[rubber::consul-template]" right now commented everything

Error:

:install_binary line 20)
[2017-08-21T16:38:02+00:00] INFO: remote_file[/chef/local-mode-cache/cache/consul-template_0.19.0_linux_amd64.zip] created file /chef/local-mode-cache/cache/consul-template_0.19.0_linux_amd64.zip
[2017-08-21T16:38:02+00:00] INFO: remote_file[/chef/local-mode-cache/cache/consul-template_0.19.0_linux_amd64.zip] updated file contents /chef/local-mode-cache/cache/consul-template_0.19.0_linux_amd64.zip
[2017-08-21T16:38:02+00:00] INFO: Processing libarchive_file[consul-template_0.19.0_linux_amd64.zip] action extract (consul-template::install_binary line 26)
[2017-08-21T16:38:02+00:00] INFO: libarchive_file[consul-template_0.19.0_linux_amd64.zip] extracting /chef/local-mode-cache/cache/consul-template_0.19.0_linux_amd64.zip to /usr/local/bin/consul-template_0.19.0_linux_amd64
[2017-08-21T16:38:02+00:00] INFO: Processing link[/usr/local/bin/consul-template] action create (consul-template::install_binary line 34)
[2017-08-21T16:38:02+00:00] INFO: link[/usr/local/bin/consul-template] created
[2017-08-21T16:38:02+00:00] WARN: /usr/local/bin/consul-template mode not changed: File.lchmod is unimplemented on this OS and Ruby version
[2017-08-21T16:38:02+00:00] INFO: link[/usr/local/bin/consul-template] mode changed to 755
[2017-08-21T16:38:02+00:00] INFO: Processing linux_user[root] action create (consul-template::service line 33)
[2017-08-21T16:38:02+00:00] INFO: Processing group[root] action create (consul-template::service line 41)
[2017-08-21T16:38:02+00:00] INFO: Processing directory[/etc/consul-template.d] action create (consul-template::service line 49)
[2017-08-21T16:38:02+00:00] INFO: directory[/etc/consul-template.d] created directory /etc/consul-template.d
[2017-08-21T16:38:02+00:00] INFO: directory[/etc/consul-template.d] owner changed to 0
[2017-08-21T16:38:02+00:00] INFO: directory[/etc/consul-template.d] group changed to 0
[2017-08-21T16:38:02+00:00] INFO: directory[/etc/consul-template.d] mode changed to 755
[2017-08-21T16:38:02+00:00] INFO: Processing file[/etc/consul-template.d/default.json] action create (consul-template::service line 58)
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] created file /etc/consul-template.d/default.json
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] updated file contents /etc/consul-template.d/default.json
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] owner changed to 0
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] group changed to 0
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] mode changed to 600
[2017-08-21T16:38:02+00:00] INFO: file[/etc/consul-template.d/default.json] not queuing delayed action restart on service[consul-template] (delayed), as it's already been queued
[2017-08-21T16:38:02+00:00] INFO: Processing template[/etc/init.d/consul-template] action create (consul-template::service line 85)
[2017-08-21T16:38:02+00:00] INFO: template[/etc/init.d/consul-template] created file /etc/init.d/consul-template
[2017-08-21T16:38:02+00:00] INFO: template[/etc/init.d/consul-template] updated file contents /etc/init.d/consul-template
[2017-08-21T16:38:02+00:00] INFO: template[/etc/init.d/consul-template] mode changed to 755
[2017-08-21T16:38:02+00:00] INFO: template[/etc/init.d/consul-template] sending restart action to service[consul-template] (immediate)
[2017-08-21T16:38:02+00:00] INFO: Processing service[consul-template] action restart (consul-template::service line 98)
[2017-08-21T16:38:02+00:00] INFO: service[consul-template] restarted
[2017-08-21T16:38:02+00:00] INFO: Processing service[consul-template] action enable (consul-template::service line 98)
[2017-08-21T16:38:02+00:00] INFO: service[consul-template] enabled
[2017-08-21T16:38:02+00:00] INFO: Processing service[consul-template] action start (consul-template::service line 98)
[2017-08-21T16:38:02+00:00] INFO: libarchive_file[consul-template_0.19.0_linux_amd64.zip] sending restart action to service[consul-template] (delayed)
[2017-08-21T16:38:02+00:00] INFO: Processing service[consul-template] action restart (consul-template::service line 98)

================================================================================
Error executing action `restart` on resource 'service[consul-template]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/consul-template restart ----
STDOUT: Stopping consul-template.............
consul-template not stopped; may still be shutting down or shutdown may have failed
Unable to stop consul-template, will not attempt to start
STDERR: 
---- End output of /etc/init.d/consul-template restart ----
Ran /etc/init.d/consul-template restart returned 1

Resource Declaration:
---------------------
# In /chef/local-mode-cache/cache/cookbooks/consul-template/recipes/service.rb

 98:   service 'consul-template' do
 99:     provider Chef::Provider::Service::Upstart if is_upstart
100:     supports status: true, restart: true, reload: true
101:     action [:enable, :start]
102:     subscribes :restart, "libarchive_file[#{ConsulTemplateHelpers.install_file(node)}]", :delayed
103:   end
104: 

Compiled Resource:
------------------
# Declared in /chef/local-mode-cache/cache/cookbooks/consul-template/recipes/service.rb:98:in `from_file'

service("consul-template") do
  action [:enable, :start]
  updated true
  supports {:status=>true, :restart=>true, :reload=>true}
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  service_name "consul-template"
  enabled true
  running true
  masked nil
  pattern "consul-template"
  declared_type :service
  cookbook_name "consul-template"
  recipe_name "service"
end

Platform:
---------
x86_64-linux

[2017-08-21T16:38:13+00:00] ERROR: Running exception handlers
[2017-08-21T16:38:13+00:00] ERROR: Exception handlers complete
[2017-08-21T16:38:13+00:00] FATAL: Stacktrace dumped to /chef/local-mode-cache/cache/chef-stacktrace.out
[2017-08-21T16:38:13+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-21T16:38:13+00:00] ERROR: service[consul-template] (consul-template::service line 98) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/consul-template restart ----
STDOUT: Stopping consul-template.............
consul-template not stopped; may still be shutting down or shutdown may have failed
Unable to stop consul-template, will not attempt to start
STDERR: 
---- End output of /etc/init.d/consul-template restart ----
Ran /etc/init.d/consul-template restart returned 1
[2017-08-21T16:38:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@rennhak
Copy link

rennhak commented Aug 22, 2017

+1

2 similar comments
@michaelgillan-zz
Copy link

+1

@drozdvadym
Copy link

+1

@dmigous
Copy link
Author

dmigous commented Aug 22, 2017

Maybe we should just remove this check on restart of service?

https://github.com/adamkrone/chef-consul-template/blob/v0.12.0/templates/default/consul-template-init.erb#L73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants