Hi,
I’ve been trying to setup a dgraphzero
and a dgraph
instance on docker for about a day now, to no avail.
I get these errors:
zero_1 | 2017/11/04 13:45:39 pool.go:150: Echo error from 172.20.0.1:12345. Err: rpc error: code = Unavailable desc = grpc: the connection is unavailable
and,
dgraph_1 | 2017/11/04 01:26:09 groups.go:388: WARNING: We don't have address of any dgraphzero server.
and when I try to run a query on the dgraph instance I get this error:
{
"errors": [
{
"code": "Error",
"message": "No connection exists"
}
],
"data": null
}
Here is my compose file:
zero:
build: dgraph
command: ['/opt/scripts/zero.sh']
#volumes:
# - dgraphdata1:/dgraph
ports:
- 8888:8888
- 8889:8889
dgraph:
build: dgraph
command: ['/opt/scripts/dgraph.sh']
#volumes:
# - dgraphdata1:/dgraph
ports:
- 8080:8080
- 9080:9080
And my start scripts:
dgraph.sh
#!/bin/bash
IP=`ip route | awk '/default/ { print $3 }'`
dgraph \
--bindall=true \
--memory_mb 2048 \
--my "$IP:12345" \
--peer "zero:8888" \
--workerport 12345
zero.sh
#!/bin/bash
IP=`ip route | awk '/default/ { print $3 }'`
dgraphzero \
--bindall=true \
--my "$IP:12345" \
-w zw
Any help would be appreciated, thanks!