These are chat archives for atomix/atomix

5th
Sep 2018
william.z
@zwillim
Sep 05 2018 01:31

I meet a strange Exception today when starting a cluster. It happens here:

           try {
                starting.join();
            } catch (Exception e) {
                System.out.println("error found!");
                e.printStackTrace();
            }

And the log is like this:

error found!
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: No cluster specified
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:961)
    at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
    at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
    at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
    at io.atomix.utils.concurrent.OrderedFuture.lambda$wrap$0(OrderedFuture.java:50)
    at io.atomix.utils.concurrent.OrderedFuture.complete(OrderedFuture.java:139)
    ...
    at io.atomix.utils.concurrent.Futures.lambda$null$3(Futures.java:157)
    at io.atomix.utils.concurrent.ThreadPoolContext.lambda$new$0(ThreadPoolContext.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    ...
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: No cluster specified
    at io.atomix.protocols.raft.impl.DefaultRaftClient.connect(DefaultRaftClient.java:109)
    at io.atomix.protocols.raft.partition.impl.RaftPartitionClient.start(RaftPartitionClient.java:79)
    at io.atomix.protocols.raft.partition.RaftPartition.open(RaftPartition.java:120)
    at io.atomix.protocols.raft.partition.RaftPartitionGroup.lambda$join$1(RaftPartitionGroup.java:188)
    ...
    at io.atomix.protocols.raft.partition.RaftPartitionGroup.join(RaftPartitionGroup.java:190)
    at io.atomix.primitive.partition.impl.DefaultPartitionService.lambda$null$6(DefaultPartitionService.java:189)
    ...
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at io.atomix.primitive.partition.impl.DefaultPartitionService.lambda$start$8(DefaultPartitionService.java:194)
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
    ... 42 more
I have no idea where is the mistake.
My code is like this:
        String server = "server" + port;
        List<String> servers = ports.stream().map(p -> "server" + p).collect(Collectors.toList());

        AtomixBuilder builder = Atomix.builder();
        builder.withMemberId(server).withAddress("127.0.0.1", port)
                .withMulticastEnabled()
                .withManagementGroup(RaftPartitionGroup.builder("system")
                        .withNumPartitions(1).withMembers(servers)
                        .withDataDirectory(new File("mngdir", server))
                        .withStorageLevel(StorageLevel.MEMORY).build())
                .addPartitionGroup(RaftPartitionGroup.builder("data")
                        .withNumPartitions(1)
                        .withDataDirectory(new File("datadir", server))
                        .withStorageLevel(StorageLevel.MEMORY).build());
        Atomix atomix = builder.build();

        CommunicationProxy proxy = new CommunicationProxy(server);
        CommunicationHandler handler = new CommunicationHandler(server);
        ExecutorService executor = Executors.newCachedThreadPool();
        atomix.getCommunicationService().subscribe("proxy", proxy, executor);
        atomix.getCommunicationService().subscribe("handle", handler, executor);

        atomix.getMembershipService().addListener(event -> System.out.println(event.toString()));

        System.out.println("trying to start " + server + " on port " + port + ".");
        CompletableFuture<Void> starting = atomix.start();
oastashev
@oastashev
Sep 05 2018 02:04
Hi there! I am evaluating Atomix features at the moment and have a question. According to security policies in our company all traffic between services should be encrypted. So the question is does Atomix support traffic encryption in using protocols (Raft, Primary-backup, Gossip) ?
william.z
@zwillim
Sep 05 2018 02:31
This may help. atomix/atomix#794 @oastashev
oastashev
@oastashev
Sep 05 2018 02:43
yep, i saw issue... but i'm not sure... does that changes applicable for all protocols ?
Luca Burgazzoli
@lburgazzoli
Sep 05 2018 05:34

has anyone got some time to look at this ?

am I doing something wrong ?

oastashev
@oastashev
Sep 05 2018 07:29

This may help. atomix/atomix#794 @oastashev

i got it. netty is responsible for all communication. thank you a lot. )

Luca Burgazzoli
@lburgazzoli
Sep 05 2018 14:36
hy everyone, I'm having an issue with spring-boot and a custom discovery provider
when running is does fail with com.github.lburgazzoli.atomix.boot.node.autoconfigure.AtomixNodeDiscoveryProviderType cannot be cast to io.atomix.utils.NamedType
but not in all the cases, only sometimes
it fails inside ClasspathScanningAtomixRegistry
is there any way to disable classpath scanning ?