Dgraph sample data load error

Moved from GitHub tutorial/92

Posted by julazp:

What version of Dgraph are you using?

Dgraph version : v1.1.0
Dgraph SHA-256 : 7d4294a80f74692695467e2cf17f74648c18087ed7057d798f40e1d3a31d2095
Commit SHA-1 : ef7cdb28
Commit timestamp : 2019-09-04 00:12:51 -0700
Branch : HEAD
Go version : go1.12.7

Have you tried reproducing the issue with the latest release?

yes

What is the hardware spec (RAM, OS)?

vagrant virtualbox VM running centos 7, and dgraph running on official docker images

Steps to reproduce the issue (command/config used to run Dgraph).

When loading sample data (" 1million.rdf") into dgraph I get the following error:

“While trying to setup connection: context deadline exceeded. Retrying.”

Followed instructions on “https://docs.dgraph.io/deploy/”, using docker compose on a vagrant virtualbox VM ( with docker installed on it) on local computer. Zero, alpha and ui seems to start fine:

_`vi docker-compose.yml

`*version: "3.2"
services:
  zero:
    image: dgraph/dgraph:latest
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
  server:
    image: dgraph/dgraph:latest
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=server:7080 --lru_mb=2048 --zero=zero:5080
  ratel:
    image: dgraph/dgraph:latest
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 8000:8000
    command: dgraph-ratel

volumes:
  dgraph:
*`


but when I tried to load the sample data following instructions on “https://tour.dgraph.io/moredata/1/” :
*cd ~/dgraph*
*wget "https://github.com/dgraph-io/tutorial/blob/master/resources/1million.rdf.gz?raw=true" -O 1million.rdf.gz -q*
*docker exec -it dgraph dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1*

Expected behaviour and actual result.

it returns the following error:
While trying to setup connection: context deadline exceeded. Retrying…

MichelDiz commented :

Well, the Tour is based on Docker usage, not Docker Compose usage. In that case, you need to do docker exec on the composed context.

Do:

docker ps

get the ID from the composed context and do docker exec in this ID or some other identification.
e.g.

docker exec -it 98475493857 dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1

julazp commented :

Same result:


# docker exec -it 52e3bc8d744a dgraph live -f 1million.rdf.gz --alpha 192.168.57.111:9080 --zero 192.168.57.111:5080 -c 1
[Decoder]: Using assembly version of decoder
I0911 10:44:10.874796     107 init.go:98] 

Dgraph version   : v1.1.0
Dgraph SHA-256   : 7d4294a80f74692695467e2cf17f74648c18087ed7057d798f40e1d3a31d2095
Commit SHA-1     : ef7cdb28
Commit timestamp : 2019-09-04 00:12:51 -0700
Branch           : HEAD
Go version       : go1.12.7

For Dgraph official documentation, visit https://docs.dgraph.io.
For discussions about Dgraph     , visit http://discuss.dgraph.io.
To say hi to the community       , visit https://dgraph.slack.com.

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



Running transaction with dgraph endpoint: 192.168.57.111:9080
While trying to setup connection: context deadline exceeded. Retrying...
While trying to setup connection: context deadline exceeded. Retrying...

And none of the containers ( alpha or zero) are showing any errors, when this load is run.

MichelDiz commented :

Certainly inside the container, it is not possible to resolve the host IP 192.168.57.111. use

--alpha server:9080 --zero server:5080

Or something similar. Taking into mind the Docker network context.

MichelDiz commented :

Closing. Feel free to ask if needed.