Hi,
I have integrated camunda 8 zeebe client but its not working
Zeebe Configuration:
@Configuration
public class ZeebeConfig {
@Value("${zeebe-client.client-id}")
private String clientId;
@Value("${zeebe-client.client-secret}")
private String clientSecret;
@Value("${zeebe-client.authorization-url}")
private String authorizationUrl;
@Value("${zeebe-client.audience}")
private String audience;
@Value("${zeebe-client.gateway-address}")
private String gatewayAddress;
@Bean
@Primary
public ZeebeClient zeebeClientBean() {
return ZeebeClient.newClientBuilder()
.grpcAddress(URI.create(gatewayAddress))
.credentialsProvider(CredentialsProvider.newCredentialsProviderBuilder()
.authorizationServerUrl(authorizationUrl)
.clientId(clientId)
.clientSecret(clientSecret)
.audience(audience)
.connectTimeout(Duration.ofSeconds(3))
.build())
.usePlaintext()
.build();
}
}
YML Configuration:
zeebe-client:
client-id: zeebe
client-secret: xxxxxx
authorization-url: https://camunda.example.com/auth/realms/camunda-platform/protocol/openid-connect/token
gateway-address: http://zeebe-grpc.camunda.example.com
audience: zeebe
Dependencies:
implementation ('io.camunda.spring:spring-boot-starter-camunda:8.5.13') {
exclude group: 'io.camunda.spring', module: 'java-common'
}
implementation 'io.camunda:camunda-tasklist-client-java:8.5.3.6'
Logs:
2024-10-15T12:26:48.577+05:30 WARN 29964 --- [camunda-8-sample] [ault-executor-1] io.camunda.zeebe.client.job.poller : Failed to activate jobs for worker orderWorker#createOrderWithStatusCreated and job type create-order
io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 19.999541800s. Name resolution delay 0.000000000 seconds. [closed=[], open=[[buffered_nanos=1060500, remote_addr=zeebe-grpc.camunda.example.com]]]
at io.grpc.Status.asRuntimeException(Status.java:533) ~[grpc-api-1.62.2.jar:1.62.2]
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) ~[grpc-stub-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[grpc-core-1.62.2.jar:1.62.2]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
2024-10-15T12:26:48.845+05:30 WARN 29964 --- [camunda-8-sample] [pool-3-thread-1] i.c.z.client.impl.ZeebeCallCredentials : The request's security level does not guarantee that the credentials will be confidential.
2024-10-15T12:26:50.469+05:30 WARN 29964 --- [camunda-8-sample] [ault-executor-3] io.camunda.zeebe.client.job.poller : Failed to activate jobs for worker orderWorker#createOrderWithStatusCreated and job type create-order
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.Status.asRuntimeException(Status.java:533) ~[grpc-api-1.62.2.jar:1.62.2]
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) ~[grpc-stub-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.62.2.jar:1.62.2]
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[grpc-core-1.62.2.jar:1.62.2]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[na:na]
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434) ~[na:na]
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:255) ~[netty-buffer-4.1.112.Final.jar:4.1.112.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:356) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.112.Final.jar:4.1.112.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.112.Final.jar:4.1.112.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.112.Final.jar:4.1.112.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.112.Final.jar:4.1.112.Final]
... 1 common frames omitted