Exeption with java client

I started broker docker run --name zeebe -p 51015:51015 camunda/zeebe:0.10.0

  • configFile=/usr/local/zeebe/conf/zeebe.cfg.toml
  • INITIAL_CONTACT_POINT=
    ++ hostname -i
  • ZEEBE_HOST=172.17.0.2
  • BOOTSTAP=1
  • [[ false == \t\r\u\e ]]
  • sed -i ‘s/bootstrap =.*/bootstrap = 1/g’ /usr/local/zeebe/conf/zeebe.cfg.toml
  • sed -i ‘s/.host =./host = “172.17.0.2”/g’ /usr/local/zeebe/conf/zeebe.cfg.toml
  • ‘[’ -n ‘’ ‘]’
  • exec /usr/local/zeebe/bin/broker
    10:31:40.585 [main] INFO io.zeebe.broker.system - Using configuration file /usr/local/zeebe/conf/zeebe.cfg.toml
    10:31:40.746 [main] INFO io.zeebe.broker.system - Scheduler configuration: Threads{cpu-bound: 2, io-bound: 2}.
    10:31:40.827 [main] INFO io.zeebe.broker.system - Version: 0.10.0
    10:31:40.907 [main] INFO io.zeebe.broker.clustering - Starting standalone broker.
    10:31:40.923 [service-controller] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.transport - Bound managementApi.server to /172.17.0.2:51016
    10:31:40.965 [service-controller] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.transport - Bound clientApi.server to /172.17.0.2:51015
    10:31:40.966 [service-controller] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.transport - Bound replicationApi.server to /172.17.0.2:51017
    10:31:40.995 [io.zeebe.broker.clustering.base.bootstrap.BootstrapSystemTopic] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Boostrapping internal system topic ‘internal-system’ with replication factor 1.
    10:31:41.361 [service-controller] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.raft - Created raft internal-system-0 with configuration RaftConfiguration{heartbeatInterval=‘250ms’, electionInterval=‘1s’, leaveTimeout=‘1s’}
    10:31:41.366 [io.zeebe.broker.clustering.base.bootstrap.BootstrapSystemTopic] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.broker.clustering - Bootstrapping default topics [TopicCfg{name=‘default-topic’, partitions=1, replicationFactor=1}]
    10:31:41.424 [internal-system-0] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.raft - Joined raft in term 0
    10:31:41.535 [topics] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Updating topic {“topicName”:“internal-system”,“partitionCount”:1,“replicationFactor”:1,“key”:4294967400,“partitionIds”:[0]}
    10:31:41.537 [topics] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Creating topic {“name”:“default-topic”,“partitions”:1,“replicationFactor”:1,“partitionIds”:}
    10:31:41.540 [topics] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Adding topic {“topicName”:“default-topic”,“partitionCount”:1,“replicationFactor”:1,“key”:4294967576,“partitionIds”:}
    10:31:42.578 [management-api] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Received create partition request for topic=default-topic, partitionId=1 and replicationFactor=1
    10:31:42.582 [service-controller] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.raft - Created raft default-topic-1 with configuration RaftConfiguration{heartbeatInterval=‘250ms’, electionInterval=‘1s’, leaveTimeout=‘1s’}
    10:31:42.586 [default-topic-1] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.raft - Joined raft in term 0
    10:31:42.590 [create-topic] [172.17.0.2:51015-zb-actors-1] INFO io.zeebe.broker.clustering - Partition 1 for topic default-topic created on node 172.17.0.2:51016
    10:31:42.593 [topics] [172.17.0.2:51015-zb-actors-0] INFO io.zeebe.broker.clustering - Updating topic {“topicName”:“default-topic”,“partitionCount”:1,“replicationFactor”:1,“key”:4294967576,“partitionIds”:[1]}

When I`m trying run my JavaClient
version broker and client are the same

public static void main(String args)
{
final Properties clientProperties = new Properties();
// change the contact point if needed
clientProperties.put(ClientProperties.BROKER_CONTACTPOINT, “localhost:51015”);

  final ZeebeClient client = ZeebeClient.newClientBuilder()
      .withProperties(clientProperties)
      .build();
  System.out.println("Connected.");
  final DeploymentEvent deployment = client.topicClient().workflowClient()
      .newDeployCommand()
      .addResourceFromClasspath("test.bpmn")
      .send()
      .join();
  final int version = deployment.getDeployedWorkflows().get(0).getVersion();
  System.out.println("Workflow deployed. Version: " + version);
  client.close();
  System.out.println("Closed.");
}

I have Exception

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See SLF4J Error Codes for further details.
SLF4J: Failed to load class “org.slf4j.impl.StaticMDCBinder”.
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See SLF4J Error Codes for further details.
Connected.
Exception in thread “main” io.zeebe.client.cmd.ClientException: Request timed out (PT15S). Request was: [ topic = internal-system, partition = 0, value type = DEPLOYMENT, command = CREATE ]
at io.zeebe.client.cmd.ClientException.newInCurrentContext(ClientException.java:45)
at io.zeebe.client.impl.RequestManager$ResponseFuture.join(RequestManager.java:482)
at deployment.Application.main(Application.java:27)
Caused by: io.zeebe.client.cmd.ClientException: Request timed out (PT15S). Request was: [ topic = internal-system, partition = 0, value type = DEPLOYMENT, command = CREATE ]
at io.zeebe.client.impl.RequestManager$ResponseFuture.failWith(RequestManager.java:419)
at io.zeebe.client.impl.RequestManager$ResponseFuture.ensureResponseAvailable(RequestManager.java:333)
at io.zeebe.client.impl.RequestManager$ResponseFuture.get(RequestManager.java:438)
at io.zeebe.client.impl.RequestManager$ResponseFuture.get(RequestManager.java:427)
at io.zeebe.client.impl.RequestManager$ResponseFuture.join(RequestManager.java:473)
… 1 more
Caused by: java.util.concurrent.ExecutionException: Request timed out after PT15S
at io.zeebe.util.sched.future.CompletableActorFuture.get(CompletableActorFuture.java:181)
at io.zeebe.client.impl.RequestManager$ResponseFuture.ensureResponseAvailable(RequestManager.java:308)
… 4 more
Caused by: io.zeebe.transport.RequestTimeoutException: Request timed out after PT15S
at io.zeebe.transport.impl.sender.OutgoingRequest.timeout(OutgoingRequest.java:177)
at io.zeebe.transport.impl.sender.Sender.onTimerExpiry(Sender.java:552)
at org.agrona.DeadlineTimerWheel.poll(DeadlineTimerWheel.java:266)
at io.zeebe.transport.impl.sender.Sender.processTimeouts(Sender.java:105)
at io.zeebe.util.sched.ActorJob.invoke(ActorJob.java:116)
at io.zeebe.util.sched.ActorJob.execute(ActorJob.java:60)
at io.zeebe.util.sched.ActorTask.execute(ActorTask.java:193)
at io.zeebe.util.sched.ActorThread.executeCurrentTask(ActorThread.java:173)
at io.zeebe.util.sched.ActorThread.doWork(ActorThread.java:148)
at io.zeebe.util.sched.ActorThread.run(ActorThread.java:119)

What I’m doing wrong?

Hi,

what operating system do you use? If it is not Linux there is probably a VM involved in your docker setup, which would prevent the client to contact the broker under the IP 172.17.0.2 of the container. You could start the docker container with the environment variable ZEEBE_HOST=0.0.0.0 which will change the IP advertised from the broker to the client to 0.0.0.0 which should be reachable even with a VM in between. Does this help you?

Cheers,
Sebastian

I get the same error when running the broker on windows.

My client says the job worker is open:

ZeebeClientBuilder zeebeClientBuilder = ZeebeClient.newClientBuilder().brokerContactPoint("0.0.0.0:26500");
		try(ZeebeClient zeebeClient = zeebeClientBuilder.build()) {
			JobClient jobClient = zeebeClient.jobClient();
			JobWorker jobWorker = jobClient.newWorker().jobType("inventory-service")
					.handler(new ExampleJobHandler()).timeout(Duration.ofSeconds(10)).open();
			Logger.debug("worker open {}", jobWorker.isOpen()); // --> [debug] application - worker open true
			//...

However, the broker reports a timeout:

[io.zeebe.gateway.impl.broker.BrokerRequestManager] [gateway-zb-actors-0] WARN  io.zeebe.gateway - Failed to activate jobs for type inventory-service from partition 0
io.zeebe.transport.RequestTimeoutException: Request timed out after PT15S
        at io.zeebe.transport.impl.sender.OutgoingRequest.timeout(OutgoingRequest.java:151) ~[zb-transport-0.14.0.jar:0.14.0]
        at io.zeebe.transport.impl.sender.Sender.onTimerExpiry(Sender.java:483) ~[zb-transport-0.14.0.jar:0.14.0]
        at org.agrona.DeadlineTimerWheel.poll(DeadlineTimerWheel.java:284) ~[agrona-0.9.27.jar:0.9.27]
        at io.zeebe.transport.impl.sender.Sender.processTimeouts(Sender.java:114) ~[zb-transport-0.14.0.jar:0.14.0]

I can’t see the worker in the zeebe monitor neither. I tried updating the host from 0.0.0.0 to 127.0.0.1 in both the network.host setting of the broker and in my client but it results in the same error.

Hey @f_a ,

how is your setup?
Do you run the broker in docker? Please post the corresponding broker configuration.
Did you set the ZEEBE_HOST environment variable?
What is returned when you request the topology?

Greets
Chris

Hi Chris,

no docker, just running broker.bat from the distribution. I didn’t touch the configuration in the first place, it looks like this: https://github.com/zeebe-io/zeebe/blob/develop/dist/src/main/config/zeebe.cfg.toml Didn’t set any environment variables neither.

Running TopologyViewer returns this:

Requesting topology with initial contact point 0.0.0.0:26500
Topology:
    0.0.0.0:26501
      0 - LEADER
Done.

The only thing I tried was to update the network.host setting as follows:

[network]

# ...
host = "127.0.0.1"

Which results in this:

Requesting topology with initial contact point 127.0.0.1:26500
Topology:
    127.0.0.1:26501
      0 - LEADER
Done.

Thanks

Hey @f_a,

thanks for your response.

Currently I’m not able to reproduce this issue.

Can you please describe your setup and steps to reproduce this. (Do you simply run the examples?)
Might also be helpful how the code looks like you are running or do you use the zbctl?

Greets
Chris