ksqlDB not starting locally

I want to run a kafka cluster locally to test some code

I ran ○ confluent local services start and I got the following error:

The local commands are intended for a single-node development environment only, NOT for production usage. See more: https://docs.confluent.io/current/cli/index.html
As of Confluent Platform 8.0, Java 8 will no longer be supported.

Using CONFLUENT_CURRENT: /var/folders/5x/1xdth1ss0mjf_qw0frhwhw4c0000gq/T/confluent.390395
ZooKeeper is [UP]
Kafka is [UP]
Schema Registry is [UP]
Kafka REST is [UP]
Connect is [UP]
Starting ksqlDB Server
Error: ksqlDB Server failed to start

When I inspected the /var/folders/5x/1xdth1ss0mjf_qw0frhwhw4c0000gq/T/confluent.390395/ksql-server directory I found the following in the ksql-server.stdoutfile:

Debug Options: 
[2025-03-19 10:03:58,798] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:104)
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:429)
	at io.confluent.ksql.function.UserFunctionLoader.newInstance(UserFunctionLoader.java:158)
	at io.confluent.ksql.rest.server.KsqlServerMain.loadFunctions(KsqlServerMain.java:136)
	at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:88)

My local java version is 23.0.2:

○ java --version
java 23.0.2 2025-01-21
Java(TM) SE Runtime Environment (build 23.0.2+7-58)
Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)

I’ve seen a StackOverflow thread from 2024 which mentioned that only up to Java version 17 is supported but this seems non-sensical to me; you can’t even download Java 17 anymore from Oracle.

Note: I have not made any changes to configs for any of the services, this is a vanilla install

Why doesn’t ksql server start?

Java 23 isn’t currently supported in Confluent Platform <= 7.9. Java 8, 11, and 17 are supported, with support for 8 planned to be removed in Confluent Platform 8.0.

I recall a similar issue raised here and in trying to repro I found that confluent local services start works with Java 21, so you might have better luck with 21. Just keep in mind that YMMV given what is documented to be supported.

1 Like

Thanks for getting back to me @dtroiano

I removed Java23 and installed of Java21:

○ java --version
java 21.0.6 2025-01-21 LTS
Java(TM) SE Runtime Environment (build 21.0.6+8-LTS-188)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.6+8-LTS-188, mixed mode, sharing)

However I am still got the exact same error:

[2025-03-19 14:35:27,868] ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:104)
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:430)
	at io.confluent.ksql.function.UserFunctionLoader.newInstance(UserFunctionLoader.java:158)
	at io.confluent.ksql.rest.server.KsqlServerMain.loadFunctions(KsqlServerMain.java:136)
	at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:88)

I managed to find a java17 download on the Oracle site - for those looking at this in the future you need to keep scrolling down past the contact footer and create an oracle account.

○ java --version
java 17.0.14 2025-01-21 LTS
Java(TM) SE Runtime Environment (build 17.0.14+8-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.14+8-LTS-191, mixed mode, sharing)

That seemed to do the trick:

ZooKeeper is [UP]
Kafka is [UP]
Schema Registry is [UP]
Kafka REST is [UP]
Connect is [UP]
Starting ksqlDB Server
ksqlDB Server is [UP]
Starting Control Center
Control Center is [UP]

Is there a timeline for when Java21 will be supported?

I’m not sure. Worth noting that Java 8, 11, and 17 are supported for Apache Kafka 3.9 (doc) while Java 17 and 21 are supported for Kafka 4.0 which was released yesterday (doc).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.