apache / incubator-kie-kogito-examples

Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
256 stars 383 forks source link

The Job Application Events Example application doesn't respond #1955

Open LuboTerifaj opened 5 months ago

LuboTerifaj commented 5 months ago

Description

Unable to run Job Application Events Example properly.

When you run your application, fill the Applicant data and submit it, nothing happens in the UI.

Part of the Console log:

2024-06-11 20:54:42,629 WARN  [org.apa.kaf.cli.NetworkClient] (kafka-producer-network-thread | kafka-producer-out-applicants) [Producer clientId=kafka-producer-out-applicants] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
2024-06-11 20:54:42,630 WARN  [org.apa.kaf.cli.NetworkClient] (kafka-producer-network-thread | kafka-producer-out-applicants) [Producer clientId=kafka-producer-out-applicants] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected
2024-06-11 20:54:47,011 ERROR [io.sma.rea.mes.kafka] (smallrye-kafka-producer-thread-0) SRMSG18206: Unable to write to Kafka from channel out-applicants (topic: applicants): org.apache.kafka.common.errors.TimeoutException: Topic applicants not present in metadata after 60000 ms.

2024-06-11 20:54:47,012 ERROR [io.sma.rea.mes.kafka] (smallrye-kafka-producer-thread-0) SRMSG18212: Message org.eclipse.microprofile.reactive.messaging.Message$5@5590a011 from channel 'out-applicants' was not sent to Kafka topic 'applicants' - nacking message: java.lang.IllegalStateException: Retries exhausted : 0 attempts against 1718132088087/1718131985757 expiration
        at io.smallrye.mutiny.helpers.ExponentialBackoff.lambda$randomExponentialBackoffFunctionExpireAt$2(ExponentialBackoff.java:112)
        at io.smallrye.context.impl.wrappers.SlowContextualFunction.apply(SlowContextualFunction.java:21)
        at io.smallrye.mutiny.groups.MultiOnItem.lambda$transformToUni$6(MultiOnItem.java:268)
        at io.smallrye.mutiny.operators.multi.MultiConcatMapOp$MainSubscriber.onItem(MultiConcatMapOp.java:117)
        at io.smallrye.mutiny.subscription.MultiSubscriber.onNext(MultiSubscriber.java:61)
        at io.smallrye.mutiny.operators.multi.processors.UnicastProcessor.drainWithDownstream(UnicastProcessor.java:107)
        at io.smallrye.mutiny.operators.multi.processors.UnicastProcessor.drain(UnicastProcessor.java:138)
        at io.smallrye.mutiny.operators.multi.processors.UnicastProcessor.onNext(UnicastProcessor.java:204)
        at io.smallrye.mutiny.operators.multi.processors.SerializedProcessor.onNext(SerializedProcessor.java:104)
        at io.smallrye.mutiny.subscription.SerializedSubscriber.onItem(SerializedSubscriber.java:74)
        at io.smallrye.mutiny.subscription.MultiSubscriber.onNext(MultiSubscriber.java:61)
        at io.smallrye.mutiny.operators.multi.MultiRetryWhenOp$RetryWhenOperator.onFailure(MultiRetryWhenOp.java:127)
        at io.smallrye.mutiny.subscription.MultiSubscriber.onError(MultiSubscriber.java:73)
        at io.smallrye.mutiny.converters.uni.UniToMultiPublisher$UniToMultiSubscription.onFailure(UniToMultiPublisher.java:104)
        at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onFailure(UniOperatorProcessor.java:55)
        at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onFailure(UniOperatorProcessor.java:55)
        at io.smallrye.mutiny.operators.uni.builders.DefaultUniEmitter.fail(DefaultUniEmitter.java:53)
        at io.smallrye.reactive.messaging.kafka.impl.ReactiveKafkaProducer.lambda$send$3(ReactiveKafkaProducer.java:172)
        at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:1062)
        at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:947)
        at io.smallrye.reactive.messaging.kafka.impl.ReactiveKafkaProducer.lambda$send$4(ReactiveKafkaProducer.java:164)
        at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
        at io.smallrye.mutiny.operators.uni.builders.UniCreateWithEmitter.subscribe(UniCreateWithEmitter.java:22)
        at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
        at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.performInnerSubscription(UniOnItemTransformToUni.java:81)
        at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:57)
        at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onItem(UniOperatorProcessor.java:47)
        at io.smallrye.mutiny.operators.uni.UniMemoizeOp.forwardTo(UniMemoizeOp.java:123)
        at io.smallrye.mutiny.operators.uni.UniMemoizeOp.subscribe(UniMemoizeOp.java:67)
        at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
        at io.smallrye.mutiny.operators.uni.UniRunSubscribeOn.lambda$subscribe$0(UniRunSubscribeOn.java:27)
        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:840)
Caused by: org.apache.kafka.common.errors.TimeoutException: Topic applicants not present in metadata after 60000 ms.

Acceptance criteria

The example works as expected, without any issues.

Implementation ideas

No response

danielamorais commented 5 months ago

Job Application Events Example it is working as expected.

Apache Kafka did not start correctly as mentioned in the first line

Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.

LuboTerifaj commented 5 months ago

Hello @danielamorais , Apache Kafka is part of the example. Since it did not start correctly, the example does not work as expected.