Skip to content

Allow running via docker-compose#268

Draft
nightscape wants to merge 1 commit intounigraph-dev:mainfrom
nightscape:dockerize
Draft

Allow running via docker-compose#268
nightscape wants to merge 1 commit intounigraph-dev:mainfrom
nightscape:dockerize

Conversation

@nightscape
Copy link

This PR makes the project runnable via docker-compose.
Parts of it have been taken from #227
Currently, I'm still getting errors that need to be fixed.

@nightscape
Copy link
Author

@thesophiaxu does this error tell you sth.?

dgraph-alpha_1  | I1218 01:18:16.981741      17 log.go:34] Writes flushed. Stopping compactions now...
dgraph-alpha_1  | I1218 01:18:19.921042      17 log.go:34] DropPrefix done
dgraph-alpha_1  | I1218 01:18:20.110022      17 log.go:34] Resuming writes
dgraph-alpha_1  | I1218 01:18:20.548691      17 index.go:777] Deleting indexes for _definition
dgraph-alpha_1  | I1218 01:18:21.168764      17 index.go:777] Deleting indexes for type
dgraph-alpha_1  | I1218 01:18:21.248473      17 log.go:34] DropPrefix called for [type type]
dgraph-alpha_1  | I1218 01:18:21.296645      17 log.go:34] Writes flushed. Stopping compactions now...
dgraph-alpha_1  | I1218 01:18:22.770101      17 log.go:34] DropPrefix done
dgraph-alpha_1  | I1218 01:18:22.810433      17 log.go:34] Resuming writes
dgraph-alpha_1  | I1218 01:18:23.007675      17 index.go:777] Deleting indexes for pkgManifest
dgraph-alpha_1  | I1218 01:18:23.359344      17 index.go:887] Computing prefix index for attr unigraph.id and tokenizers []
dgraph-alpha_1  | I1218 01:18:23.604031      17 index.go:905] Deleting index for attr unigraph.id and tokenizers [exact]
dgraph-alpha_1  | I1218 01:18:23.892072      17 index.go:777] Deleting indexes for unigraph.id
dgraph-alpha_1  | I1218 01:18:23.953281      17 log.go:34] DropPrefix called for [
                                                                                  unigraph.id 
                                                                                              unigraph.id 
                                                                                                          unigraph.id 
           unigraph.id]
dgraph-alpha_1  | I1218 01:18:23.958643      17 log.go:34] Writes flushed. Stopping compactions now...
dgraph-alpha_1  | I1218 01:18:24.855062      17 log.go:34] Dropping prefix at level 6 (1 tableGroups)
dgraph-alpha_1  | I1218 01:18:27.959212      17 log.go:34] DropPrefix done
dgraph-alpha_1  | I1218 01:18:28.004197      17 log.go:34] Resuming writes
dgraph-alpha_1  | I1218 01:18:28.328211      17 index.go:777] Deleting indexes for unigraph.origin
dgraph-alpha_1  | I1218 01:18:28.386486      17 log.go:34] DropPrefix called for [unigraph.origin unigraph.origin]
dgraph-alpha_1  | I1218 01:18:28.497329      17 log.go:34] Writes flushed. Stopping compactions now...
dgraph-alpha_1  | I1218 01:18:29.028735      17 log.go:34] Resuming writes
dgraph-alpha_1  | I1218 01:18:29.355442      17 index.go:940] Rebuilding index for attr _value.%dt and tokenizers [hour]
dgraph-alpha_1  | I1218 01:18:29.344418      17 index.go:940] Rebuilding index for attr _value.% and tokenizers [fulltext trigram hash]
dgraph-alpha_1  | I1218 01:18:29.344425      17 index.go:940] Rebuilding index for attr unigraph.id and tokenizers [exact]
dgraph-alpha_1  | I1218 01:18:29.344464      17 index.go:1129] Rebuilding reverse index for _value
dgraph-alpha_1  | I1218 01:18:29.344447      17 index.go:1129] Rebuilding reverse index for type
dgraph-alpha_1  | panic: runtime error: index out of range [16777216] with length 106
dgraph-alpha_1  | 
dgraph-alpha_1  | goroutine 242 [running]:
dgraph-alpha_1  | github.com/dgraph-io/badger/v2/skl.(*Arena).getNode(...)
dgraph-alpha_1  |       /go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201112230511-741de05a1330/skl/arena.go:95
dgraph-alpha_1  | github.com/dgraph-io/badger/v2/skl.(*Skiplist).getNext(...)
dgraph-alpha_1  |       /go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201112230511-741de05a1330/skl/skl.go:198
dgraph-alpha_1  | github.com/dgraph-io/badger/v2/skl.(*Skiplist).findLast(0xc00005dc00)
dgraph-alpha_1  |       /go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201112230511-741de05a1330/skl/skl.go:386 +0xbb
dgraph-alpha_1  | github.com/dgraph-io/badger/v2/skl.(*Skiplist).Empty(...)
dgraph-alpha_1  |       /go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201112230511-741de05a1330/skl/skl.go:377
dgraph-alpha_1  | github.com/dgraph-io/badger/v2.(*DB).DropPrefix(0xc00005dc00, {0xc0004e9560, 0x1a1b309, 0x2})
dgraph-alpha_1  |       /go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201112230511-741de05a1330/db.go:1647 +0x339
dgraph-alpha_1  | github.com/dgraph-io/dgraph/posting.(*IndexRebuild).DropIndexes(0xc0004e94d0, {0x1c23548, 0xc0018a7a40})
dgraph-alpha_1  |       /dgraph/posting/index.go:778 +0x233
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.runSchemaMutation.func4()
dgraph-alpha_1  |       /dgraph/worker/mutation.go:240 +0x34
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.runSchemaMutation({0x1c23548, 0xc0018a7a40}, {0xc0018d8900, 0x10, 0x1a1e986}, 0x13)
dgraph-alpha_1  |       /dgraph/worker/mutation.go:245 +0x694
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.(*node).applyMutations(0xc0002b4380, {0x1c23548, 0xc0018a7a40}, 0xc0001ae510)
dgraph-alpha_1  |       /dgraph/worker/draft.go:391 +0x82a
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.(*node).applyCommitted(0xc0002b4380, 0xc0001ae510)
dgraph-alpha_1  |       /dgraph/worker/draft.go:545 +0xc0f
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.(*node).processApplyCh.func1({0xc000586228, 0x1, 0x0})
dgraph-alpha_1  |       /dgraph/worker/draft.go:698 +0x347
dgraph-alpha_1  | github.com/dgraph-io/dgraph/worker.(*node).processApplyCh(0xc0002b4380)
dgraph-alpha_1  |       /dgraph/worker/draft.go:739 +0x22c
dgraph-alpha_1  | created by github.com/dgraph-io/dgraph/worker.(*node).InitAndStartNode
dgraph-alpha_1  |       /dgraph/worker/draft.go:1708 +0x4af
dgraph-alpha_1  | W1218 01:18:30.293117       1 sentry_integration.go:140] unable to read CID from file /tmp/dgraph-alpha-cid-sentry open /tmp/dgraph-alpha-cid-sentry: no such file or directory. Skip
dgraph-zero_1   | W1218 01:18:30.233459      17 pool.go:267] Connection lost with dgraph-alpha:7080. Error: rpc error: code = Unavailable desc = transport is closing
backend_1       | /app/node_modules/@grpc/grpc-js/build/src/call.js:31
backend_1       |     return Object.assign(new Error(message), status);
backend_1       |                          ^
backend_1       | 
backend_1       | Error: 14 UNAVAILABLE: Connection dropped
backend_1       |     at Object.callErrorFromStatus (/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
backend_1       |     at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:176:52)
backend_1       |     at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
backend_1       |     at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
backend_1       |     at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
backend_1       |     at processTicksAndRejections (node:internal/process/task_queues:76:11) {
backend_1       |   code: 14,
backend_1       |   details: 'Connection dropped',
backend_1       |   metadata: Metadata { internalRepr: Map(0) {}, options: {} }
backend_1       | }
backend_1       | error Command failed with exit code 1.
backend_1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
dgraph-alpha_1  | [Sentry] 2021/12/18 01:18:30 Sending fatal event [0399887ac22d44f981916d12bc6c3c69] to o318308.ingest.sentry.io project: 5208688
backend_1       | error Command failed.
backend_1       | Exit code: 1
backend_1       | Command: /usr/local/bin/node
backend_1       | Arguments: /opt/yarn-v1.22.5/lib/cli.js start dgraph-alpha:9080
backend_1       | Directory: /app/packages/unigraph-dev-backend
backend_1       | Output:
backend_1       | 
backend_1       | info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
dgraph-alpha_1  | [Sentry] 2021/12/18 01:18:32 Buffer flushed successfully.
backend_1       | error Command failed with exit code 1.
backend_1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
dgraph-alpha_1 exited with code 1
backend_1 exited with code 1

@thesophiaxu
Copy link
Collaborator

thesophiaxu commented Dec 18, 2021 via email

@nightscape
Copy link
Author

nightscape commented Dec 18, 2021

Doing the following in my PR:

docker-compose build
docker-compose up

At first I got error messages that unigraph couldn't connect to dgraph, then I added the wait-for which waits until it can connect to the specified TCP address, now I'm getting this one.
Could it be that one has to wait for even longer until dgraph is responding correctly at the specified address?

@nightscape
Copy link
Author

@ebdmuir you mentioned you were working on a Docker / docker-compose version yourself.
Did you encounter this issue or maybe got further already?

@matthew-dews
Copy link

matthew-dews commented Dec 25, 2021

FWIW this docker setup seemed to work as is for me. The UI was really slow but I don't know if that's related to docker or not.
Windows 10, Firefox browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants