简体   繁体   中英

Docker Gremlin client cannot connect to gremlin server?

I'm running locally a gremlin-client container and a gremlin-server container in 2 separate containers. I'm starting the following like so:

docker network create -o com.docker.network.bridge.enable_icc=true hacker
docker run --network hacker -p 8182:8182 tinkerpop/gremlin-server:3.4
docker run --network hacker -it tinkerpop/gremlin-console

When I try and connect to the remote server from the client like so:

:remote connect tinkerpop.server conf/remote.yaml

I get the following error:

Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:8182

Why is this? I tried to share the network, but still doesn't work. Any ideas? The port is forwarded and matching what is in the remote.yaml file.

Edit

I got it working by modifying the host in the conf file on the client to read as host.docker.internal

I got it working by modifying the host in the conf file on the client to read as host.docker.internal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM