➜ dgraph docker exec -it dgraph dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1
[Decoder]: Using assembly version of decoder
I0326 08:50:13.525035 21 init.go:98]
Dgraph version : v1.2.2
Dgraph SHA-256 : 86e27921d3a53dbc4faba78e9c7d7879ce8bafd6006c9fd4b77220535b8ae1c2
Commit SHA-1 : 21cc8936
Commit timestamp : 2020-03-19 12:13:11 -0700
Branch : HEAD
Go version : go1.13.5
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: localhost:9080
While trying to setup connection: context deadline exceeded. Retrying...
2020/03/26 08:50:24 Could not setup connection after 1 retries
github.com/dgraph-io/dgraph/x.Fatalf
/tmp/go/src/github.com/dgraph-io/dgraph/x/error.go:101
github.com/dgraph-io/dgraph/x.GetDgraphClient
/tmp/go/src/github.com/dgraph-io/dgraph/x/x.go:731
github.com/dgraph-io/dgraph/dgraph/cmd/live.run
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:398
github.com/dgraph-io/dgraph/dgraph/cmd/live.init.0.func1
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:117
github.com/spf13/cobra.(*Command).execute
/tmp/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
/tmp/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
/tmp/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:69
main.main
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/main.go:73
runtime.main
/usr/local/go/src/runtime/proc.go:203
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1357
You are probably confusing some step in the process. Please check that the container named “dgraph” is running. Use docker ps, in the field ‘NAMES’ you should see dgraph.
This error is saying that there is no connection to the cluster (Zero + Alpha). Since this step is using the same container, this error should not occur.
This error would only happen in two scenarios.
1 - You are executing the Live load in another container and that means that the dgraph will not be in “localhost”. But in the name of the container for example “zero: 6080, alpha: 9080” or something similar.
2 - Alpha and Zero have not been started.
Test these steps:
docker pull dgraph/dgraph
docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 --name dgraph dgraph/dgraph dgraph zero