These are chat archives for atomix/atomix

16th
Dec 2018
Lukasz Antoniak
@lukasz-antoniak
Dec 16 2018 17:03

Hi Team! I am trying to replace ZooKeeper with Atomix. We use ZooKeeper as strongly consistent store to persist cluster state and notify nodes when peers are joining or leaving the cluster. Strong consistency implies usage of Raft. For development and unit-testing purpose, I have tried to setup single node Raft cluster. Unfortunately, atomix.start().join() never completes.

cluster {
  clusterId: "atomix"
  node {
    id: member1
    address: "localhost:5001"
  }
  multicast {
    enabled: true
  }
  discovery {
    type: multicast
  }
}

managementGroup {
  type: raft
  partitions: 1
  members: [member1]
  storage {
    directory: "/tmp/atomix/mgmt"
    # memory or disk
    level: memory
  }
}

partitionGroups.raft {
  type: raft
  partitions: 1
  members: [member1]
  storage {
    directory: "/tmp/atomix/pg"
    # memory or disk
    level: memory
  }
}

Any hints?

Lukasz Antoniak
@lukasz-antoniak
Dec 16 2018 17:18

Actually one time it was hanging, and now I receive message about port binding. I have verified with lsof that nothing listens on 5001. After changing the port to any random value, issue still persists.

[2018-12-16 09:04:21,204] INFO RaftServer{raft-partition-1}{role=CANDIDATE} - Starting election (io.atomix.protocols.raft.roles.CandidateRole:165)
[2018-12-16 09:04:21,205] INFO RaftServer{raft-partition-1} - Transitioning to LEADER (io.atomix.protocols.raft.impl.RaftContext:170)
[2018-12-16 09:04:21,206] INFO RaftServer{raft-partition-1} - Found leader member1 (io.atomix.protocols.raft.impl.RaftContext:170)
[2018-12-16 09:04:21,209] INFO Started (io.atomix.protocols.raft.partition.RaftPartitionGroup:210)
[2018-12-16 09:04:21,209] INFO Started (io.atomix.primitive.partition.impl.DefaultPartitionService:196)
[2018-12-16 09:04:21,559] INFO Started (io.atomix.core.impl.CoreTransactionService:384)
[2018-12-16 09:04:21,559] INFO Started (io.atomix.core.impl.CorePrimitivesService:360)
[2018-12-16 09:04:22,512] INFO 3.0.8 (revision 5b38cc built on 2018-11-13 15:47:34)
(io.atomix.core.Atomix:824)
[2018-12-16 09:04:22,521] WARN Failed to bind TCP server to port 0.0.0.0:5001 due to {} (io.atomix.cluster.messaging.impl.NettyMessagingService:558)
java.net.BindException: Address already in use

I have tried versions 3.0.6, 3.0.8 and 3.1.0-beta2.

Lukasz Antoniak
@lukasz-antoniak
Dec 16 2018 18:04
Argh, many apologies. I have hooked up Atomix in place where I create ZK client and it turned out to be twice in unit-tests. All works fine!