I have been testing cassandra (2.2.4) in docker (1.9.1) for a while locally on my machine but on Travis CI and Circle CI I always have the same issue:
Connection error: ('Unable to connect to any servers', {'db': error(111, "Tried connecting to [('172.18.0.2', 9042)]. Last error: Connection refused")})
I am running these commands :
docker network create cassnw
docker run -d --net cassnw --name db cassandra:2.2.4
docker run -it --net cassnw --rm -v $TRAVIS_BUILD_DIR/test:/test cassandra:2.2.4 cqlsh db -f /test/init.cql
with init.cql
being a script to run before my tests. These commands run fine on my machine (OSX with docker-machine), ubuntu and debian VMs and a docker droplet on DigitalOcean. But I end up having the issue above on Travis or Circle CI. Any idea what I am doing wrong ?