# Dgraph 1.0.6 error - context deadline exceeded

**URL:** <https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025>\
**Category:** Dgraph\
**Created:** [August 17, 2018, 8:36pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025 "2018-08-17T20:36:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 8:36pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/1 "2018-08-17T20:36:19Z")

</div>

I am constantly getting below error -

```auto
rpc error: code = Unknown desc = While proposing error: context deadline exceeded

```

I googled and could not find any helpful resource.

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 9:17pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/3 "2018-08-17T21:17:38Z")

</div>

I am also getting this error -

**Below error is no more -** as this error was when I closed and restart `dgraph server`

```auto
2018/08/18 02:46:58 oracle.go:427: Error while fetching minTs from group 1, err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:47:08 oracle.go:421: No healthy connection found to leader of group 1

```

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 9:24pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/4 "2018-08-17T21:24:38Z")

</div>

Is your Dgraph Server up and running?

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 9:25pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/5 "2018-08-17T21:25:23Z")

</div>

Yes, it’s up and running.

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 9:28pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/6 "2018-08-17T21:28:28Z")

</div>

I have aerospike and dgraph both running and I insert data on both of them.

As soon as I have inserted data to aerospike, I put the data in dgraph. And the UID generated by dgraph is put back to aerospike bin.

The error comes right after using below code -

```auto
assigned, err := dg.NewTxn().Mutate(ctx, mu)
// Here error comes
rpc error: code = Unknown desc = While processing error: context deadline exceeded

```

I use `assigned.Uids["blank-0"]` to put inside in aerospike bin. I get

I use aerospike and dgraph because - First is extremely fast in reading and fetching data and later is extremely fast in writing data, So, I have plan to build connector for both of them for my use case.

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 10:12pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/7 "2018-08-17T22:12:01Z")

</div>

Is this with one Zero and one Server? Do you have connection logs when Dgraph started running and can share the commands you used to run Dgraph?

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 10:16pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/8 "2018-08-17T22:16:38Z")

</div>

Yes, it is with one Zero and one Server. Now, I can see all of a sudden my all write to dgraph is throwing an error - “context deadline exceeded”.

It was not the case earlier.

Just to provide more detail, below are some of my code work -

```auto
conn, errGraph := grpc.Dial("127.0.0.1:9080", grpc.WithInsecure())
	if errGraph != nil {
		panic("Error! While trying to dial gRPC!")
	}
	defer conn.Close()

```

and usual write operation.

My **dgraph zero** log

```auto
~/dgraph$ dgraph zero
Setting up grpc listener at: 0.0.0.0:5080
Setting up http listener at: 0.0.0.0:6080
2018/08/18 02:46:38 node.go:235: Found hardstate: {Term:6 Vote:1 Commit:204 XXX_unrecognized:[]}
2018/08/18 02:46:38 node.go:244: Group 0 found 205 entries
2018/08/18 02:46:38 raft.go:462: Restarting node for dgraphzero
2018/08/18 02:46:38 raft.go:567: INFO: 1 became follower at term 6
2018/08/18 02:46:38 raft.go:315: INFO: newRaft 1 [peers: [], term: 6, commit: 204, applied: 0, lastindex: 204, lastterm: 6]
Running Dgraph zero...
2018/08/18 02:46:38 node.go:135: Setting conf state to nodes:1 
2018/08/18 02:46:38 pool.go:108: == CONNECT ==> Setting localhost:7080
2018/08/18 02:46:40 raft.go:1070: INFO: 1 no leader at term 6; dropping index reading msg
2018/08/18 02:46:41 raft.go:1070: INFO: 1 no leader at term 6; dropping index reading msg
2018/08/18 02:46:41 raft.go:749: INFO: 1 is starting a new election at term 6
2018/08/18 02:46:41 raft.go:580: INFO: 1 became candidate at term 7
2018/08/18 02:46:41 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 7
2018/08/18 02:46:41 raft.go:621: INFO: 1 became leader at term 7
2018/08/18 02:46:41 node.go:301: INFO: raft.node: 1 elected leader 1 at term 7
2018/08/18 02:46:57 zero.go:333: Got connection request: id:1 addr:"localhost:7080" 
2018/08/18 02:46:57 zero.go:441: Connected
2018/08/18 02:46:58 oracle.go:427: Error while fetching minTs from group 1, err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:46:58 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 02:47:08 oracle.go:421: No healthy connection found to leader of group 1

2018/08/18 02:49:38 oracle.go:76: purging below ts:40001, len(o.commits):12, len(o.aborts):6, len(o.rowCommit):0
2018/08/18 03:42:18 oracle.go:76: purging below ts:40002, len(o.commits):0, len(o.aborts):1, len(o.rowCommit):0

```

My **dgraph server** log

```auto
:~/dgraph$ dgraph server --lru_mb=2048 --zero=localhost:5080
2018/08/18 02:46:57 server.go:116: Setting Badger option: default
2018/08/18 02:46:57 server.go:131: Setting Badger table load option: mmap
2018/08/18 02:46:57 server.go:143: Setting Badger value log load option: mmap
2018/08/18 02:46:57 server.go:153: Opening postings Badger DB with options: {Dir:p ValueDir:p SyncWrites:true TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:32 NumMemtables:5 NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741824 ValueLogMaxEntries:1000000 NumCompactors:3 managedTxns:false DoNotCompact:false maxBatchCount:0 maxBatchSize:0 ReadOnly:false Truncate:false}
2018/08/18 02:46:57 groups.go:77: Current Raft Id: 1
2018/08/18 02:46:57 gRPC server started. Listening on port 9080
2018/08/18 02:46:57 HTTP server started. Listening on port 8080
2018/08/18 02:46:57 worker.go:89: Worker listening at address: [::]:7080
2018/08/18 02:46:57 pool.go:108: == CONNECT ==> Setting localhost:5080
2018/08/18 02:46:57 groups.go:104: Connected to group zero. Assigned group: 0
2018/08/18 02:46:58 draft.go:150: Node ID: 1 with GroupID: 1
2018/08/18 02:46:58 node.go:224: Found Snapshot, Metadata: {ConfState:{Nodes:[] XXX_unrecognized:[]} Index:20 Term:3 XXX_unrecognized:[]}
2018/08/18 02:46:58 node.go:235: Found hardstate: {Term:3 Vote:1 Commit:30 XXX_unrecognized:[]}
2018/08/18 02:46:58 node.go:244: Group 1 found 11 entries
2018/08/18 02:46:58 draft.go:1018: Restarting node for group: 1
2018/08/18 02:46:58 raft.go:567: INFO: 1 became follower at term 3
2018/08/18 02:46:58 raft.go:315: INFO: newRaft 1 [peers: [], term: 3, commit: 30, applied: 20, lastindex: 30, lastterm: 3]
2018/08/18 02:46:58 groups.go:494: Got address of a Zero server: localhost:5080

```

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 10:26pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/9 "2018-08-17T22:26:45Z")

</div>

Thanks. Is the firewall issue from earlier resolved? The commands used to run Dgraph Zero and Dgraph Server are ok.

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 10:39pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/10 "2018-08-17T22:39:55Z")

</div>

Yes, I have put back my firewall state to original state. Same state where I had successfully inserted the data, but no luck, error is still there.

While writing this post. I tried running the code again by turning off the firewall completely but the error is still there.

I am sure, it’s not firewall now. I am seeing the error after below incidents.

* * *

Earlier, I was running my golang app on URL “[https://localhost:1443](https://localhost:1443)” and just to check on mobile, I switched my app to run on URL and address “[https://192.168.0.2:1443](https://192.168.0.2:1443)” and after checking, I switched back to “[https://localhost:1443](https://localhost:1443)” and since then I am getting this error.

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 10:49pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/11 "2018-08-17T22:49:49Z")

</div>

Can you share the output with `dgraph zero` and `dgraph server` again? Including the version information from the beginning.

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 10:54pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/12 "2018-08-17T22:54:24Z")

</div>

I just restarted my PC and restarted everything here is the output after restarting now -

**dgraph zero**

```auto
~/dgraph$ dgraph zero
Setting up grpc listener at: 0.0.0.0:5080
Setting up http listener at: 0.0.0.0:6080
2018/08/18 04:20:59 node.go:235: Found hardstate: {Term:7 Vote:1 Commit:210 XXX_unrecognized:[]}
2018/08/18 04:20:59 node.go:244: Group 0 found 211 entries
2018/08/18 04:20:59 raft.go:462: Restarting node for dgraphzero
2018/08/18 04:20:59 raft.go:567: INFO: 1 became follower at term 7
2018/08/18 04:20:59 raft.go:315: INFO: newRaft 1 [peers: [], term: 7, commit: 210, applied: 0, lastindex: 210, lastterm: 7]
Running Dgraph zero...
2018/08/18 04:20:59 node.go:135: Setting conf state to nodes:1 
2018/08/18 04:20:59 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 04:20:59 pool.go:108: == CONNECT ==> Setting localhost:7080
2018/08/18 04:20:59 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 04:20:59 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 04:20:59 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 04:20:59 pool.go:161: Echo error from localhost:7080. Err: 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"
2018/08/18 04:21:02 raft.go:749: INFO: 1 is starting a new election at term 7
2018/08/18 04:21:02 raft.go:580: INFO: 1 became candidate at term 8
2018/08/18 04:21:02 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 8
2018/08/18 04:21:02 raft.go:621: INFO: 1 became leader at term 8
2018/08/18 04:21:02 node.go:301: INFO: raft.node: 1 elected leader 1 at term 8
2018/08/18 04:21:02 zero.go:333: Got connection request: id:1 addr:"localhost:7080" 
2018/08/18 04:21:02 zero.go:441: Connected
2018/08/18 04:21:09 oracle.go:421: No healthy connection found to leader of group 1

```

and here is dgraph server

```auto
~/dgraph$ dgraph server --lru_mb=2048 --zero=localhost:5080
2018/08/18 04:21:02 server.go:116: Setting Badger option: default
2018/08/18 04:21:02 server.go:131: Setting Badger table load option: mmap
2018/08/18 04:21:02 server.go:143: Setting Badger value log load option: mmap
2018/08/18 04:21:02 server.go:153: Opening postings Badger DB with options: {Dir:p ValueDir:p SyncWrites:true TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:32 NumMemtables:5 NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741824 ValueLogMaxEntries:1000000 NumCompactors:3 managedTxns:false DoNotCompact:false maxBatchCount:0 maxBatchSize:0 ReadOnly:false Truncate:false}
2018/08/18 04:21:02 groups.go:77: Current Raft Id: 1
2018/08/18 04:21:02 worker.go:89: Worker listening at address: [::]:7080
2018/08/18 04:21:02 gRPC server started. Listening on port 9080
2018/08/18 04:21:02 HTTP server started. Listening on port 8080
2018/08/18 04:21:02 pool.go:108: == CONNECT ==> Setting localhost:5080
2018/08/18 04:21:02 groups.go:104: Connected to group zero. Assigned group: 0
2018/08/18 04:21:02 draft.go:150: Node ID: 1 with GroupID: 1
2018/08/18 04:21:02 node.go:224: Found Snapshot, Metadata: {ConfState:{Nodes:[] XXX_unrecognized:[]} Index:20 Term:3 XXX_unrecognized:[]}
2018/08/18 04:21:02 node.go:235: Found hardstate: {Term:3 Vote:1 Commit:30 XXX_unrecognized:[]}
2018/08/18 04:21:02 node.go:244: Group 1 found 11 entries
2018/08/18 04:21:02 draft.go:1018: Restarting node for group: 1
2018/08/18 04:21:02 raft.go:567: INFO: 1 became follower at term 3
2018/08/18 04:21:02 raft.go:315: INFO: newRaft 1 [peers: [], term: 3, commit: 30, applied: 20, lastindex: 30, lastterm: 3]
2018/08/18 04:21:02 groups.go:494: Got address of a Zero server: localhost:5080

```

And extremely sorry, I just checked my version now on this PC, it is as below -

```auto
Dgraph version : v1.0.6
Commit SHA-1 : ae8e5ffd
Commit timestamp : 2018-06-29 19:27:35 -0700
Branch : HEAD

```

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 11:00pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/13 "2018-08-17T23:00:52Z")

</div>

Wow, I just upgraded dgraph to 1.0.7 and now, I am unable to start dgraph server at all. Here is log -

**dgraph zero**

```auto
~/dgraph$ dgraph zero

Dgraph version : v1.0.7
Commit SHA-1 : f1803442
Commit timestamp : 2018-08-10 13:00:21 -0700
Branch : HEAD

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 under Apache 2.0 + Commons Clause. Copyright 2015-2018 Dgraph Labs, Inc.

Setting up grpc listener at: 0.0.0.0:5080
Setting up http listener at: 0.0.0.0:6080
2018/08/18 04:28:43 node.go:229: Found hardstate: {Term:8 Vote:1 Commit:211 XXX_unrecognized:[]}
2018/08/18 04:28:43 node.go:238: Group 0 found 212 entries
2018/08/18 04:28:43 raft.go:355: Restarting node for dgraphzero
2018/08/18 04:28:43 raft.go:567: INFO: 1 became follower at term 8
2018/08/18 04:28:43 raft.go:315: INFO: newRaft 1 [peers: [], term: 8, commit: 211, applied: 0, lastindex: 211, lastterm: 8]
Running Dgraph zero...
2018/08/18 04:28:43 node.go:129: Setting conf state to nodes:1 
2018/08/18 04:28:43 raft.go:511: Done applying conf change at 1
2018/08/18 04:28:43 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:43 pool.go:108: == CONNECTED ==> Setting localhost:7080
2018/08/18 04:28:43 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:43 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:43 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:43 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:45 raft.go:749: INFO: 1 is starting a new election at term 8
2018/08/18 04:28:45 raft.go:594: INFO: 1 became pre-candidate at term 8
2018/08/18 04:28:45 raft.go:664: INFO: 1 received MsgPreVoteResp from 1 at term 8
2018/08/18 04:28:45 raft.go:580: INFO: 1 became candidate at term 9
2018/08/18 04:28:45 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 9
2018/08/18 04:28:45 raft.go:621: INFO: 1 became leader at term 9
2018/08/18 04:28:45 node.go:301: INFO: raft.node: 1 elected leader 1 at term 9
2018/08/18 04:28:47 zero.go:333: Got connection request: id:1 addr:"localhost:7080" 
2018/08/18 04:28:47 zero.go:442: Connected: id:1 addr:"localhost:7080" 
2018/08/18 04:28:53 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:53 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:53 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:53 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:28:53 pool.go:162: Echo error from localhost:7080. Err: 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"
2018/08/18 04:29:04 zero.go:333: Got connection request: id:1 addr:"localhost:7080" 
2018/08/18 04:29:04 zero.go:442: Connected: id:1 addr:"localhost:7080" 
2018/08/18 04:29:13 oracle.go:401: No healthy connection found to leader of group 1
2018/08/18 04:29:43 oracle.go:401: No healthy connection found to leader of group 1
2018/08/18 04:30:13 oracle.go:401: No healthy connection found to leader of group 1

```

**and dgraph server**

```auto
~/dgraph$ dgraph server --lru_mb=2048 --zero=localhost:5080

Dgraph version : v1.0.7
Commit SHA-1 : f1803442
Commit timestamp : 2018-08-10 13:00:21 -0700
Branch : HEAD

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 under Apache 2.0 + Commons Clause. Copyright 2015-2018 Dgraph Labs, Inc.

2018/08/18 04:29:04 server.go:117: Setting Badger option: ssd
2018/08/18 04:29:04 server.go:133: Setting Badger table load option: mmap
2018/08/18 04:29:04 server.go:146: Setting Badger value log load option: none
2018/08/18 04:29:04 server.go:157: Opening postings Badger DB with options: {Dir:p ValueDir:p SyncWrites:true TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:32 NumMemtables:5 NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741824 ValueLogMaxEntries:1000000 NumCompactors:3 managedTxns:false DoNotCompact:false maxBatchCount:0 maxBatchSize:0 ReadOnly:false Truncate:true}
2018/08/18 04:29:04 groups.go:78: Current Raft Id: 1
2018/08/18 04:29:04 gRPC server started. Listening on port 9080
2018/08/18 04:29:04 HTTP server started. Listening on port 8080
2018/08/18 04:29:04 worker.go:89: Worker listening at address: [::]:7080
2018/08/18 04:29:04 pool.go:108: == CONNECTED ==> Setting localhost:5080
2018/08/18 04:29:04 groups.go:105: Connected to group zero. Assigned group: 0
2018/08/18 04:29:04 draft.go:74: Node ID: 1 with GroupID: 1
2018/08/18 04:29:04 node.go:218: Found Snapshot, Metadata: {ConfState:{Nodes:[] XXX_unrecognized:[]} Index:20 Term:3 XXX_unrecognized:[]}
2018/08/18 04:29:04 node.go:229: Found hardstate: {Term:3 Vote:1 Commit:30 XXX_unrecognized:[]}
2018/08/18 04:29:04 node.go:238: Group 1 found 11 entries
2018/08/18 04:29:04 draft.go:964: Restarting node for group: 1
2018/08/18 04:29:04 raft.go:567: INFO: 1 became follower at term 3
2018/08/18 04:29:04 raft.go:315: INFO: newRaft 1 [peers: [], term: 3, commit: 30, applied: 20, lastindex: 30, lastterm: 3]
2018/08/18 04:29:04 groups.go:496: Got address of a Zero server: localhost:5080
2018/08/18 04:29:04 Unknown proposal
github.com/dgraph-io/dgraph/x.Fatalf
	/ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:100
github.com/dgraph-io/dgraph/worker.(*node).applyCommitted
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/draft.go:419
github.com/dgraph-io/dgraph/worker.(*node).processApplyCh
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/draft.go:431
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2361

```

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 11:05pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/14 "2018-08-17T23:05:52Z")

</div>

Did you go through the [Upgrade Database procedure](https://docs.dgraph.io/deploy/#upgrade-database) with your existing data?

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 11:07pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/15 "2018-08-17T23:07:39Z")

</div>

No, as it’s development server, data is not important - so I can delete all and start fresh. That is not a problem - Is dgraph server not restarting error due to old data?

**UPDATE** : I deleted the old data and ran again, it’s working now.

I will start checing insert of data again to see, if I still get error

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [August 17, 2018, 11:17pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/16 "2018-08-17T23:17:51Z")

</div>

Possibly. As per the [upgrade database docs](https://docs.dgraph.io/deploy/#upgrade-database):

> Dgraph’s underlying data format could have changed, and reloading the export avoids encoding incompatibilities

---

<div class="post-metadata">

**Author:** ![rocky](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/rocky/32/1162_2.png) [@rocky](https://discuss.dgraph.io/u/rocky)\
**Post date:** [August 17, 2018, 11:29pm UTC](https://discuss.dgraph.io/t/dgraph-1-0-6-error-context-deadline-exceeded/3025/17 "2018-08-17T23:29:32Z")

</div>

I updated the dgraph to `1.0.7` and started with fresh data. The error is gone now. Application is working fine.

I could not find much detail on why this error occurred in first case though,

Thanks a lot @dmai - for helping me through out until here.
