I am new to user Docker and attempting to do an import of data I have exported. I am running my Docker container locally and have also installed dgraph via brew.
and when I run the command dgraph live --files data/alpha/export/dgraph.r20082.u1106.2238/g01.json.gz it fails on an infinite loop with 9801 xidmap.go:265] While requesting AssignUids(18464): rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero.
I have checked that the file path is 100% correct. What else could be causing the issue? I have tried to run the dgraph live inside the docker container but then it can only find either the alpha or the zero (I think cause they are in separate containers?).
The full output of the error looks like:
[Decoder]: Using assembly version of decoder
Page Size: 4096
I1107 10:33:52.499873 10249 init.go:107]
Dgraph version : -oss
Dgraph codename : tchalla-3-mod
Dgraph SHA-256 : 48a8f5e764058fca90e40e2a6f3ff9b7dda1e086d5b47a5535c3f01e668bcca5
Commit SHA-1 :
Commit timestamp :
Branch :
Go version : go1.17.2
jemalloc enabled : false
For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph , visit http://discuss.dgraph.io.
Licensed under the Apache Public License 2.0.
Copyright 2015-2020 Dgraph Labs, Inc.
Running transaction with dgraph endpoint: 127.0.0.1:9080
E1107 10:33:52.509466 10249 xidmap.go:150] Error while getting lease: rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero
Found 1 data file(s) to process
Processing data file "data/alpha/export/dgraph.r20082.u1106.2238/g01.json.gz"
E1107 10:33:52.516534 10249 xidmap.go:265] While requesting AssignUids(18464): rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero
E1107 10:33:52.517521 10249 xidmap.go:265] While requesting AssignUids(18464): rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero
E1107 10:33:52.518718 10249 xidmap.go:265] While requesting AssignUids(18464): rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero
E1107 10:33:52.519739 10249 xidmap.go:265] While requesting AssignUids(18464): rpc error: code = Unimplemented desc = unknown method AssignUids for service pb.Zero
The docker image is update to date. How can I do this without using brew? As mentioned I have tried running this inside the docker container (via docker exec -it <container name> <command>) but it keeps saying either the zero or alpha can’t be found. Can you provide an example of how I can do this?
You need the standalone image that has all the relevant runtimes bundled together.
Make sure Docker engine is running (easiest to do with Docker desktop app)
Pull the standalone image: docker pull dgraph/standalone
Create a dgraph folder at ~/dgraph (can be anywhere really)
Run docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph --name dgraph dgraph/standalone:v21.03.0
The -v ~/dgraph:/dgraph argument maps /dgraph directory inside Docker image to ~/dgraph on your machine. I ran the above command the first time, and in Docker desktop I found the ID of the image that was created, and on subsequent runs I boot up the existing generated image like this:
docker run -it -v ~/dev/dgraph:/dgraph -p 8000:8000 -p 8080:8080 -p 9080:9080 610431a48b7a (610431a48b7a is the id of the image). If you don’t do this it generates a new image every time that uses up hard disk space. Also, notice that I am mapping the volume to ~/dev/dgraph
Who knows what these files are, but I know that my db data is in there. Which means that you can install a different version of Dgraph, and point it at this same volume to load the same database with a different version.