You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi @rayokota
I have started using 4.0.3 which has the parameter to provide jaas config.
However there is a issue in that if I use a topic that is already created :
props.setProperty(KafkaCacheConfig.KAFKACACHE_TOPIC_CONFIG, "<Existing_topic>");
We get below error :
io.kcache.exceptions.CacheInitializationException: Failed trying to create or validate topic <Existing_topic>
......
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TopicAuthorizationException: Authorization failed.
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
at io.kcache.KafkaCache.createTopic(KafkaCache.java:396)
at io.kcache.KafkaCache.createOrVerifyTopic(KafkaCache.java:350)
Note :
The calling method's class, io.kcache.KafkaCache, was loaded from the following location:
jar:file:/Users/breddy3/.m2/repository/io/kcache/kcache/4.0.3/kcache-4.0.3.jar!/io/kcache/KafkaCache.class
The called method's class, org.apache.kafka.clients.admin.DescribeTopicsResult, is available from the following locations:
jar:file:/Users/breddy3/.m2/repository/org/apache/kafka/kafka-clients/3.0.1/kafka-clients-3.0.1.jar!/org/apache/kafka/clients/admin/DescribeTopicsResult.class
The called method's class hierarchy was loaded from the following locations:
org.apache.kafka.clients.admin.DescribeTopicsResult: file:/Users/breddy3/.m2/repository/org/apache/kafka/kafka-clients/3.0.1/kafka-clients-3.0.1.jar
If we use a topic that is non Existing :
props.setProperty(KafkaCacheConfig.KAFKACACHE_TOPIC_CONFIG, "");
io.kcache.exceptions.CacheInitializationException: Failed trying to create or validate topic
at io.kcache.KafkaCache.createOrVerifyTopic(KafkaCache.java:360)
at io.kcache.KafkaCache.init(KafkaCache.java:276)
The text was updated successfully, but these errors were encountered:
@bharathr9889 I'm not sure if this is helpful to you, but if you know your topic will already exist you can skip topic creation and validation with the config KafkaCacheConfig.KAFKACACHE_TOPIC_SKIP_VALIDATION_CONFIG
Hi @bharathr9889,
the internal topic does not exist so it starts an admin client to create that topic. It looks like you don't have permissions to create that topic - possibly a missing ACL / RBAC rolebinding. Either you need to give permissions to create that topic to the user running KCache or create it manually. @HunterSherms - this will at least skip the topic creation issue but as a consequence, it will run into a retryable exception indicating that the topic does not exists. If auto-creation is activated on broker-side it will create the topic and work, if it is not activated, the consumer will fail.
hi @rayokota
I have started using 4.0.3 which has the parameter to provide jaas config.
However there is a issue in that if I use a topic that is already created :
props.setProperty(KafkaCacheConfig.KAFKACACHE_TOPIC_CONFIG, "<Existing_topic>");
We get below error :
io.kcache.exceptions.CacheInitializationException: Failed trying to create or validate topic <Existing_topic>
......
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TopicAuthorizationException: Authorization failed.
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
at io.kcache.KafkaCache.createTopic(KafkaCache.java:396)
at io.kcache.KafkaCache.createOrVerifyTopic(KafkaCache.java:350)
Note :
The calling method's class, io.kcache.KafkaCache, was loaded from the following location:
jar:file:/Users/breddy3/.m2/repository/io/kcache/kcache/4.0.3/kcache-4.0.3.jar!/io/kcache/KafkaCache.class
The called method's class, org.apache.kafka.clients.admin.DescribeTopicsResult, is available from the following locations:
jar:file:/Users/breddy3/.m2/repository/org/apache/kafka/kafka-clients/3.0.1/kafka-clients-3.0.1.jar!/org/apache/kafka/clients/admin/DescribeTopicsResult.class
The called method's class hierarchy was loaded from the following locations:
org.apache.kafka.clients.admin.DescribeTopicsResult: file:/Users/breddy3/.m2/repository/org/apache/kafka/kafka-clients/3.0.1/kafka-clients-3.0.1.jar
If we use a topic that is non Existing :
props.setProperty(KafkaCacheConfig.KAFKACACHE_TOPIC_CONFIG, "");
io.kcache.exceptions.CacheInitializationException: Failed trying to create or validate topic
at io.kcache.KafkaCache.createOrVerifyTopic(KafkaCache.java:360)
at io.kcache.KafkaCache.init(KafkaCache.java:276)
The text was updated successfully, but these errors were encountered: