Dgraph after upgrade from 1.8 to 1.9, unable to start

for several days, everything works, but today, it stopped working.
could it be that i did not let it shutdown properly?
what can i do to recover?

dnode2_1    | 2018/10/16 15:36:39 pool.go:108: == CONNECTED ==> Setting dnode1:7080
dnode2_1    | 2018/10/16 15:36:39 draft.go:61: Node ID: 5 with GroupID: 2
dnode2_1    | 2018/10/16 15:36:39 draft.go:959: Restarting node for group: 2
dnode2_1    | 2018/10/16 15:36:39 raft.go:567: INFO: 5 became follower at term 42
dnode2_1    | 2018/10/16 15:36:39 raft.go:315: INFO: newRaft 5 [peers: [5], term: 42, commit: 2002, applied: 1006, lastindex: 2002, lastterm: 42]
dnode2_1    | 2018/10/16 15:36:39 groups.go:507: Got address of a Zero server: dzero:5080
dnode2_1    | 2018/10/16 15:36:39 index.go:929: Dropping predicate: [CreatedAt]
dnode2_1    | 2018/10/16 15:36:39 schema.go:63: Deleting schema for predicate: [CreatedAt]
dnode2_1    | 2018/10/16 15:36:39 predicate_move.go:41: Writing 8 keys
dnode2_1    | panic: Commit cannot be called with ManagedTxns=true. Use CommitAt.
dnode2_1    |
dnode2_1    | goroutine 174 [running]:
dnode2_1    | github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(*Txn).Commit(0xc0003a1b00, 0xc00aeebce0, 0x0, 0x0)
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/transaction.go:478 +0x785
dnode2_1    | github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(*Txn).CommitAt(0xc0003a1b00, 0x0, 0xc00aeebce0, 0x20, 0x0)
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/managed_db.go:63 +0x50
dnode2_1    | github.com/dgraph-io/dgraph/worker.populateKeyValues(0x147d980, 0xc0000a8050, 0xc00af2d7c0, 0x8, 0x8, 0x203000, 0xc000038238)
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/predicate_move.go:58 +0x29b
dnode2_1    | github.com/dgraph-io/dgraph/worker.(*node).applyCommitted(0xc00027e4b0, 0xc00ac35f70, 0x3f1, 0x240, 0x0)
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/draft.go:378 +0xad7
dnode2_1    | github.com/dgraph-io/dgraph/worker.(*node).processApplyCh(0xc00027e4b0)
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/draft.go:447 +0x47b
dnode2_1    | created by github.com/dgraph-io/dgraph/worker.(*node).InitAndStartNode
dnode2_1    | 	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/draft.go:1003 +0x4e6
dzero_1     | 2018/10/16 15:36:54 oracle.go:397: No healthy connection found to leader of group 2
dzero_1     | 2018/10/16 15:37:24 oracle.go:397: No healthy connection found to leader of group 2
dzero_1     | 2018/10/16 15:37:40 zero.go:366: Got connection request: id:5 addr:"dnode2:7080"
dzero_1     | 2018/10/16 15:37:40 zero.go:475: Connected: id:5 addr:"dnode2:7080"
dgraph_dnode2_1 exited with code 2

my docker compose file

version: "3.2"
services:
  dzero:
    image: dgraph/dgraph:v1.0.9
    volumes:
      - "./dgraph0:/dgraph"
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --bindall --my dzero:5080 --replicas 3
    networks:
      - jamesoffice_default
  dnode1:
    image: dgraph/dgraph:v1.0.9
    volumes:
      - "./dnode1:/dgraph"
    ports:
      - 8080:8080
      - 9080:9080
    expose:
      - 9080
      - 8080
      - 7080
    restart: on-failure
    command: dgraph server --my dnode1:7080 --lru_mb 2048 --zero dzero:5080
    networks:
      - jamesoffice_default
    depends_on:
      - dzero
  dnode2:
    image: dgraph/dgraph:v1.0.9
    volumes:
      - "./dnode2:/dgraph"
    expose:
      - 9080
      - 8080
      - 7080
    restart: on-failure
    command: dgraph server --my dnode2:7080 --lru_mb 2048 --zero dzero:5080
    networks:
      - jamesoffice_default
    depends_on:
      - dzero
  dnode-ui:
    image: dgraph/dgraph:v1.0.9
    volumes:
      - "./dgraph-ui:/dgraph"
    ports:
      - 8000:8000
    command: dgraph-ratel -addr https://localhost:8080
    networks:
      - jamesoffice_default


networks:
  jamesoffice_default:
    external: true

Just to be sure, did followed the recommended upgrade approach? https://docs.dgraph.io/deploy#upgrade-database

It is not good to make direct upgrades. There is a risk of conflict.

Updating clients is also recommended.

hi @MichelDiz

okay, i will update my client library too.
but i will there be a way that dgraph detect old database version and does its migration automatically?
is there a plan for this?
it would be wonderful :slight_smile:

thank you :slight_smile:

There is a backup feature plan that can serve this purpose.

awesome :slight_smile:

will this be part of community edition?

it will be part of community edition.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.