DEADLINE_EXCEEDED: deadline exceeded after 9.805062382s

Failed to start bean ‘zeebeClientLifecycle’; nested exception is io.camunda.zeebe.client.api.command.ClientStatusException: deadline exceeded after 9.805062382s. [closed=[], open=[[buffered_nanos=9812867683, waiting_for_connection]]]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)
at tv.cadent.workflow.WorkflowServiceApplication.main(WorkflowServiceApplication.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: io.camunda.zeebe.client.api.command.ClientStatusException: deadline exceeded after 9.805062382s. [closed=[], open=[[buffered_nanos=9812867683, waiting_for_connection]]]
at io.camunda.zeebe.client.impl.ZeebeClientFutureImpl.transformExecutionException(ZeebeClientFutureImpl.java:93)
at io.camunda.zeebe.client.impl.ZeebeClientFutureImpl.join(ZeebeClientFutureImpl.java:50)
at io.camunda.zeebe.spring.client.config.processor.DeploymentPostProcessor.lambda$apply$6(DeploymentPostProcessor.java:73)
at io.camunda.zeebe.spring.client.ZeebeClientLifecycle.lambda$start$0(ZeebeClientLifecycle.java:45)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at io.camunda.zeebe.spring.client.ZeebeClientLifecycle.start(ZeebeClientLifecycle.java:45)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
… 19 common frames omitted
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 9.805062382s. [closed=[], open=[[buffered_nanos=9812867683, waiting_for_connection]]]
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:48)
… 24 common frames omitted
Caused by: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 9.805062382s. [closed=[], open=[[buffered_nanos=9812867683, waiting_for_connection]]]
at io.grpc.Status.asRuntimeException(Status.java:535)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:478)
at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)
at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)
at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722)
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)

Zeebe Client code

@ZeebeWorker(type = "task3-service-worker")
	public void task3Service(final ActivatedJob job, final JobClient client) throws Exception {
		log.info("Task3 Service is running " + job.getKey());
		TimeUnit.SECONDS.sleep(10);// As a long run service
		
		try {
			DelegatedServiceResponseModel response = webClient.get()
				      .uri("/example/task3/delegatedService/start")
				      .retrieve()
				      .bodyToMono(DelegatedServiceResponseModel.class).block();
			if(response.getStatus().equals(Constants.SUCCESS)) {
				client.newCompleteCommand(job).send();
				log.info("Task3 Service is completed");
			}
			else {
				client.newFailCommand(job).retries(0).send();//.exceptionally(throwable ->  new RuntimeException("Could not run the worker",throwable));
				log.info("Task3 Service is failed");
			}
		} catch (Exception e) {
			System.out.println(e.getMessage());
			client.newFailCommand(job).retries(0).send();//.exceptionally(throwable ->  new RuntimeException("Could not run the worker",throwable));
			log.info("Task3 Service is failed");
		}
	}```

What's the issue?

Hi @Prashik_Hingaspure

This is the code that is failing? It is not a call to createWorkflowInstanceWithResult somewhere else in the code?

If it is this code, then it looks like the connection parameters for the broker are not correct.

Josh