Unknown Zeebe Java Client Exception


#1

All,

Has anyone run across the following client exception with the Zeebe 0.17.0 Java client? I’m debugging under IntelliJ Ultimate 2019.1 and the following exception is being thrown when executing the following line. I have no idea what’s causing this problem. I’m connecting fine without any exceptions. The Zeebe broker is run in a Docker container using the standard Docker run command.

docker run -d -p 32771-32775:26500-26504/tcp camunda/zeebe:latest

/*
/usr/local/zeebe/bin# zbctl status
Cluster size: 1
Partitions count: 1
Replication factor: 1
Brokers:
Broker 0 - 172.17.0.2:26501
Partition 0 : Leader
*/

Source Code (Point of Failure):
final ZeebeClient client = ZeebeClient.newClientBuilder()
// change the contact point if needed
.brokerContactPoint(“0.0.0.0:32772”)
.build();

System.out.println(“Connected.”);

final DeploymentEvent deployment=client.newDeployCommand()
.addResourceFromClasspath(“demoProcess.bpmn”)
.send()
.join(); <- throws exception here

Debug Output:

Connected.
Exception in thread “main” io.zeebe.client.cmd.ClientStatusException: io exception
at io.zeebe.client.impl.ZeebeClientFutureImpl.transformExecutionException(ZeebeClientFutureImpl.java:93)
at io.zeebe.client.impl.ZeebeClientFutureImpl.join(ZeebeClientFutureImpl.java:50)
at com.abc.zeebe.client.WorkflowDeployer.main(WorkflowDeployer.java:39)
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at io.zeebe.client.impl.ZeebeClientFutureImpl.join(ZeebeClientFutureImpl.java:48)
… 1 more
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception

POM FIle

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>com.abc.zeebe.client</groupId>
<artifactId>com.abc.zeebe.client</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
    <!-- https://mvnrepository.com/artifact/io.zeebe/zeebe-client-java -->
    <dependency>
        <groupId>io.zeebe</groupId>
        <artifactId>zeebe-client-java</artifactId>
        <version>0.17.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
    <!-- had to add this manually to handle StaticLoggerBinder issue-->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.25</version>
    </dependency>
</dependencies>
</project>

#2

Hi,

some context, the Zeebe client communicates through a gRPC gateway with the broker cluster. Per default every broker starts with an embedded gateway which is accessible on port 26500. The port 26501 you see in the zbctl status output is the internal broker port the gateway uses to communicate with the cluster.

Based on your docker port mappings your client has to connect to port 32771 instead of 32772 in your example. Can you check if this solves your problem. Thanks

Cheers,
Sebastian


#3

Sebastian,

Thanks for taking a look. Yes, that was a typo for the port. I was swapping the port number back and forth to see if it made any difference.

I think I resolved my issue though. I was referencing all IP4 addresses rather than the Docker Toolbox Host (OSX special host) ip address which is 192.168.99.100. I’m not sure why that specific exception was thrown when connecting to an incorrect IP. Is there any other way to test connectivity to the broker using the Java Client?

Thanks again.

Paul