Docker cannot refer to a container not running - fixed with reboot

I have an ELK stack running on docker on Ubuntu. Sometimes the elasticsearch container is terminated due to a bad request or bad message, which is expected in our development environment.

The problem is that after completing the ES container, restarting the Logstash container cannot be restarted due to the following error:

Cannot link to a non running container: /elasticsearch AS /logstash/elasticsearch 

Full list of commands:

 $ sudo docker stop logstash $ sudo docker start elasticsearch $ sudo docker start logstash Cannot link to a non running container: /elasticsearch AS /logstash/elasticsearch 

I checked that the ES container is indeed returning and I can connect to ES through curl, but the logstash container does not start.

The logstash container has the following link:

 /elasticsearch:/logstash/elasticsearch 

Docker version information:

 $ docker version Client: Version: 1.11.0 API version: 1.23 $docker --version Docker version 1.11.0, build 4dc5990 

Rebooting the entire VM solves the problems and allows me to properly restart all the containers, and all is well until the ES completes again.

Until the end of the world, I would prefer not to reboot to solve this problem.

Any ideas?

+8
docker
source share
1 answer

Sometimes this happens the last time. You can avoid rebooting just by clicking

sudo service docker restart

(or similar command depending on your OS)

+15
source share

All Articles