@miko can you please post your yaml configs?
And what do you mean “works”?
did you check docker service logs of the particular services?
I’m currently doing it manually
#!/usr/bin/env bash
docker network create --driver overlay --scope swarm dgraph
docker volume create dgza
docker volume create dgzb
docker volume create dgzc
docker service create --name dgza --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgza,target=/dgraph dgraph/dgraph:latest dgraph zero --bindall true --my dgza:7080 --idx 1 --replicas 3 --peer dgzb:7080
docker service create --name dgzb --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgzb,target=/dgraph dgraph/dgraph:latest dgraph zero --bindall true --my dgzb:7080 --idx 2 --replicas 3 --peer dgzc:7080
docker service create --name dgzc --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgzc,target=/dgraph dgraph/dgraph:latest dgraph zero --bindall true --my dgzc:7080 --idx 3 --replicas 3 --peer dgza:7080
docker volume create dgsa
docker service create --name dgsa --publish 7080:7080 --publish 8080:8080 --publish 9080:9080 --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgsa,target=/dgraph dgraph/dgraph:latest dgraph server --memory_mb 2048 --zero dgza:7080
this doesn’t work for me.
Maybe it’s my network or dns resolving of the static Go binaries, not sure how docker swarm dns works (do they write to /etc/hosts? do they provide their own dns service?) also not sure where I can see the Dockerfile that is used to create the image.
dgza log (only running 1 instance, removed --peer)
docker service create --name dgza --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgza,target=/dgraph dgraph/dgraph:latest dgraph zero --bindall true --my dgza:7080
dgza.1.03pff4srjfsu@n2.selftls.com | Setting up listener at: 0.0.0.0:7080
dgza.1.03pff4srjfsu@n2.selftls.com | Setting up listener at: 0.0.0.0:8080
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:27 node.go:230: Group 0 found 0 entries
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:27 raft.go:567: INFO: 1 became follower at term 0
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:27 raft.go:315: INFO: newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:27 raft.go:567: INFO: 1 became follower at term 1
dgza.1.03pff4srjfsu@n2.selftls.com | Running Dgraph zero...
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:31 raft.go:749: INFO: 1 is starting a new election at term 1
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:31 raft.go:580: INFO: 1 became candidate at term 2
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:31 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 2
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:31 raft.go:621: INFO: 1 became leader at term 2
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:19:31 node.go:301: INFO: raft.node: 1 elected leader 1 at term 2
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:23:13 zero.go:256: Got connection request: addr:"localhost:7080"
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:23:13 pool.go:104: == CONNECT ==> Setting localhost:7080
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:23:13 zero.go:352: Connected
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:23:17 oracle.go:353: Error while fetching minTs from group 1, err: rpc error: code = Unimplemented desc = unknown service protos.Worker
dgza.1.03pff4srjfsu@n2.selftls.com | 2017/11/18 10:23:27 oracle.go:353: Error while fetching minTs from group 1, err: rpc error: code = Unimplemented desc = unknown service protos.Worker
docker service create --name dgsa --publish 7080:7080 --publish 8080:8080 --publish 9080:9080 --restart-condition on-failure --replicas 1 --network dgraph --mount source=dgsa,target=/dgraph dgraph/dgraph:latest dgraph server --memory_mb 2048 --zero dgza:7080
[root@n1 ~]# docker service logs dgsa
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 gRPC server started. Listening on port 9080
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 HTTP server started. Listening on port 8080
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 groups.go:93: Current Raft Id: 0
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 pool.go:104: == CONNECT ==> Setting dgza:7080
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 worker.go:99: Worker listening at address: [::]:7080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:93: Current Raft Id: 0
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 groups.go:113: Connected to group zero. Connection state: member:<id:1 group_id:1 addr:"localhost:7080" > state:<counter:5 groups:<key:1 value:<members:<key:1 value:<id:1 group_id:1 addr:"localhost:7080" > > > > zeros:<key:1 value:<id:1 addr:"dgza:7080" leader:true > > maxRaftId:1 >
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 draft.go:138: Node ID: 1 with GroupID: 1
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 node.go:230: Group 1 found 0 entries
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 draft.go:680: New Node for group: 1
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:567: INFO: 1 became follower at term 0
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:315: INFO: newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:567: INFO: 1 became follower at term 1
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 groups.go:283: Asking if I can serve tablet for: _predicate_
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:749: INFO: 1 is starting a new election at term 1
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:580: INFO: 1 became candidate at term 2
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 2
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 raft.go:621: INFO: 1 became leader at term 2
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 node.go:301: INFO: raft.node: 1 elected leader 1 at term 2
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:23:13 mutation.go:147: Done schema update predicate:"_predicate_" value_type:STRING list:true
dgsa.1.guwaixejci4f@n2.selftls.com | 2017/11/18 10:28:13 groups.go:283: Asking if I can serve tablet for: _dummy_
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 pool.go:104: == CONNECT ==> Setting dgza:7080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 gRPC server started. Listening on port 9080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 HTTP server started. Listening on port 8080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 worker.go:99: Worker listening at address: [::]:7080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 gRPC server started. Listening on port 9080
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 gRPC server started. Listening on port 9080
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 HTTP server started. Listening on port 8080
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 HTTP server started. Listening on port 8080
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 groups.go:93: Current Raft Id: 0
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 groups.go:93: Current Raft Id: 0
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 pool.go:104: == CONNECT ==> Setting dgza:7080
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 pool.go:104: == CONNECT ==> Setting dgza:7080
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 worker.go:99: Worker listening at address: [::]:7080
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 worker.go:99: Worker listening at address: [::]:7080
dgsa.1.pl7vhglf6hnr@n3.selftls.com | 2017/11/18 10:22:39 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.qw02pwz0kwaj@n3.selftls.com | 2017/11/18 10:23:01 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure
dgsa.1.ryti50mx4710@n1.selftls.com | 2017/11/18 10:22:13 groups.go:108: Error while connecting with group zero: rpc error: code = Unavailable desc = all SubConns are in TransientFailure