0

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 ?

eftov
  • 11
  • 1
  • 3
  • Where does `$CASSANDRA_CONTAINER_IP` come from? Which command generates that error? It looks like an environment variable somewhere isn't being interpolated correctly. – Andy Shinn Dec 20 '15 at 22:52
  • It's just the ip of the container running cassandra, i'm not setting it so I'll just edit it with the real one to avoid any confusion. If I run `docker run -d --net cassnw --name db cassandra:2.2.4 `, I can see it running ok with `docker ps`. Then I'm trying to launch `cqlsh` from another container as you can see but I'm having that issue. – eftov Dec 21 '15 at 08:28
  • have you been able to resolve this error? – azngunit81 Oct 25 '16 at 13:04

0 Answers0