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

Fix for #5116 does not handle all cases #6339

Closed
mikebin opened this issue Sep 30, 2020 · 0 comments
Closed

Fix for #5116 does not handle all cases #6339

mikebin opened this issue Sep 30, 2020 · 0 comments
Assignees
Milestone

Comments

@mikebin
Copy link

mikebin commented Sep 30, 2020

Describe the bug
The fix for #5116, which is included in ksqlDB 6.0.0, does not handle all cases. When accessing a pre-5.5.1 CP cluster (5.2.3), the following exception occurs:

[2020-09-30 16:39:50,693] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:66)
io.confluent.ksql.util.KsqlServerException: Could not get Kafka authorized operations!
at io.confluent.ksql.services.KafkaClusterUtil.isAuthorizedOperationsSupported(KafkaClusterUtil.java:57)
at io.confluent.ksql.security.KsqlAuthorizationValidatorFactory.create(KsqlAuthorizationValidatorFactory.java:52)
at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:668)
at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:583)
at io.confluent.ksql.rest.server.KsqlServerMain.createExecutable(KsqlServerMain.java:118)
at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:59)
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnsupportedVersionException: Attempted to write a non-default includeClusterAuthorizedOperations at version 7
at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
at io.confluent.ksql.services.KafkaClusterUtil.isAuthorizedOperationsSupported(KafkaClusterUtil.java:53)
... 5 more
Caused by: org.apache.kafka.common.errors.UnsupportedVersionException: Attempted to write a non-default includeClusterAuthorizedOperations at version 7

Note that UnsupportedVersionException is wrapped in an ExecutionException, and the code currently only checks for UnsupportedVersionException: https://github.com/confluentinc/ksql/blob/6.0.0-post/ksqldb-engine/src/main/java/io/confluent/ksql/services/KafkaClusterUtil.java#L48-L58

To Reproduce
Startup ksqlDB 6.0.0 against a pre-CP 5.5.1 cluster (for example, 5.2.3).

Expected behavior
Ignore the unsupported version exception

Actual behaviour
Exception not being properly caught and ignored, causing ksqlDB server to fail at startup

Additional context
If authorization is not needed, setting ksql.access.validator.enable=false is a workaround. Upgrading brokers to CP 5.5.1+ is another workaround.

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

No branches or pull requests

3 participants