docker swarm how to find out why service can't start -


i have problems because service deploy on docker swarm multiple nodes won't start , there not logs generated can @ docker service logs {servicename}

there many possible reasons service not start such

  • can't download image registry
  • constraints can't fulfilled

i have trouble finding out why container won't start. found command docker service ps {servicename} list tasks of 1 or more services , short error message (if there error). when try inspect task docker service logs {taskid} (which should show logs of task) error response daemon: task 3lkgo8t2sn7k not found.

can me full error message why service won't start?

i found 1 not handy solution problem.

docker service ps --no-trunc {servicename} 

which show errors downloading images, mounting nfs volumes amongst others.

---------------------- update

not errors can found in way described above. usefull tool looking @ docker deamon logs can done follwing way explained on stackoverflow:

journalctl -u docker.service | tail -n 50  

it depends on os. here few locations, commands few operating systems:

  • ubuntu (old using upstart ) - /var/log/upstart/docker.log
  • ubuntu (new using systemd ) - journalctl -u docker.service
  • boot2docker - /var/log/docker.log
  • debian gnu/linux - /var/log/daemon.log
  • centos - /var/log/daemon.log | grep docker
  • coreos - journalctl -u docker.service
  • fedora - journalctl -u docker.service
  • red hat enterprise linux server - /var/log/messages | grep docker
  • opensuse - journalctl -u docker.service
  • osx - ~/library/containers/com.docker.docker/data/com.docker.driver.amd64-linux/log/d‌​ocker.log
  • windows - get-eventlog -logname application -source docker -after (get-date).addminutes(-5) | sort-object time, mentioned here.

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -