Hi everyone,
I found a key point you neet to pay attention when clustering, you must need to configure zeebe.broker.cluster.nodeId
when using clustering
you must set the nodeId start at 0 and ent to clusterSize -1, remeber start 0!
Broker configuration | Camunda 8 Docs
If you start at 1 and ent to clusterSize you will get the error below! At that moment I see the borker doesn’t create raftpartition.
Exception in thread "main" io.camunda.zeebe.client.api.command.ClientStatusException: Expected to execute command on partition 1, but either it does not exist, or the gateway is not yet aware of it
at io.camunda.zeebe.client.impl.ZeebeClientFutureImpl.transformExecutionException(ZeebeClientFutureImpl.java:116)
at io.camunda.zeebe.client.impl.ZeebeClientFutureImpl.join(ZeebeClientFutureImpl.java:54)
at org.example.ZeebeBenchMarkTestGp9.deploy(ZeebeBenchMarkTestGp9.java:53)
at org.example.ZeebeBenchMarkTestGp9.main(ZeebeBenchMarkTestGp9.java:30)
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAVAILABLE: Expected to execute command on partition 1, but either it does not exist, or the gateway is not yet aware of it
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
at io.camunda.zeebe.client.impl.ZeebeClientFutureImpl.join(ZeebeClientFutureImpl.java:52)
... 2 more
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Expected to execute command on partition 1, but either it does not exist, or the gateway is not yet aware of it
at io.grpc.Status.asRuntimeException(Status.java:537)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489)
at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453)
at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Although the documentation makes it clear, I hope to help someone by publishing the stacktrace.