Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camunda.client.zeebe.enabled has no effect #792

Closed
wThomas84 opened this issue May 17, 2024 · 2 comments · Fixed by #809
Closed

camunda.client.zeebe.enabled has no effect #792

wThomas84 opened this issue May 17, 2024 · 2 comments · Fixed by #809

Comments

@wThomas84
Copy link

Describe the bug

When I set in spring config the property camunda.client.zeebe.enabled to false a ZeebeClient is instantiated anyway and tries to connect.
It has for us currently the effect that our test suite is not terminating, due to endless retries of ZeebeClient to connect to zeebe engine prevent the process to exit.

To Reproduce
Create Spring app with spring-zeepe auto configured
Create application-test.yaml with entry:
camunda.client.zeebe.enabled: false

Create a @SpringBootTest with noting else and observe the ZeebeClient in the logs to exist and attempting to connect endlessly.

Expected behavior

There is no ZeebeClient as if you would use property zeebe.client.enabled: false

As this property is deprecated and the deprecation message points to camunda.client.zeebe.enabled as replacement, I would expect it to behave similarily

Log/Stacktrace

Full Stacktrace

2024-05-17T18:25:37.640+02:00  INFO 15936 --- [           main] o.s.i.channel.PublishSubscribeChannel    ::  Channel 'person-service.errorChannel' has 1 subscriber(s). 
2024-05-17T18:25:37.640+02:00  INFO 15936 --- [           main] o.s.i.endpoint.EventDrivenConsumer       ::  started bean '_org.springframework.integration.errorLogger' 
2024-05-17T18:25:37.642+02:00  INFO 15936 --- [           main] i.c.z.s.c.jobhandling.JobWorkerManager   ::  . Starting Zeebe worker: ZeebeWorkerValue{type='person_service_xxxxxxx', name='acceptFirmenmeldungPersonJobWorker#handle', timeout=PT-0.001S, maxJobsActive=-1, requestTimeout=PT-1S, pollInterval=PT-0.001S, autoComplete=true, fetchVariables=[], enabled=true, methodInfo=io.camunda.zeebe.spring.client.bean.MethodInfo@49015826, tenantIds=[], forceFetchAllVariables=false, streamEnabled=true, streamTimeout=PT-0.001S} 
2024-05-17T18:25:37.643+02:00  INFO 15936 --- [           main] i.c.z.s.c.jobhandling.JobWorkerManager   ::  . Starting Zeebe worker: ZeebeWorkerValue{type='person_service_send_xxxxxxx', name='sendProcessedJobWorker#handle', timeout=PT-0.001S, maxJobsActive=-1, requestTimeout=PT-1S, pollInterval=PT-0.001S, autoComplete=true, fetchVariables=[], enabled=true, methodInfo=io.camunda.zeebe.spring.client.bean.MethodInfo@1b7a661b, tenantIds=[], forceFetchAllVariables=false, streamEnabled=true, streamTimeout=PT-0.001S} 
2024-05-17T18:25:37.644+02:00  INFO 15936 --- [           main] o.s.a.r.c.CachingConnectionFactory       ::  Attempting to connect to: localhost:5672 
2024-05-17T18:25:37.645+02:00  INFO 15936 --- [           main] o.s.a.r.c.CachingConnectionFactory       ::  Created new connection: connectionFactory#64782860:0/SimpleConnection@2c7affbd [delegate=com.github.fridujo.rabbitmq.mock.MockConnection@5b97b416, localPort=0] 
2024-05-17T18:25:37.647+02:00  WARN 15936 --- [ool-34-thread-1] io.camunda.zeebe.client.job.worker       ::  Failed to stream jobs of type 'person_service_xxxxxx' to worker 'sendProcessedxxxxxxx#handle' 

io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at io.grpc.Status.asRuntimeException(Status.java:533)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
	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:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: getsockopt: localhost/[0:0:0:0:0:0:0:1]:26500
Caused by: java.net.ConnectException: Connection refused: getsockopt
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:973)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:339)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Environment:

  • OS: Win 11
  • Deployment: Local
  • Spring-Zeebe Version: 8.5.3
  • SpringBoot Version: 3.2.5
  • Configuration:
camunda:
  client:
    mode: simple
    zeebe:
      request-timeout: 10s
      enabled: false
    tasklist:
      enabled: false
    operate:
      enabled: false

@gogroup-official
Copy link

I have the same problem

@jonathanlukas
Copy link
Collaborator

@wThomas84 @gogroup-official please review the PR: #809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants