I’m trying to run gremlin-server
as a secondary container in my build, but can’t seem to connect to it from my primary container. My config looks as follows:
jobs:
checks:
docker:
- image: cimg/python:3.8-node
- image: tinkerpop/gremlin-server:latest
I then have some unit tests in python which are all failing with the following traceback:
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8182 ssl:default [Connect call failed ('127.0.0.1', 8182)]
Next I tried checking if the build container could communicate with the secondary container at all. I did this by SSHing onto the build container and running nc -vz localhost 8182
. I get the following error:
nc: connect to localhost (127.0.0.1) port 8182 (tcp) failed: Connection refused
nc: connect to localhost (127.0.0.1) port 8182 (tcp) failed: Connection refused
nc: connect to localhost (::1) port 8182 (tcp) failed: Cannot assign requested address
Running the same image locally in docker and running the same command on a local terminal yields the following result:
Connection to localhost port 8182 [tcp/*] succeeded!
This indicates to me that for some reason, the primary container on CI can’t communicate with the secondary container on port 8182, even though it should be able to according to CircleCI’s docs?
Any idea why Gremlin Server isn’t reachable in this case?