{"action":"closed","issue":{"url":"https://api.github.com/repos/bflad/chef-docker/issues/414","labels_url":"https://api.github.com/repos/bflad/chef-docker/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/bflad/chef-docker/issues/414/comments","events_url":"https://api.github.com/repos/bflad/chef-docker/issues/414/events","html_url":"https://github.com/bflad/chef-docker/issues/414","id":104793795,"number":414,"title":"Cannot create docker_service using Systemd on Centos7","user":{"login":"skmichaelson","id":5304238,"avatar_url":"https://avatars.githubusercontent.com/u/5304238?v=3","gravatar_id":"","url":"https://api.github.com/users/skmichaelson","html_url":"https://github.com/skmichaelson","followers_url":"https://api.github.com/users/skmichaelson/followers","following_url":"https://api.github.com/users/skmichaelson/following{/other_user}","gists_url":"https://api.github.com/users/skmichaelson/gists{/gist_id}","starred_url":"https://api.github.com/users/skmichaelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skmichaelson/subscriptions","organizations_url":"https://api.github.com/users/skmichaelson/orgs","repos_url":"https://api.github.com/users/skmichaelson/repos","events_url":"https://api.github.com/users/skmichaelson/events{/privacy}","received_events_url":"https://api.github.com/users/skmichaelson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-03T22:28:55Z","updated_at":"2015-09-09T17:26:55Z","closed_at":"2015-09-09T17:26:55Z","body":"```bash\r\nError executing action `start` on resource 'docker_service[docker]'\r\n================================================================================\r\n\r\nMixlib::ShellOut::ShellCommandFailed\r\n------------------------------------\r\nservice[docker] (/tmp/kitchen/cache/cookbooks/docker/libraries/provider_docker_service_systemd.rb line 60) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'\r\n---- Begin output of /bin/systemctl start docker ----\r\nSTDOUT: \r\nSTDERR: Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.\r\n---- End output of /bin/systemctl start docker ----\r\nRan /bin/systemctl start docker returned 1\r\n\r\nResource Declaration:\r\n---------------------\r\n# In /tmp/kitchen/cache/cookbooks/......\r\n\r\n 3: docker_service 'docker' do\r\n 4:   host      [\"tcp://0.0.0.0:#{node[:docker][:open_port]}\", 'unix:///var/run/docker.sock']\r\n 5:   provider  Chef::Provider::DockerService::Systemd\r\n 6:   action    [:create, :start]\r\n 7: end\r\n 8: \r\n\r\nCompiled Resource:\r\n------------------\r\n# Declared in /tmp/kitchen/cache/cookbooks/......\r\n\r\ndocker_service(\"docker\") do\r\n  provider Chef::Provider::DockerService::Systemd\r\n  action [:create, :start]\r\n  updated true\r\n  updated_by_last_action true\r\n  retries 0\r\n  retry_delay 2\r\n  default_guard_interpreter :default\r\n  declared_type :docker_service\r\n  cookbook_name \"amp-docker\"\r\n  recipe_name \"installation\"\r\n  host [\"tcp://0.0.0.0:4243\", \"unix:///var/run/docker.sock\"]\r\n  ipv4_forward true\r\n  ipv6_forward true\r\nend\r\n```\r\n\r\nThe error is telling me to check `systemctl status docker.service` and `journalctl -xn`. Here's the output:\r\n\r\n```bash\r\n$ systemctl status docker.service\r\ndocker.service - Docker Application Container Engine\r\n   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)\r\n   Active: active (running) since Thu 2015-09-03 22:03:13 UTC; 15min ago\r\n     Docs: http://docs.docker.com\r\n  Process: 21585 ExecStartPre=/sbin/sysctl -w net.ipv6.conf.all.forwarding=1 (code=exited, status=0/SUCCESS)\r\n  Process: 21582 ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1 (code=exited, status=0/SUCCESS)\r\n Main PID: 21587 (docker)\r\n   CGroup: /system.slice/docker.service\r\n           └─21587 /usr/bin/docker daemon -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock\r\n```\r\nThis tell me that the docker service is running just fine. The other command provides some more useful information:\r\n\r\n```bash\r\n$ journalctl -xn\r\nSep 03 22:09:10 ip-xx-xx-xx-xx su[21848]: (to skmichaelson) centos on pts/0\r\nSep 03 22:09:10 ip-xx-xx-xx-xx su[21848]: pam_unix(su:session): session opened for user skmichaelson by centos(uid=0)\r\nSep 03 22:09:23 ip-xx-xx-xx-xx dbus-daemon[484]: dbus[484]: [system] Rejected send message, 2 matched rules; type=\"method_call\", sender=\":1.27\" (uid=1001 pid=21880 comm=\"/bin/systemc\r\nSep 03 22:09:23 ip-xx-xx-xx-xx dbus[484]: [system] Rejected send message, 2 matched rules; type=\"method_call\", sender=\":1.27\" (uid=1001 pid=21880 comm=\"/bin/systemctl start docker \")\r\nSep 03 22:09:49 ip-xx-xx-xx-xx su[21848]: pam_unix(su:session): session closed for user skmichaelson\r\n```\r\n\r\nSo the user skmichaelson is attempting to execute `/bin/systemctl start docker`, but does not have permissions to do so. TBH, I'm not sure if this is a bug in the cookbook, a problem with the Systemd provider in Chef, or perhaps a product of my sloppiness in writing my run list."}}