Docker-compose - unable to make it work but it used to

Hello

I’m using the modified docker-compose.yml file. It is modified as Ratel had been removed so I added a new service for, again, providing Ratel. This used to work. I last used this about a week ago.

I’ve tried running docker system prune -af and also deleting the /tmp/data dir to get back to a clean slate, but this also hasnt helped.

When I browse to http://localhost:8000/?latest# there is clearly no service listening.

# This Docker Compose file can be used to quickly bootup Dgraph Zero
# and Alpha in different Docker containers.

# It mounts /tmp/data on the host machine to /dgraph within the
# container. You can change /tmp/data to a more appropriate location.
# Run `docker-compose up` to start Dgraph.

version: "3.2"
services:
  zero:
    image: dgraph/dgraph:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
  alpha:
    image: dgraph/dgraph:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=alpha:7080 --zero=zero:5080 --security whitelist=172.31.0.0/24
  ratel:
    image: dgraph/ratel
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 8000
    restart: on-failure

Docker-compose logs

Here are the console output from docker-compose. I cannot see anything obviously wrong. Hopefully someone reading this can.

ratel_1  | 2021/05/24 00:02:49 Listening on :8000...
alpha_1  | [Sentry] 2021/05/24 00:02:49 Integration installed: ContextifyFrames
alpha_1  | [Sentry] 2021/05/24 00:02:49 Integration installed: Environment
alpha_1  | [Sentry] 2021/05/24 00:02:49 Integration installed: Modules
alpha_1  | [Sentry] 2021/05/24 00:02:49 Integration installed: IgnoreErrors
zero_1   | [Sentry] 2021/05/24 00:02:49 Integration installed: ContextifyFrames
zero_1   | [Sentry] 2021/05/24 00:02:49 Integration installed: Environment
zero_1   | [Sentry] 2021/05/24 00:02:49 Integration installed: Modules
zero_1   | [Sentry] 2021/05/24 00:02:49 Integration installed: IgnoreErrors
alpha_1  | [Sentry] 2021/05/24 00:02:50 Integration installed: ContextifyFrames
alpha_1  | [Sentry] 2021/05/24 00:02:50 Integration installed: Environment
alpha_1  | [Sentry] 2021/05/24 00:02:50 Integration installed: Modules
alpha_1  | [Sentry] 2021/05/24 00:02:50 Integration installed: IgnoreErrors
alpha_1  | I0524 00:02:50.257153      19 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --telemetry "sentry=false;" flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
zero_1   | [Sentry] 2021/05/24 00:02:50 Integration installed: ContextifyFrames
zero_1   | [Sentry] 2021/05/24 00:02:50 Integration installed: Environment
zero_1   | [Sentry] 2021/05/24 00:02:50 Integration installed: Modules
zero_1   | [Sentry] 2021/05/24 00:02:50 Integration installed: IgnoreErrors
alpha_1  | I0524 00:02:50.418940      19 init.go:110] 
alpha_1  | 
alpha_1  | Dgraph version   : v21.03.0
alpha_1  | Dgraph codename  : rocket
alpha_1  | Dgraph SHA-256   : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
alpha_1  | Commit SHA-1     : a77bbe8ae
alpha_1  | Commit timestamp : 2021-04-07 21:36:38 +0530
alpha_1  | Branch           : HEAD
alpha_1  | Go version       : go1.16.2
alpha_1  | jemalloc enabled : true
alpha_1  | 
alpha_1  | For Dgraph official documentation, visit https://dgraph.io/docs.
alpha_1  | For discussions about Dgraph     , visit http://discuss.dgraph.io.
alpha_1  | For fully-managed Dgraph Cloud   , visit https://dgraph.io/cloud.
alpha_1  | 
alpha_1  | Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
alpha_1  | Copyright 2015-2021 Dgraph Labs, Inc.
alpha_1  | 
alpha_1  | 
alpha_1  | I0524 00:02:50.418961      19 run.go:756] x.Config: {PortOffset:0 Limit:max-retries=-1; max-pending-queries=10000; normalize-node=10000; mutations-nquad=1000000; disallow-drop=false; txn-abort-after=5m; mutations=allow; query-edge=1000000; query-timeout=0ms LimitMutationsNquad:1000000 LimitQueryEdge:1000000 BlockClusterWideDrop:false LimitNormalizeNode:10000 QueryTimeout:0s MaxRetries:-1 GraphQL:introspection=true; debug=false; extensions=true; poll-interval=1s; lambda-url= GraphQLDebug:false}
alpha_1  | I0524 00:02:50.419025      19 run.go:757] x.WorkerConfig: {TmpDir:t ExportPath:export Trace:datadog=; ratio=0.01; jaeger= MyAddr:alpha:7080 ZeroAddr:[zero:5080] TLSClientConfig:<nil> TLSServerConfig:<nil> Raft:snapshot-after-entries=10000; snapshot-after-duration=30m; pending-proposals=256; idx=; group=; learner=false Badger:{Dir: ValueDir: SyncWrites:false NumVersionsToKeep:1 ReadOnly:false Logger:0xc000136130 Compression:1 InMemory:false MetricsEnabled:true NumGoroutines:8 MemTableSize:67108864 BaseTableSize:2097152 BaseLevelSize:10485760 LevelSizeMultiplier:10 TableSizeMultiplier:2 MaxLevels:7 VLogPercentile:0 ValueThreshold:1048576 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 BlockCacheSize:697932185 IndexCacheSize:375809638 NumLevelZeroTables:5 NumLevelZeroTablesStall:15 ValueLogFileSize:1073741823 ValueLogMaxEntries:1000000 NumCompactors:4 CompactL0OnClose:false LmaxCompaction:false ZSTDCompressionLevel:0 VerifyValueChecksum:false EncryptionKey:[] EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 DetectConflicts:true NamespaceOffset:-1 managedTxns:false maxBatchCount:0 maxBatchSize:0 maxValueThreshold:0} WhiteListedIPRanges:[{Lower:172.31.0.0 Upper:172.31.0.255}] StrictMutations:false AclEnabled:false HmacSecret:**** AbortOlderThan:5m0s ProposedGroupId:0 StartTime:2021-05-24 00:02:49.930045056 +0000 UTC m=+0.157697343 Ludicrous:enabled=false; concurrency=2000 LudicrousEnabled:false Security:whitelist=172.31.0.0/24; token= EncryptionKey:**** LogRequest:0 HardSync:false Audit:false}
alpha_1  | I0524 00:02:50.419134      19 run.go:758] worker.Config: {PostingDir:p WALDir:w MutationsMode:0 AuthToken: HmacSecret:**** AccessJwtTtl:0s RefreshJwtTtl:0s CachePercentage:0,65,35 CacheMb:1024 Audit:<nil> ChangeDataConf:file=; kafka=; sasl_user=; sasl_password=; ca_cert=; client_cert=; client_key=;}
alpha_1  | I0524 00:02:50.420092      19 storage.go:125] Init Raft Storage with snap: 0, first: 1, last: 0
alpha_1  | I0524 00:02:50.420186      19 server_state.go:141] Opening postings BadgerDB with options: {Dir:p ValueDir:p SyncWrites:false NumVersionsToKeep:2147483647 ReadOnly:false Logger:0x32c8038 Compression:1 InMemory:false MetricsEnabled:true NumGoroutines:8 MemTableSize:67108864 BaseTableSize:2097152 BaseLevelSize:10485760 LevelSizeMultiplier:10 TableSizeMultiplier:2 MaxLevels:7 VLogPercentile:0 ValueThreshold:1048576 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 BlockCacheSize:697932185 IndexCacheSize:375809638 NumLevelZeroTables:5 NumLevelZeroTablesStall:15 ValueLogFileSize:1073741823 ValueLogMaxEntries:1000000 NumCompactors:4 CompactL0OnClose:false LmaxCompaction:false ZSTDCompressionLevel:0 VerifyValueChecksum:false EncryptionKey:[] EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 DetectConflicts:false NamespaceOffset:1 managedTxns:false maxBatchCount:0 maxBatchSize:0 maxValueThreshold:0}
zero_1   | I0524 00:02:50.429090      17 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --telemetry "sentry=false;" flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
alpha_1  | I0524 00:02:50.438700      19 log.go:34] All 0 tables opened in 0s
alpha_1  | I0524 00:02:50.441962      19 log.go:34] Discard stats nextEmptySlot: 0
alpha_1  | I0524 00:02:50.442029      19 log.go:34] Set nextTxnTs to 0
alpha_1  | I0524 00:02:50.443078      19 groups.go:99] Current Raft Id: 0x0
alpha_1  | I0524 00:02:50.443116      19 groups.go:115] Sending member request to Zero: addr:"alpha:7080" 
alpha_1  | I0524 00:02:50.443622      19 worker.go:111] Worker listening at address: [::]:7080
alpha_1  | I0524 00:02:50.446371      19 run.go:568] Bringing up GraphQL HTTP API at 0.0.0.0:8080/graphql
alpha_1  | I0524 00:02:50.446402      19 run.go:569] Bringing up GraphQL HTTP admin API at 0.0.0.0:8080/admin
alpha_1  | E0524 00:02:50.446398      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
alpha_1  | I0524 00:02:50.446435      19 run.go:596] gRPC server started.  Listening on port 9080
alpha_1  | I0524 00:02:50.446981      19 run.go:597] HTTP server started.  Listening on port 8080
alpha_1  | I0524 00:02:50.544104      19 pool.go:162] CONNECTING to zero:5080
alpha_1  | W0524 00:02:50.546426      19 pool.go:267] Connection lost with zero:5080. Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 172.20.0.4:5080: connect: connection refused"
zero_1   | I0524 00:02:50.576252      17 init.go:110] 
zero_1   | 
zero_1   | Dgraph version   : v21.03.0
zero_1   | Dgraph codename  : rocket
zero_1   | Dgraph SHA-256   : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
zero_1   | Commit SHA-1     : a77bbe8ae
zero_1   | Commit timestamp : 2021-04-07 21:36:38 +0530
zero_1   | Branch           : HEAD
zero_1   | Go version       : go1.16.2
zero_1   | jemalloc enabled : true
zero_1   | 
zero_1   | For Dgraph official documentation, visit https://dgraph.io/docs.
zero_1   | For discussions about Dgraph     , visit http://discuss.dgraph.io.
zero_1   | For fully-managed Dgraph Cloud   , visit https://dgraph.io/cloud.
zero_1   | 
zero_1   | Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
zero_1   | Copyright 2015-2021 Dgraph Labs, Inc.
zero_1   | 
zero_1   | 
zero_1   | I0524 00:02:50.576339      17 run.go:259] Setting Config to: {raft:0xc0005900c8 telemetry:0xc000590098 limit:0xc0005900d0 bindall:true portOffset:0 numReplicas:1 peer: w:zw rebalanceInterval:480000000000 tlsClientConfig:<nil> audit:<nil> limiterConfig:0xc000592510}
zero_1   | I0524 00:02:50.576402      17 run.go:145] Setting up grpc listener at: 0.0.0.0:5080
zero_1   | I0524 00:02:50.576685      17 run.go:145] Setting up http listener at: 0.0.0.0:6080
zero_1   | I0524 00:02:50.577774      17 storage.go:125] Init Raft Storage with snap: 0, first: 1, last: 0
zero_1   | I0524 00:02:50.577935      17 node.go:152] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc000594a80 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x32c8038 DisableProposalForwarding:false}
zero_1   | I0524 00:02:50.578179      17 node.go:326] Group 0 found 0 entries
zero_1   | I0524 00:02:50.578194      17 raft.go:663] Starting a brand new node
zero_1   | I0524 00:02:50.578218      17 log.go:34] 1 became follower at term 0
zero_1   | I0524 00:02:50.578228      17 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
zero_1   | I0524 00:02:50.578234      17 log.go:34] 1 became follower at term 1
zero_1   | I0524 00:02:50.580129      17 run.go:393] Running Dgraph Zero...
zero_1   | E0524 00:02:50.581570      17 raft.go:547] While proposing CID: Not Zero leader. Aborting proposal: cid:"6e187a90-1afb-474e-afae-e4028a41d750" . Retrying...
zero_1   | I0524 00:02:50.581457      17 node.go:189] Setting conf state to nodes:1 
zero_1   | I0524 00:02:50.582281      17 raft.go:966] Done applying conf change at 0x1
alpha_1  | E0524 00:02:51.447254      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
zero_1   | I0524 00:02:51.950281      17 zero.go:442] Got connection request: cluster_info_only:true 
zero_1   | I0524 00:02:51.950553      17 log.go:34] 1 no leader at term 1; dropping index reading msg
alpha_1  | E0524 00:02:52.447922      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
alpha_1  | E0524 00:02:53.448313      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
zero_1   | E0524 00:02:53.582680      17 raft.go:547] While proposing CID: Not Zero leader. Aborting proposal: cid:"7a0e2b19-0a9a-475c-9125-6dbc0de8f20d" . Retrying...
zero_1   | W0524 00:02:53.951510      17 node.go:680] [0x1] Read index context timed out
zero_1   | I0524 00:02:53.951577      17 log.go:34] 1 no leader at term 1; dropping index reading msg
zero_1   | I0524 00:02:54.380289      17 log.go:34] 1 is starting a new election at term 1
zero_1   | I0524 00:02:54.380318      17 log.go:34] 1 became pre-candidate at term 1
zero_1   | I0524 00:02:54.380324      17 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
zero_1   | I0524 00:02:54.380393      17 log.go:34] 1 became candidate at term 2
zero_1   | I0524 00:02:54.380401      17 log.go:34] 1 received MsgVoteResp from 1 at term 2
zero_1   | I0524 00:02:54.380417      17 log.go:34] 1 became leader at term 2
zero_1   | I0524 00:02:54.380426      17 log.go:34] raft.node: 1 elected leader 1 at term 2
zero_1   | I0524 00:02:54.380502      17 raft.go:912] I've become the leader, updating leases.
zero_1   | I0524 00:02:54.380522      17 assign.go:47] Updated UID: 1. Txn Ts: 1. NsID: 1.
alpha_1  | E0524 00:02:54.448780      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
alpha_1  | I0524 00:02:55.447627      19 admin.go:824] Error reading GraphQL schema: Please retry again, server is not ready to accept requests.
alpha_1  | E0524 00:02:55.449763      19 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
zero_1   | W0524 00:02:55.952569      17 node.go:680] [0x1] Read index context timed out
zero_1   | I0524 00:02:55.952824      17 zero.go:467] Connected: cluster_info_only:true 
zero_1   | I0524 00:02:55.953900      17 zero.go:442] Got connection request: addr:"alpha:7080" 
zero_1   | I0524 00:02:55.954490      17 pool.go:162] CONNECTING to alpha:7080
zero_1   | I0524 00:02:55.954845      17 zero.go:607] Connected: id:1 group_id:1 addr:"alpha:7080" 
alpha_1  | I0524 00:02:55.955482      19 groups.go:134] Connected to group zero. Assigned group: 1
alpha_1  | I0524 00:02:55.955523      19 groups.go:136] Raft Id after connection to Zero: 0x1
alpha_1  | I0524 00:02:55.955542      19 draft.go:232] Node ID: 0x1 with GroupID: 1
alpha_1  | I0524 00:02:55.955557      19 draft.go:241] RaftContext: id:1 group:1 addr:"alpha:7080" 
alpha_1  | I0524 00:02:55.955756      19 node.go:152] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc000278280 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x32c8038 DisableProposalForwarding:false}
alpha_1  | I0524 00:02:55.956121      19 node.go:326] Group 1 found 0 entries
alpha_1  | I0524 00:02:55.956155      19 draft.go:1794] New Node for group: 1
alpha_1  | I0524 00:02:55.956190      19 log.go:34] 1 became follower at term 0
alpha_1  | I0524 00:02:55.956221      19 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
alpha_1  | I0524 00:02:55.956241      19 log.go:34] 1 became follower at term 1
alpha_1  | I0524 00:02:55.956336      19 draft.go:180] Operation started with id: opRollup
alpha_1  | I0524 00:02:55.956754      19 draft.go:1146] Found Raft progress: 0
alpha_1  | I0524 00:02:55.957101      19 groups.go:816] Got address of a Zero leader: zero:5080
alpha_1  | I0524 00:02:55.957342      19 groups.go:830] Starting a new membership stream receive from zero:5080.
alpha_1  | I0524 00:02:55.957631      19 node.go:189] Setting conf state to nodes:1 
alpha_1  | I0524 00:02:55.958114      19 log.go:34] 1 is starting a new election at term 1
alpha_1  | I0524 00:02:55.958150      19 log.go:34] 1 became pre-candidate at term 1
alpha_1  | I0524 00:02:55.958161      19 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
alpha_1  | I0524 00:02:55.958188      19 log.go:34] 1 became candidate at term 2
alpha_1  | I0524 00:02:55.958199      19 log.go:34] 1 received MsgVoteResp from 1 at term 2
alpha_1  | I0524 00:02:55.958218      19 log.go:34] 1 became leader at term 2
alpha_1  | I0524 00:02:55.958228      19 log.go:34] raft.node: 1 elected leader 1 at term 2
alpha_1  | I0524 00:02:55.959468      19 groups.go:847] Received first state update from Zero: counter:3 groups:<key:1 value:<members:<key:1 value:<id:1 group_id:1 addr:"alpha:7080" > > > > zeros:<key:1 value:<id:1 addr:"zero:5080" leader:true > > maxRaftId:1 
alpha_1  | I0524 00:02:56.450781      19 pool.go:162] CONNECTING to alpha:7080
zero_1   | I0524 00:02:56.583497      17 raft.go:540] CID set for cluster: 139a03dc-86a6-409f-ab68-b7d2a0f94def
zero_1   | I0524 00:02:56.583648      17 license_ee.go:46] Enterprise trial license proposed to the cluster: license:<maxNodes:18446744073709551615 expiryTs:1624406576 > 
alpha_1  | I0524 00:02:56.957381      19 groups.go:902] Leader idx=0x1 of group=1 is connecting to Zero for txn updates
alpha_1  | I0524 00:02:56.957416      19 groups.go:914] Got Zero leader: zero:5080
alpha_1  | I0524 00:02:56.959839      19 groups.go:491] Serving tablet for: 0-dgraph.type
alpha_1  | I0524 00:02:56.963601      19 groups.go:491] Serving tablet for: 0-dgraph.drop.op
alpha_1  | I0524 00:02:56.966409      19 groups.go:491] Serving tablet for: 0-dgraph.graphql.schema
alpha_1  | I0524 00:02:56.968088      19 groups.go:491] Serving tablet for: 0-dgraph.graphql.xid
alpha_1  | I0524 00:02:56.969777      19 groups.go:491] Serving tablet for: 0-dgraph.graphql.p_query
alpha_1  | I0524 00:02:56.969979      19 groups.go:166] Server is ready
alpha_1  | I0524 00:02:56.969990      19 access_ee.go:408] ResetAcl closed
alpha_1  | I0524 00:02:56.969995      19 access_ee.go:318] RefreshAcls closed
alpha_1  | I0524 00:03:00.450328      19 admin.go:835] No GraphQL schema in Dgraph; serving empty GraphQL API
zero_1   | I0524 00:03:50.583698      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:04:50.583315      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:05:50.583367      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:06:50.583791      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:07:50.582541      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:08:50.583173      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:09:50.583265      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:10:50.583692      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:11:50.581056      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
zero_1   | I0524 00:12:50.583013      17 raft.go:780] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0

Remove this volume, Ratel doesn’t need it. Also, when you use a single port param instead of host:container Docker may expose Ratel in a random port. So, set the param to 8000:8000.

Thank you @MichelDiz