These are chat archives for atomix/atomix

12th
Aug 2018
Mark de Jong
@Fristi
Aug 12 2018 14:07
Anyone seen this error while using Atomix with java boostrapping code inside a docker container (based on openjdk:8 docker image):
app_1_1  | 14:06:43.048 [scala-execution-context-global-18] DEBUG i.n.u.internal.NativeLibraryLoader - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
app_1_1  | java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
I added this dependency: "io.netty" % "netty-transport-native-epoll" % "4.1.28.Final" classifier "linux-x86_64"
Johno Crawford
@johnou
Aug 12 2018 16:25
@Fristi it's not an error, just means it will use nio
Mark de Jong
@Fristi
Aug 12 2018 16:34
I saw
Thanks :-)
pp_3_1  | 16:31:25.611 [raft-client-system-partition-1-2] DEBUG i.a.p.s.impl.RecoveringSessionClient - SessionClient{system-partition-1} - Opening proxy session
app_3_1  | 16:31:25.611 [raft-client-system-partition-1-2] DEBUG i.a.p.r.s.impl.RaftSessionManager - RaftClient{system-partition-1} - Opening session; name: atomix-primary-elector, type: PrimaryElectorType{name=PRIMARY_ELECTOR}
app_3_1  | 16:31:25.613 [raft-client-system-partition-1-2] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=7c7ccf44-27bd-4059-be83-d151a924e0cb, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_3_1  | java.net.ConnectException: null
app_3_1  | 16:31:25.613 [raft-client-system-partition-1-2] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=7c7ccf44-27bd-4059-be83-d151a924e0cb, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_3_1  | java.net.ConnectException: null
app_3_1  | 16:31:25.614 [raft-client-system-partition-1-2] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - Failed to connect to the cluster
app_1_1  | 16:31:25.755 [raft-client-system-partition-1-4] DEBUG i.a.p.s.impl.RecoveringSessionClient - SessionClient{system-partition-1} - Opening proxy session
app_1_1  | 16:31:25.755 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionManager - RaftClient{system-partition-1} - Opening session; name: atomix-primary-elector, type: PrimaryElectorType{name=PRIMARY_ELECTOR}
app_1_1  | 16:31:25.757 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=47ce49f6-8e33-4c96-a19d-d422532964ba, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_1_1  | java.net.ConnectException: null
app_1_1  | 16:31:25.758 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=47ce49f6-8e33-4c96-a19d-d422532964ba, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_1_1  | java.net.ConnectException: null
app_1_1  | 16:31:25.758 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - Failed to connect to the cluster
app_2_1  | 16:31:26.358 [raft-client-system-partition-1-4] DEBUG i.a.p.s.impl.RecoveringSessionClient - SessionClient{system-partition-1} - Opening proxy session
app_2_1  | 16:31:26.358 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionManager - RaftClient{system-partition-1} - Opening session; name: atomix-primary-elector, type: PrimaryElectorType{name=PRIMARY_ELECTOR}
app_2_1  | 16:31:26.361 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=26c36014-eccf-445f-b313-39768e6724fc, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_2_1  | java.net.ConnectException: null
app_2_1  | 16:31:26.362 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - OpenSessionRequest{node=26c36014-eccf-445f-b313-39768e6724fc, serviceName=atomix-primary-elector, serviceType=PRIMARY_ELECTOR, readConsistency=SEQUENTIAL, minTimeout=250, maxTimeout=30000} failed! Reason: {}
app_2_1  | java.net.ConnectException: null
app_2_1  | 16:31:26.362 [raft-client-system-partition-1-4] DEBUG i.a.p.r.s.impl.RaftSessionConnection - RaftClient{system-partition-1} - Failed to connect to the cluster
It seems to be stuck now in this state
Printed forever

Bootstrap code

  val atomix: Atomix = Atomix
    .builder()
    .withAddress(System.getenv("SELF_HOST"))
    .withMembershipProvider(BootstrapDiscoveryProvider.builder()
      .withNodes(
        Node.builder()
          .withId("member1")
          .withAddress(System.getenv("SEED_1_HOST"))
          .build(),
        Node.builder()
          .withId("member2")
          .withAddress(System.getenv("SEED_2_HOST"))
          .build()
      )
      .build())
    .withProfiles(Profile.consensus("member1", "member2"))
    .withManagementGroup(RaftPartitionGroup.builder("system")
      .withNumPartitions(1)
      .withMembers("member1", "member2")
      .build())
    .withPartitionGroups(
      PrimaryBackupPartitionGroup.builder("data")
        .withNumPartitions(32)
        .build())
    .build()

Docker compose:

version: '3.1'

services:
  app_1:
    image: fristi/reactor:0.14
    environment:
      SELF_HOST: app_1:5000
      SEED_1_HOST: app_2:5000
      SEED_2_HOST: app_3:5000

  app_2:
    image:  fristi/reactor:0.14
    environment:
      SELF_HOST: app_2:5000
      SEED_1_HOST: app_1:5000
      SEED_2_HOST: app_3:5000

  app_3:
    image: fristi/reactor:0.14
    environment:
      SELF_HOST: app_3:5000
      SEED_1_HOST: app_1:5000
      SEED_2_HOST: app_2:5000
Do I need the PrimaryBackupPartitionGroup anyway?
Jordan Halterman
@kuujo
Aug 12 2018 21:27
You only need it if you plan to store primitives in it. The partition group is a set of partitions that implement a specific protocol. Primitives can be configured to use that any group/protocol. So you only need a specific partition group if you intend to use it.