I am creating a new cluster setup as per https://dgraph.io/docs/deploy/#run-using-docker Using Docker.
Facing issue in connecting the Alpha with the Zero.
Logs from Zero:
[root@0F960 ~]# docker run -it -p 5080:5080 -p 6080:6080 -v /mnt/md0/appdata/zero:/dgraph dgraph/dgraph:latest dgraph zero --my=192.168.1.126:5080
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/31 02:46:14 Integration installed: ContextifyFrames
[Sentry] 2020/05/31 02:46:14 Integration installed: Environment
[Sentry] 2020/05/31 02:46:14 Integration installed: Modules
[Sentry] 2020/05/31 02:46:14 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/31 02:46:15 Integration installed: ContextifyFrames
[Sentry] 2020/05/31 02:46:15 Integration installed: Environment
[Sentry] 2020/05/31 02:46:15 Integration installed: Modules
[Sentry] 2020/05/31 02:46:15 Integration installed: IgnoreErrors
I0531 02:46:15.799457 14 init.go:99]
Dgraph version : v20.03.1
Commit timestamp : 2020-04-24 13:53:41 -0700
Branch : HEAD
Go version : go1.14.1
Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.
I0531 02:46:15.800297 14 run.go:108] Setting up grpc listener at: 0.0.0.0:5080
I0531 02:46:15.800755 14 run.go:108] Setting up http listener at: 0.0.0.0:6080
badger 2020/05/31 02:46:16 INFO: All 0 tables opened in 1ms
I0531 02:46:16.172124 14 node.go:148] Setting raft.Config to: &{ID:1 peers: learners: ElectionTick:20 HeartbeatTick:1 Storage:0xc0000b4280 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x282e510 DisableProposalForwarding:false}
E0531 02:46:16.172567 14 storage.go:97] deleteRange failed with error: requested index is unavailable due to compaction, from: 0, until: 0
I0531 02:46:16.173199 14 node.go:326] Group 0 found 0 entries
I0531 02:46:16.173663 14 log.go:34] 1 became follower at term 0
I0531 02:46:16.173725 14 log.go:34] newRaft 1 [peers: , term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
I0531 02:46:16.173770 14 log.go:34] 1 became follower at term 1
E0531 02:46:16.174223 14 raft.go:516] While proposing CID: Not Zero leader. Aborting proposal: cid:“190ee5c6-65ef-4833-a61c-4eb7bfac71b8” . Retrying…
I0531 02:46:16.174885 14 run.go:307] Running Dgraph Zero…
I0531 02:46:16.213030 14 node.go:185] Setting conf state to nodes:1
I0531 02:46:16.213219 14 raft.go:702] Done applying conf change at 0x1
I0531 02:46:17.175241 14 log.go:34] 1 no leader at term 1; dropping index reading msg
I0531 02:46:18.475158 14 log.go:34] 1 is starting a new election at term 1
I0531 02:46:18.475505 14 log.go:34] 1 became pre-candidate at term 1
I0531 02:46:18.475564 14 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
I0531 02:46:18.475709 14 log.go:34] 1 became candidate at term 2
I0531 02:46:18.475730 14 log.go:34] 1 received MsgVoteResp from 1 at term 2
I0531 02:46:18.475878 14 log.go:34] 1 became leader at term 2
I0531 02:46:18.476068 14 log.go:34] raft.node: 1 elected leader 1 at term 2
I0531 02:46:18.476884 14 raft.go:667] I’ve become the leader, updating leases.
I0531 02:46:18.477515 14 assign.go:42] Updated Lease id: 1. Txn Ts: 1
W0531 02:46:19.175261 14 node.go:674] [0x1] Read index context timed out
E0531 02:46:19.175422 14 raft.go:516] While proposing CID: Not Zero leader. Aborting proposal: cid:“217ae434-98a3-4a8d-a5f7-0bc19e528e6a” . Retrying…
I0531 02:46:22.270327 14 raft.go:509] CID set for cluster: b9d28391-ab87-43f2-810c-d4baea23b710
I0531 02:46:22.312004 14 license_ee.go:45] Enterprise state proposed to the cluster: key:“z1-11311509396647037717” license:<maxNodes:1844674407370955
Logs from Alpha - Server1
F960 ~]# docker run -it -p 7080:7080 -p 8080:8080 -p 9080:9080 -v ~/server1:/dgraph dgraph/dgraph:latest dgraph alpha --lru_mb=2048 --zero=192.168.1.126:5080 --my=192.168.1.126:7080
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/31 02:47:03 Integration installed: ContextifyFrames
[Sentry] 2020/05/31 02:47:03 Integration installed: Environment
[Sentry] 2020/05/31 02:47:03 Integration installed: Modules
[Sentry] 2020/05/31 02:47:03 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/31 02:47:04 Integration installed: ContextifyFrames
[Sentry] 2020/05/31 02:47:04 Integration installed: Environment
[Sentry] 2020/05/31 02:47:04 Integration installed: Modules
[Sentry] 2020/05/31 02:47:04 Integration installed: IgnoreErrors
I0531 02:47:04.491079 14 init.go:99]
Dgraph version : v20.03.1
Commit timestamp : 2020-04-24 13:53:41 -0700
Branch : HEAD
Go version : go1.14.1
Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.
I0531 02:47:04.491870 14 run.go:609] x.Config: {PortOffset:0 QueryEdgeLimit:1000000 NormalizeNodeLimit:10000}
I0531 02:47:04.491934 14 run.go:610] x.WorkerConfig: {ExportPath:export NumPendingProposals:256 Tracing:1 MyAddr:192.168.1.126:7080 ZeroAddr:[192.168.1.126:5080] RaftId:0 WhiteListedIPRanges: MaxRetries:-1 StrictMutations:false AclEnabled:false AbortOlderThan:5m0s SnapshotAfter:10000 ProposedGroupId:0 StartTime:2020-05-31 02:47:03.630075952 +0000 UTC m=+0.018112711 LudicrousMode:false BadgerKeyFile:}
I0531 02:47:04.492003 14 run.go:611] worker.Config: {PostingDir:p BadgerTables:mmap BadgerVlog:mmap BadgerKeyFile: BadgerCompressionLevel:3 WALDir:w MutationsMode:0 AuthToken: AllottedMemory:2048 HmacSecret: AccessJwtTtl:0s RefreshJwtTtl:0s AclRefreshInterval:0s}
I0531 02:47:04.492099 14 server_state.go:75] Setting Badger Compression Level: 3
I0531 02:47:04.492123 14 server_state.go:84] Setting Badger table load option: mmap
I0531 02:47:04.492134 14 server_state.go:96] Setting Badger value log load option: mmap
I0531 02:47:04.492196 14 server_state.go:141] Opening write-ahead log BadgerDB with options: {Dir:w ValueDir:w SyncWrites:false TableLoadingMode:1 ValueLogLoadingMode:2 NumVersionsToKeep:1 ReadOnly:false Truncate:true Logger:0x282e510 Compression:2 InMemory:false MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1048576 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 KeepL0InMemory:true MaxCacheSize:10485760 MaxBfCacheSize:0 LoadBloomsOnOpen:false NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:10000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ZSTDCompressionLevel:3 VerifyValueChecksum:false EncryptionKey: EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 managedTxns:false maxBatchCount:0 maxBatchSize:0}
I0531 02:47:04.546257 14 log.go:34] All 0 tables opened in 0s
I0531 02:47:04.548453 14 log.go:34] Replaying file id: 0 at offset: 0
I0531 02:47:04.548490 14 log.go:34] Replay took: 5.906µs
I0531 02:47:04.548643 14 server_state.go:75] Setting Badger Compression Level: 3
I0531 02:47:04.548662 14 server_state.go:84] Setting Badger table load option: mmap
I0531 02:47:04.548677 14 server_state.go:96] Setting Badger value log load option: mmap
I0531 02:47:04.548694 14 server_state.go:160] Opening postings BadgerDB with options: {Dir:p ValueDir:p SyncWrites:false TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 ReadOnly:false Truncate:true Logger:0x282e510 Compression:2 InMemory:false MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1024 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 KeepL0InMemory:true MaxCacheSize:1073741824 MaxBfCacheSize:0 LoadBloomsOnOpen:false NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:1000000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ZSTDCompressionLevel:3 VerifyValueChecksum:false EncryptionKey: EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 managedTxns:false maxBatchCount:0 maxBatchSize:0}
I0531 02:47:04.573671 14 log.go:34] All 0 tables opened in 0s
I0531 02:47:04.575469 14 log.go:34] Replaying file id: 0 at offset: 0
I0531 02:47:04.576056 14 log.go:34] Replay took: 12.37µs
I0531 02:47:04.577360 14 groups.go:107] Current Raft Id: 0x0
I0531 02:47:04.578198 14 worker.go:96] Worker listening at address: [::]:7080
I0531 02:47:04.579385 14 run.go:480] Bringing up GraphQL HTTP API at 0.0.0.0:8080/graphql
I0531 02:47:04.579532 14 run.go:481] Bringing up GraphQL HTTP admin API at 0.0.0.0:8080/admin
I0531 02:47:04.579719 14 run.go:512] gRPC server started. Listening on port 9080
I0531 02:47:04.579758 14 run.go:513] HTTP server started. Listening on port 8080
I0531 02:47:04.678139 14 pool.go:160] CONNECTING to 192.168.1.126:5080
I0531 02:47:09.582103 14 query.go:123] Dgraph query execution failed : Dgraph query failed because Please retry again, server is not ready to accept requests
I0531 02:47:09.582784 14 admin.go:520] Error reading GraphQL schema: Dgraph query failed because Dgraph query failed because Please retry again, server is not ready to accept requests.
I0531 02:47:14.584376 14 query.go:123] Dgraph query execution failed : Dgraph query failed because Please retry again, server is not ready to accept requests
I0531 02:47:14.584425 14 admin.go:520] Error reading GraphQL schema: Dgraph query failed because Dgraph query failed because Please retry again, server is not ready to accept requests.
I0531 02:47:24.592850 14 admin.go:520] Error reading GraphQL schema: Dgraph query failed because Dgraph query failed because Please retry again, server is not ready to accept requests.
W0531 02:47:24.679725 14 pool.go:254] Connection lost with 192.168.1.126:5080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 192.168.1.126:5080: i/o timeout"
I0531 02:47:29.593193 14 query.go:123] Dgraph query execution failed : Dgraph query failed because Please retry again, server is not ready to accept requests
The health shows unhealthy status,
192.168.1.126:8080/health?all
[{“status”:“unhealthy”,“lastEcho”:1590893948},{“instance”:“alpha”,“address”:“192.168.1.126:7080”,“status”:“healthy”,“group”:“0”,“version”:“v20.03.1”,“uptime”:14,“lastEcho”:1590893962}]
Status of Zero shows,
192.168.1.126:6080/state
{“counter”:“4”,“zeros”:{“1”:{“id”:“1”,“addr”:“192.168.1.126:5080”,“leader”:true}},“cid”:“b9d28391-ab87-43f2-810c-d4baea23b710”,“license”:{“maxNodes”:“18446744073709551615”,“expiryTs”:“1593485182”,“enabled”:true}}