Retrieve logs of support containers


#1

I currently have a problem where my database (image docker.elastic.co/elasticsearch/elasticsearch:5.2.0) isn’t starting up in CircleCI. Why? I have no idea, because I can’t get at the logs.

I’d really appreciate being able to see STDOUT and STDERR of any support container so I can debug failures.


#2

I already have a ticket in to see the output from containers for incidents like this. Bootstrap checks are why you’re having this problem:


You can use levlaz/elasticsearch-docker-ci:5.1.1 for ElasticSearch.
https://hub.docker.com/r/levlaz/elasticsearch-docker-ci/


#3

I appreciate that in this case, it’s probably bootstrap checks, but I can’t be sure, as this image works fine when running tests on my machine. I’m glad it’s already on your radar to provide logs.

I’m not particularly keen on running someone else’s image, and I’d rather not have to downgrade Elasticsearch version in order to get this working. I’ll stick with the Docker Hub version for now, as that seems to work fine (but it’s deprecated, so I’d like to switch sooner or later).


#4

Then I strongly encourage you to just build your own; here’s the diff:


#5

I was about to try that but then I had another idea (and thanks for inspiring it): I set the network.host configuration parameter to _local_, disabling the bootstrap checks. Because CircleCI containers share a network stack, they can still communicate and everything works swimmingly.

Thanks so much for the help!


#6

We have now enabled access to logs of support containers.

Within the UI, you can expand the container tab to view the logs.


#7