Running dgraph in docker following this:
https://docs.dgraph.io/get-started/#docker-on-non-linux-distributions
docker create -v /dgraph --name data dgraph/dgraph
docker run -it -p 5080:5080 -p 6080:6080 --volumes-from data --name diggy dgraph/dgraph dgraph zero
docker exec -it diggy dgraph alpha --lru_mb 2048 --zero localhost:5080
# Run Dgraph Ratel
docker exec -it diggy dgraph-ratel
No response from:
http://localhost:8000
What version is running on the container?
It is important to follow the template that appears the moment you create the issue. This way avoiding having to ask the same things. When the problem is not obvious enough.
Cheers.
Hi @MichelDiz
Thanks - I understand
The problem is the same for two other users, so I maybe it is a general problem running local docker. For myself it is not a show stopper, as I am working on something else - so it is more for you information to see if it is actually a problem - can you run the commands yourself?
Thanks for a great product!
Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf5
Built: Thu Oct 17 23:44:48 2019
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.4
API version: 1.40 (minimum version 1.12)
Go version: go1.12.10
Git commit: 9013bf5
Built: Thu Oct 17 23:50:38 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
Just did docker pull dgraph/dgraph.
Looking at: https://hub.docker.com/r/dgraph/dgraph
it looks like version Dgraph v1.1.0
https://github.com/dgraph-io/dgraph/releases
docker run -it -p 5080:5080 -p 6080:6080 --volumes-from data --name diggy dgraph/dgraph dgraph zero
I1101 09:25:32.365738 1 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 https://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.
I1101 09:25:32.369811 1 run.go:102] Setting up grpc listener at: 0.0.0.0:5080 docker exec -it diggy dgraph alpha --lru_mb 2048 --zero localhost:5080 Dgraph version : v1.1.0 For Dgraph official documentation, visit https://docs.dgraph.io. Licensed variously under the Apache Public License 2.0 and Dgraph Community License. I1101 09:34:02.274586 21 run.go:500] x.Config: {PortOffset:0 QueryEdgeLimit:1000000 NormalizeNodeLimit:10000}
I1101 09:25:32.370585 1 run.go:102] Setting up http listener at: 0.0.0.0:6080
badger 2019/11/01 09:25:32 INFO: All 0 tables opened in 0s
I1101 09:25:32.389109 1 node.go:143] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc000124840 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x22d6ac8 DisableProposalForwarding:false}
I1101 09:25:32.394699 1 node.go:321] Group 0 found 1 entries
I1101 09:25:32.396511 1 log.go:34] 1 became follower at term 0
I1101 09:25:32.397462 1 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
I1101 09:25:32.397918 1 log.go:34] 1 became follower at term 1
E1101 09:25:32.399862 1 raft.go:517] While proposing CID: Not Zero leader. Aborting proposal: cid:"44de9027-919f-4c0b-9114-781bc420d1bf" . Retrying...
I1101 09:25:32.400631 1 run.go:262] Running Dgraph Zero...
I1101 09:25:32.402497 1 node.go:180] Setting conf state to nodes:1
I1101 09:25:32.402593 1 raft.go:698] Done applying conf change at 0x1
I1101 09:25:33.401760 1 log.go:34] 1 no leader at term 1; dropping index reading msg
E1101 09:25:35.402459 1 raft.go:517] While proposing CID: Not Zero leader. Aborting proposal: cid:"f9f8e9a2-f3ee-45a5-813c-9d0a5b501fdd" . Retrying...
W1101 09:25:35.402459 1 node.go:669] [0x1] Read index context timed out
I1101 09:25:35.403143 1 log.go:34] 1 no leader at term 1; dropping index reading msg
I1101 09:25:36.005310 1 log.go:34] 1 is starting a new election at term 1
I1101 09:25:36.006617 1 log.go:34] 1 became pre-candidate at term 1
I1101 09:25:36.007935 1 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
I1101 09:25:36.008844 1 log.go:34] 1 became candidate at term 2
I1101 09:25:36.008895 1 log.go:34] 1 received MsgVoteResp from 1 at term 2
I1101 09:25:36.008969 1 log.go:34] 1 became leader at term 2
I1101 09:25:36.009167 1 log.go:34] raft.node: 1 elected leader 1 at term 2
I1101 09:25:36.009688 1 raft.go:664] I've become the leader, updating leases.
I1101 09:25:36.009786 1 assign.go:41] Updated Lease id: 1. Txn Ts: 1
W1101 09:25:37.404031 1 node.go:669] [0x1] Read index context timed out
I1101 09:25:38.409293 1 raft.go:510] CID set for cluster: 98a96307-7b97-4c34-b0d3-aa906643da9c
I1101 09:25:38.414159 1 license_ee.go:45] Enterprise state proposed to the cluster: key:"z1-12602181153661479163" license:Docker exec:
I1101 09:34:02.273397 21 init.go:98]
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 discussions about Dgraph , visit https://discuss.dgraph.io.
To say hi to the community , visit https://dgraph.slack.com.
Copyright 2015-2018 Dgraph Labs, Inc.
I1101 09:34:02.274642 21 run.go:501] x.WorkerConfig: {ExportPath:export NumPendingProposals:256 Tracing:1 MyAddr: ZeroAddr:localhost:5080 RaftId:0 WhiteListedIPRanges:[] MaxRetries:-1 StrictMutations:false AclEnabled:false AbortOlderThan:5m0s SnapshotAfter:10000}
I1101 09:34:02.274772 21 run.go:502] edgraph.Config: {PostingDir:p BadgerTables:mmap BadgerVlog:mmap WALDir:w MutationsMode:0 AuthToken: AllottedMemory:2048.0MB AccessJwtTtl:0s RefreshJwtTtl:0s AclRefreshInterval:0s}
I1101 09:34:02.275847 21 server.go:133] Setting Badger table load option: mmap
I1101 09:34:02.275892 21 server.go:145] Setting Badger value log load option: mmap
I1101 09:34:02.276062 21 server.go:173] Opening write-ahead log BadgerDB with options: {Dir:w ValueDir:w SyncWrites:false TableLoadingMode:1 ValueLogLoadingMode:2 NumVersionsToKeep:1 ReadOnly:false Truncate:true Logger:0x22d6ac8 MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1048576 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:10000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ChecksumVerificationMode:0 managedTxns:false maxBatchCount:0 maxBatchSize:0}
I1101 09:34:02.294057 21 log.go:34] All 0 tables opened in 0s
I1101 09:34:02.297493 21 server.go:133] Setting Badger table load option: mmap
I1101 09:34:02.297529 21 server.go:145] Setting Badger value log load option: mmap
I1101 09:34:02.297813 21 server.go:186] Opening postings BadgerDB with options: {Dir:p ValueDir:p SyncWrites:false TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 ReadOnly:false Truncate:true Logger:0x22d6ac8 MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1024 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:1000000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ChecksumVerificationMode:0 managedTxns:false maxBatchCount:0 maxBatchSize:0}
I1101 09:34:02.311796 21 log.go:34] All 0 tables opened in 0s
I1101 09:34:02.316968 21 run.go:417] gRPC server started. Listening on port 9080
I1101 09:34:02.317130 21 run.go:418] HTTP server started. Listening on port 8080
I1101 09:34:02.317999 21 groups.go:98] Current Raft Id: 0x0
I1101 09:34:02.319467 21 worker.go:81] Worker listening at address: [::]:7080
I1101 09:34:02.421115 21 pool.go:148] CONNECTED to localhost:5080
I1101 09:34:02.446178 21 groups.go:121] Connected to group zero. Assigned group: 1
I1101 09:34:02.446231 21 groups.go:123] Raft Id after connection to Zero: 0x1
I1101 09:34:02.450486 21 draft.go:76] Node ID: 0x1 with GroupID: 1
I1101 09:34:02.451521 21 node.go:143] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc000617170 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x22d6ac8 DisableProposalForwarding:false}
I1101 09:34:02.453146 21 node.go:321] Group 1 found 1 entries
I1101 09:34:02.453474 21 draft.go:1392] New Node for group: 1
I1101 09:34:02.454879 21 log.go:34] 1 became follower at term 0
I1101 09:34:02.455531 21 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
I1101 09:34:02.455666 21 log.go:34] 1 became follower at term 1
I1101 09:34:02.456645 21 groups.go:141] Server is ready
I1101 09:34:02.457576 21 draft.go:749] Found Raft progress: 0
I1101 09:34:02.460897 21 groups.go:727] Got address of a Zero leader: localhost:5080
I1101 09:34:02.462604 21 groups.go:740] Starting a new membership stream receive from localhost:5080.
I1101 09:34:02.464934 21 node.go:180] Setting conf state to nodes:1
I1101 09:34:02.466641 21 log.go:34] 1 is starting a new election at term 1
I1101 09:34:02.466214 21 groups.go:757] Received first state update from Zero: counter:6 groups:<key:1 value:
I1101 09:34:02.469135 21 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
I1101 09:34:02.469476 21 log.go:34] 1 became candidate at term 2
I1101 09:34:02.470254 21 log.go:34] 1 received MsgVoteResp from 1 at term 2
I1101 09:34:02.470308 21 log.go:34] 1 became leader at term 2
I1101 09:34:02.471654 21 log.go:34] raft.node: 1 elected leader 1 at term 2
I1101 09:34:03.461196 21 groups.go:808] Leader idx=0x1 of group=1 is connecting to Zero for txn updates
I1101 09:34:03.461330 21 groups.go:817] Got Zero leader: localhost:5080
I1101 09:34:03.482995 21 groups.go:448] Serving tablet for: dgraph.type
I1101 09:34:03.491159 21 log.go:34] Rebuilding index for predicate dgraph.type: Sent 0 keys
I1101 09:34:03.491592 21 index.go:702] Deleting index for attr dgraph.type and tokenizers []
I1101 09:34:03.491748 21 index.go:720] Rebuilding index for attr dgraph.type and tokenizers [exact]
I1101 09:34:03.492122 21 log.go:34] Writes flushed. Stopping compactions now...
I1101 09:34:03.514262 21 log.go:34] DropPrefix done
I1101 09:34:03.514447 21 log.go:34] Resuming writes
I1101 09:34:03.517151 21 log.go:34] Writes flushed. Stopping compactions now...
I1101 09:34:03.534230 21 log.go:34] DropPrefix done
I1101 09:34:03.537018 21 log.go:34] Resuming writes
I1101 09:34:03.540520 21 log.go:34] Rebuilding index for predicate dgraph.type: Sent 0 keys
I1101 09:34:03.541016 21 mutation.go:171] Done schema update predicate:"dgraph.type" value_type:STRING directive:INDEX tokenizer:"exact" list:true
Running Dgraph in https://labs.play-with-docker.com/
I have it running normally.
docker pull dgraph/dgraph
[node1] (local) [email protected] ~
docker run -it -p=8000:8000 dgraph/dgraph:latest dgraph-ratel
2019/11/01 14:08:58 Listening on port 8000...
[node1] (local) [email protected] ~
$ docker run -it dgraph/dgraph:latest dgraph -h
[Decoder]: Using assembly version of decoder
Dgraph is a horizontally scalable and distributed graph database,
providing ACID transactions, consistent replication and linearizable reads.
It's built from ground up to perform for a rich set of queries. Being a native
graph database, it tightly controls how the data is arranged on disk to optimize
for query performance and throughput, reducing disk seeks and network calls in a
cluster.
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
Closed due inactivity, feel free to reopen if have new fact related to bugs or something. Also, if you need community support reach me on https://discuss.dgraph.io/ - just open and topic that I gonna help you. Or somebody else.
However, the problem is not quite clear. There are no problems running Ratel (as the port 8000 had been mentioned) and there are no other bad function reports from other users, failed tests or no local failed execution from my part.
It needs more information, I've reread the issue and nothing elses seems abnormal. I suggest you start Cluster configuration from scratch tho.
One detail caught my eye
E1101 09:25:35.402459 1 raft.go:517] While proposing CID: Not Zero leader. Aborting proposal: cid:"f9f8e9a2-f3ee-45a5-813c-9d0a5b501fdd" . Retrying...
I don't know what the full context is on your side, and if that log was only momentary. But if it recurs, you may be running Dgraph improperly. Or have some other issues like bad connections/communications between instances. Start from scratch would be the fastest way to test this.
If you are not very familiar with Docker, use Docker Compose https://docs.dgraph.io/get-started/#docker-compose . Because it is friendlier and straightforward to the point.
That's it. If you need me, just go to discuss I'll be happy to help.
Cheers.
Thanks @MichelDiz I will pass it on to my friend and let him try with compose.
@MichaelJCompton Just to confirm - it works well with compose, we leave docker run for some other time :-)
Thanks
Most helpful comment
Closed due inactivity, feel free to reopen if have new fact related to bugs or something. Also, if you need community support reach me on https://discuss.dgraph.io/ - just open and topic that I gonna help you. Or somebody else.
However, the problem is not quite clear. There are no problems running Ratel (as the port 8000 had been mentioned) and there are no other bad function reports from other users, failed tests or no local failed execution from my part.
It needs more information, I've reread the issue and nothing elses seems abnormal. I suggest you start Cluster configuration from scratch tho.
One detail caught my eye
I don't know what the full context is on your side, and if that log was only momentary. But if it recurs, you may be running Dgraph improperly. Or have some other issues like bad connections/communications between instances. Start from scratch would be the fastest way to test this.
If you are not very familiar with Docker, use Docker Compose https://docs.dgraph.io/get-started/#docker-compose . Because it is friendlier and straightforward to the point.
That's it. If you need me, just go to discuss I'll be happy to help.
Cheers.