I am trying to set up dgraph on single host linux machine. I ran the following commands.
dgraph zero --my=IPADDR:5080
dgraph alpha --lru_mb=1024 --my=127.0.0.1:7080 --zero=localhost:5080
dgraph-ratel
When I open http://localhost:8000/?latest and run {
“set”: [
{
“name”: “Karthic”,
“age”: 28,
“follows”: {
“name”: “Jessica”,
“age”: 31
}
}
]
}
I get an error
{
“name”: “t”,
“url”: “http://localhost:8080/mutate?commitNow=true”,
“errors”: [
{
“message”: “cannot retrieve predicate information: No connection exists”,
“extensions”: {
“code”: “ErrorInvalidRequest”
}
}
]
}
Alpha server and zero seem to be running with no problems in the logs.
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/07 16:46:24 Integration installed: ContextifyFrames
[Sentry] 2020/05/07 16:46:24 Integration installed: Environment
[Sentry] 2020/05/07 16:46:24 Integration installed: Modules
[Sentry] 2020/05/07 16:46:24 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/07 16:46:25 Integration installed: ContextifyFrames
[Sentry] 2020/05/07 16:46:25 Integration installed: Environment
[Sentry] 2020/05/07 16:46:25 Integration installed: Modules
[Sentry] 2020/05/07 16:46:25 Integration installed: IgnoreErrors
I0507 16:46:25.225193 28766 init.go:99]
Dgraph version : v20.03.1
Dgraph SHA-256 : 6a40b1e084205ae9e29336780b3458a3869db45c0b96b916190881c16d705ba8
Commit SHA-1 : c201611d6
Commit timestamp : 2020-04-24 13:53:41 -0700
Branch : HEAD
Go version : go1.14.1
For Dgraph official documentation, visit https://docs.dgraph.io.
For discussions about Dgraph , visit http://discuss.hypermode.com.
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-2020 Dgraph Labs, Inc.
I0507 16:46:25.225569 28766 run.go:108] Setting up grpc listener at: 0.0.0.0:5080
I0507 16:46:25.225724 28766 run.go:108] Setting up http listener at: 0.0.0.0:6080
badger 2020/05/07 16:46:25 INFO: All 1 tables opened in 1ms
badger 2020/05/07 16:46:25 INFO: Replaying file id: 0 at offset: 16846
badger 2020/05/07 16:46:25 INFO: Replay took: 16.492µs
E0507 16:46:25.353787 28766 storage.go:97] deleteRange failed with error: requested index is unavailable due to compaction, from: 0, until: 0
I0507 16:46:25.354504 28766 node.go:148] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc0000a8340 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x282e510 DisableProposalForwarding:false}
I0507 16:46:25.356783 28766 node.go:317] Found hardstate: {Term:8 Vote:1 Commit:100 XXX_unrecognized:[]}
I0507 16:46:25.357163 28766 node.go:326] Group 0 found 100 entries
I0507 16:46:25.357222 28766 raft.go:447] Restarting node for dgraphzero
I0507 16:46:25.357511 28766 log.go:34] 1 became follower at term 8
I0507 16:46:25.358300 28766 log.go:34] newRaft 1 [peers: [], term: 8, commit: 100, applied: 0, lastindex: 100, lastterm: 8]
I0507 16:46:25.359300 28766 run.go:307] Running Dgraph Zero...
I0507 16:46:25.411428 28766 node.go:185] Setting conf state to nodes:1
I0507 16:46:25.412014 28766 raft.go:702] Done applying conf change at 0x1
I0507 16:46:25.413126 28766 pool.go:160] CONNECTING to localhost:7080
W0507 16:46:25.413639 28766 pool.go:191] Shutting down extra connection to localhost:7080
I0507 16:46:25.414149 28766 pool.go:160] CONNECTING to IPADDR:7080
W0507 16:46:25.415575 28766 pool.go:191] Shutting down extra connection to localhost:7080
W0507 16:46:25.417912 28766 pool.go:254] Connection lost with localhost:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7080: connect: connection refused"
I0507 16:46:25.419302 28766 pool.go:160] CONNECTING to IPADDR:7081
W0507 16:46:25.420171 28766 pool.go:254] Connection lost with localhost:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7080: connect: connection refused"
I0507 16:46:25.420940 28766 pool.go:160] CONNECTING to 127.0.0.1:7080
W0507 16:46:25.421480 28766 pool.go:191] Shutting down extra connection to 127.0.0.1:7080
W0507 16:46:25.422402 28766 pool.go:254] Connection lost with 127.0.0.1:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7080: connect: connection refused"
W0507 16:46:25.423130 28766 pool.go:254] Connection lost with 127.0.0.1:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7080: connect: connection refused"
W0507 16:46:25.423686 28766 pool.go:254] Connection lost with localhost:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7080: connect: connection refused"
W0507 16:46:25.426484 28766 pool.go:254] Connection lost with IPADDR:7081. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp: lookup IPADDR: no such host"
W0507 16:46:25.426561 28766 pool.go:254] Connection lost with IPADDR:7080. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp: lookup IPADDR: no such host"
I0507 16:46:26.359412 28766 log.go:34] 1 no leader at term 8; dropping index reading msg
I0507 16:46:27.659529 28766 log.go:34] 1 is starting a new election at term 8
I0507 16:46:27.659625 28766 log.go:34] 1 became pre-candidate at term 8
I0507 16:46:27.659649 28766 log.go:34] 1 received MsgPreVoteResp from 1 at term 8
I0507 16:46:27.659864 28766 log.go:34] 1 became candidate at term 9
I0507 16:46:27.659906 28766 log.go:34] 1 received MsgVoteResp from 1 at term 9
I0507 16:46:27.660219 28766 log.go:34] 1 became leader at term 9
I0507 16:46:27.660323 28766 log.go:34] raft.node: 1 elected leader 1 at term 9
I0507 16:46:27.660473 28766 raft.go:667] I've become the leader, updating leases.
I0507 16:46:27.660667 28766 assign.go:42] Updated Lease id: 10001. Txn Ts: 50001
W0507 16:46:28.359609 28766 node.go:674] [0x1] Read index context timed out
I0507 16:46:51.703666 28766 zero.go:417] Got connection request: cluster_info_only:true
I0507 16:46:51.703878 28766 zero.go:435] Connected: cluster_info_only:true
I0507 16:46:51.704919 28766 zero.go:417] Got connection request: id:1 addr:"127.0.0.1:7080"
I0507 16:46:51.705052 28766 zero.go:544] Connected: id:1 addr:"127.0.0.1:7080"
I0507 16:54:25.356997 28766 tablet.go:208]
Groups sorted by size: [{gid:2 size:0} {gid:1 size:0}]
I0507 16:54:25.357093 28766 tablet.go:213] size_diff 0
I0507 17:02:25.357011 28766 tablet.go:208]
Groups sorted by size: [{gid:1 size:0} {gid:2 size:0}]
I0507 17:02:25.603005 28766 tablet.go:213] size_diff 0
I0507 17:10:25.356850 28766 tablet.go:208]
Groups sorted by size: [{gid:1 size:0} {gid:2 size:0}]
I0507 17:10:25.787933 28766 tablet.go:213] size_diff 0
Logs of alpha
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/07 16:46:51 Integration installed: ContextifyFrames
[Sentry] 2020/05/07 16:46:51 Integration installed: Environment
[Sentry] 2020/05/07 16:46:51 Integration installed: Modules
[Sentry] 2020/05/07 16:46:51 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
[Sentry] 2020/05/07 16:46:51 Integration installed: ContextifyFrames
[Sentry] 2020/05/07 16:46:51 Integration installed: Environment
[Sentry] 2020/05/07 16:46:51 Integration installed: Modules
[Sentry] 2020/05/07 16:46:51 Integration installed: IgnoreErrors
I0507 16:46:51.426085 28792 init.go:99]
Dgraph version : v20.03.1
Dgraph SHA-256 : 6a40b1e084205ae9e29336780b3458a3869db45c0b96b916190881c16d705ba8
Commit SHA-1 : c201611d6
Commit timestamp : 2020-04-24 13:53:41 -0700
Branch : HEAD
Go version : go1.14.1
For Dgraph official documentation, visit https://docs.dgraph.io.
For discussions about Dgraph , visit http://discuss.hypermode.com.
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-2020 Dgraph Labs, Inc.
I0507 16:46:51.426423 28792 run.go:609] x.Config: {PortOffset:0 QueryEdgeLimit:1000000 NormalizeNodeLimit:10000}
I0507 16:46:51.426444 28792 run.go:610] x.WorkerConfig: {ExportPath:export NumPendingProposals:256 Tracing:1 MyAddr:127.0.0.1:7080 ZeroAddr:[localhost:5080] RaftId:0 WhiteListedIPRanges:[] MaxRetries:-1 StrictMutations:false AclEnabled:false AbortOlderThan:5m0s SnapshotAfter:10000 ProposedGroupId:0 StartTime:2020-05-07 16:46:51.148421437 +0530 IST m=+0.008849074 LudicrousMode:false BadgerKeyFile:}
I0507 16:46:51.426483 28792 run.go:611] worker.Config: {PostingDir:p BadgerTables:mmap BadgerVlog:mmap BadgerKeyFile: BadgerCompressionLevel:3 WALDir:w MutationsMode:0 AuthToken: AllottedMemory:1024 HmacSecret:[] AccessJwtTtl:0s RefreshJwtTtl:0s AclRefreshInterval:0s}
I0507 16:46:51.426544 28792 server_state.go:75] Setting Badger Compression Level: 3
I0507 16:46:51.426552 28792 server_state.go:84] Setting Badger table load option: mmap
I0507 16:46:51.426555 28792 server_state.go:96] Setting Badger value log load option: mmap
I0507 16:46:51.426561 28792 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}
I0507 16:46:51.431126 28792 log.go:34] All 1 tables opened in 1ms
I0507 16:46:51.509494 28792 log.go:34] Replaying file id: 0 at offset: 17859
I0507 16:46:51.509573 28792 log.go:34] Replay took: 14.863µs
I0507 16:46:51.509894 28792 server_state.go:75] Setting Badger Compression Level: 3
I0507 16:46:51.509950 28792 server_state.go:84] Setting Badger table load option: mmap
I0507 16:46:51.509986 28792 server_state.go:96] Setting Badger value log load option: mmap
I0507 16:46:51.510024 28792 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}
I0507 16:46:51.551981 28792 log.go:34] All 1 tables opened in 0s
I0507 16:46:51.599686 28792 log.go:34] Replaying file id: 0 at offset: 2316
I0507 16:46:51.599762 28792 log.go:34] Replay took: 16.036µs
I0507 16:46:51.601769 28792 groups.go:107] Current Raft Id: 0x1
I0507 16:46:51.602595 28792 worker.go:96] Worker listening at address: [::]:7080
I0507 16:46:51.605933 28792 run.go:480] Bringing up GraphQL HTTP API at 0.0.0.0:8080/graphql
I0507 16:46:51.606016 28792 run.go:481] Bringing up GraphQL HTTP admin API at 0.0.0.0:8080/admin
I0507 16:46:51.606122 28792 run.go:512] gRPC server started. Listening on port 9080
I0507 16:46:51.606178 28792 run.go:513] HTTP server started. Listening on port 8080
I0507 16:46:51.702237 28792 pool.go:160] CONNECTING to localhost:5080
I0507 16:46:51.705385 28792 groups.go:135] Connected to group zero. Assigned group: 0
I0507 16:46:51.705411 28792 groups.go:137] Raft Id after connection to Zero: 0x1
I0507 16:46:51.705460 28792 pool.go:160] CONNECTING to IPADDR:7081
I0507 16:46:51.705533 28792 draft.go:200] Node ID: 0x1 with GroupID: 1
I0507 16:46:51.705571 28792 node.go:148] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc00057a680 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x282e510 DisableProposalForwarding:false}
I0507 16:46:51.705687 28792 pool.go:160] CONNECTING to 127.0.0.1:7080
E0507 16:46:51.705726 28792 storage.go:97] deleteRange failed with error: requested index is unavailable due to compaction, from: 0, until: 0
I0507 16:46:51.706172 28792 node.go:317] Found hardstate: {Term:9 Vote:1 Commit:111 XXX_unrecognized:[]}
I0507 16:46:51.706231 28792 node.go:326] Group 1 found 111 entries
I0507 16:46:51.706244 28792 draft.go:1544] Restarting node for group: 1
I0507 16:46:51.706302 28792 log.go:34] 1 became follower at term 9
I0507 16:46:51.706345 28792 log.go:34] newRaft 1 [peers: [], term: 9, commit: 111, applied: 0, lastindex: 111, lastterm: 9]
I0507 16:46:51.706377 28792 draft.go:147] Operation started with id: opRollup
I0507 16:46:51.706391 28792 groups.go:155] Server is ready
I0507 16:46:51.706601 28792 draft.go:962] Found Raft progress: 0
I0507 16:46:51.706649 28792 groups.go:784] Got address of a Zero leader: localhost:5080
I0507 16:46:51.706743 28792 groups.go:797] Starting a new membership stream receive from localhost:5080.
W0507 16:46:51.706870 28792 pool.go:254] Connection lost with IPADDR:7081. Error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp: lookup IPADDR: no such host"
I0507 16:46:51.707539 28792 groups.go:814] Received first state update from Zero: counter:99 groups:<key:1 value:<members:<key:1 value:<id:1 group_id:1 addr:"127.0.0.1:7080" leader:true last_update:1588787028 > > tablets:<key:"dgraph.graphql.schema" value:<group_id:1 predicate:"dgraph.graphql.schema" > > tablets:<key:"dgraph.type" value:<group_id:1 predicate:"dgraph.type" > > checksum:3103359118597316741 > > groups:<key:2 value:<members:<key:2 value:<id:2 group_id:2 addr:"IPADDR:7081" leader:true last_update:1588788775 > > > > zeros:<key:1 value:<id:1 addr:"localhost:5080" leader:true > > maxLeaseId:10000 maxTxnTs:50000 maxRaftId:1 cid:"1bf3fa50-2c14-47a6-9400-a14377a0d837" license:<maxNodes:18446744073709551615 expiryTs:1591286860 enabled:true >
I0507 16:46:51.754360 28792 node.go:185] Setting conf state to nodes:1
I0507 16:46:51.759016 28792 draft.go:147] Operation started with id: opIndexing
I0507 16:46:51.759079 28792 draft.go:112] Operation completed with id: opRollup
I0507 16:46:51.759241 28792 draft.go:112] Operation completed with id: opIndexing
I0507 16:46:51.810764 28792 draft.go:147] Operation started with id: opIndexing
I0507 16:46:51.811306 28792 draft.go:112] Operation completed with id: opIndexing
I0507 16:46:55.007017 28792 log.go:34] 1 is starting a new election at term 9
I0507 16:46:55.007146 28792 log.go:34] 1 became pre-candidate at term 9
I0507 16:46:55.007184 28792 log.go:34] 1 received MsgPreVoteResp from 1 at term 9
I0507 16:46:55.007444 28792 log.go:34] 1 became candidate at term 10
I0507 16:46:55.007537 28792 log.go:34] 1 received MsgVoteResp from 1 at term 10
I0507 16:46:55.007766 28792 log.go:34] 1 became leader at term 10
I0507 16:46:55.007837 28792 log.go:34] raft.node: 1 elected leader 1 at term 10
I0507 16:46:55.706775 28792 groups.go:865] Leader idx=0x1 of group=1 is connecting to Zero for txn updates
I0507 16:46:55.707102 28792 groups.go:874] Got Zero leader: localhost:5080
I0507 16:46:56.715246 28792 admin.go:523] No GraphQL schema in Dgraph; serving empty GraphQL API
I0507 16:47:01.759540 28792 draft.go:147] Operation started with id: opRollup
W0507 16:56:52.937043 28792 draft.go:1183] Raft.Ready took too long to process: Timer Total: 327ms. Breakdown: [{sync 326ms} {disk 1ms} {proposals 0s} {advance 0s}] Num entries: 1. MustSync: true