here is an example of part of my circle.yml how I am currently verifying if my mongodb docker container is responding to an http request, so that I can verify if the response is ok and that the server is up.
In this case the curl command will not run until the docker run command together with sleep finish.
I wonder if in some cases the exit code of docker run is actually non-zero but having ; sleep 10 in the same command masks the real exit code. Could you please split sleep 10 into a separate command? This way a failure in docker run will be obvious, and you will be able to tell if the tests failed because of docker run not succeeding.
@alexey , thank you for reply!
I tried as you adviced and found out that the problem is not in docker run
it will be probably timing issue (but I think retrying 10 times with curl with 5 second retry delay even after sleep command is enough time to work always ok.)
Here is a screenshot how it failed on circle, and how I connected via SSH and run the the same command.
Sorry about that—looks like those has been intermittent connectivity issues. Would be great to collect some networking stats for debugging, could you please add something like this to your circle.yml instead of the current curl command?
@alexey thank you very much, after I have tried that, I had no problems anymore now it is 100% success. I was even able to reduce the sleep command from 10 sec and 30 sec to 2 sec and it won’t fail anymore. I understand that traceroute is there to diagnose the network stats, but it just started to work…