Live loader not working in docker

Hello, I’m new to dgraph and want to get familiar with loading large amounts of data into running instances. My experimental environment are these three dockers:

version: "3.2"
    image: dgraph/dgraph:latest
      - /dgraph/data:/dgraph
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
    image: dgraph/dgraph:latest
      - /tmp/data:/dgraph
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=alpha:7080 --lru_mb=2048 --zero=zero:5080
    image: dgraph/dgraph:latest
      - 8000:8000
    command: dgraph-ratel

Now when all containers are running, in zero container:

root@518619f4252d:/dgraph# dgraph live -f test.json -s schema
[Decoder]: Using assembly version of decoder
I0203 16:21:03.847464      37 init.go:98] 

Dgraph version   : v1.2.0
Dgraph SHA-256   : 62e8eccb534b1ff072d4a516ee64f56b7601e3aeccb0b2f9156b0a8e4a1f8a12
Commit SHA-1     : 24b4b7439
Commit timestamp : 2020-01-27 15:53:31 -0800
Branch           : HEAD
Go version       : go1.13.5

For Dgraph official documentation, visit
For discussions about Dgraph     , visit
To say hi to the community       , visit

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2018 Dgraph Labs, Inc.

Running transaction with dgraph endpoint:
While trying to setup connection: context deadline exceeded. Retrying...
2020/02/03 16:21:14 Could not setup connection after 1 retries

Is this error due to some network isolation among containers, or what may be the problem here?

What type of Docker installation are you running? Native? Virtual Machine? Cloud?
By default Dgraph points to Localhost. So, when this error happens is because of the docker-machine inst available in localhost.

You should add the addr using -a flag.

dgraph live -f test.json -s schema -a cloudOrHostIPAddr:9080

It is native docker installation. Localhost is correct, when running docker ps, here is output:

CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                                                                NAMES
4a35b757d7e7        dgraph/dgraph:latest   "dgraph zero --my=12…"   25 seconds ago      Up 23 seconds>5080/tcp, 8080/tcp,>6080/tcp, 9080/tcp   zero_1
e6c6a94998df        dgraph/dgraph:latest   "dgraph alpha --my=1…"   25 seconds ago      Up 23 seconds>8080/tcp,>9080/tcp                       alpha_1
ffe5134cf8ab        dgraph/dgraph:latest   "dgraph-ratel"           3 days ago          Up 24 seconds       8080/tcp,>8000/tcp, 9080/tcp                           ratel_1

also on host machine all the open ports look ok:

ss -tlpn
State     Recv-Q    Send-Q       Local Address:Port         Peer Address:Port                                         
LISTEN    0         128                      *:8080                    *:*                                            
LISTEN    0         128                      *:9080                    *:*                                            
LISTEN    0         128                      *:5080                    *:*                                            
LISTEN    0         128                      *:6080                    *:*                                            
LISTEN    0         128                      *:8000                    *:*

Are you able to access Ratel?


I’m sorry, didn’t realize docker compose creates a separate network in which containers are accessible using their service names and not In this case the solution is to simply run

dgraph live -f test.json -s schema -a alpha:9080

Thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.