You are not logged in.
I have just installed kafka-4.0.0-5 from the extra repo (fresh install).
Accoroding to the (sparse) instructions on ArchWiki, I just ran
sudo systemctl start kafkathen
$ systemctl status kafka
× kafka.service - Kafka server
Loaded: loaded (/usr/lib/systemd/system/kafka.service; disabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2025-05-09 19:52:54 CEST; 17min ago
Duration: 1.355s
Invocation: a5c8318ad6e84186ba578f8f5cad7625
Process: 1707 ExecStart=/usr/bin/kafka-server-start.sh /etc/kafka/server.properties (code=exited, status=1/FAILURE)
Main PID: 1707 (code=exited, status=1/FAILURE)
Mem peak: 135.5M
CPU: 1.893s
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: java.lang.RuntimeException: No readable meta.properties files found.
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at org.apache.kafka.metadata.properties.MetaPropertiesEnsemble.verify(MetaPropertiesEnsemble.java:480) ~[kafka-metadata-4.0.0.jar:?]
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at kafka.server.KafkaRaftServer$.initializeLogDirs(KafkaRaftServer.scala:141) ~[kafka_2.13-4.0.0.jar:?]
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:56) ~[kafka_2.13-4.0.0.jar:?]
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at kafka.Kafka$.buildServer(Kafka.scala:68) ~[kafka_2.13-4.0.0.jar:?]
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at kafka.Kafka$.main(Kafka.scala:75) [kafka_2.13-4.0.0.jar:?]
mag 09 19:52:53 maddalaptop kafka-server-start.sh[1707]: at kafka.Kafka.main(Kafka.scala) [kafka_2.13-4.0.0.jar:?]
mag 09 19:52:54 maddalaptop systemd[1]: kafka.service: Main process exited, code=exited, status=1/FAILURE
mag 09 19:52:54 maddalaptop systemd[1]: kafka.service: Failed with result 'exit-code'.
mag 09 19:52:54 maddalaptop systemd[1]: kafka.service: Consumed 1.893s CPU time, 135.5M memory peak.I cannot find meta.properties anywhere on disk. Looking up online Kafka user questions from other environments, I can't see any obvious setup step missing. I am new to Kafka BTW.
Any hints?
Offline
I had the same issue. Reinstalling kafka & deleting all config files did not fix it.
I think it's an Arch packaging bug with 4.0.
After downgrading to kafka 3.9.0, it works again. I added the package to /etc/pacman.conf IgnorePkg = kafka setting, so Pacman wouldn't upgrade it.
You can get older packages from the Arch Linux Archive https://wiki.archlinux.org/title/Arch_Linux_Archive
Last edited by intgr (2025-05-18 13:01:01)
Offline
Problem lies with installed kafka expecting to find files of proper format in default logs directory. To solve this you need to create such files with a command:
sudo -u kafka kafka-storage.sh format -t $(kafka-storage.sh random-uuid) -c /etc/kafka/server.properties --standaloneProblem has been described in details here https://www.skybert.net/linux/kafka-fails-to-start/
I will post comment to the package maintainer so it may be included in future release.
Edit:
- maintainer didn't respond
Last edited by archevilst (2025-10-29 16:21:28)
Offline
I tried upgrading Kafka to 4.1.1 and it failed again. But when uninstalling & reinstalling, I noticed the following output:
:: Processing package changes...
(1/1) installing kafka [################################] 100%
==========
You should migrate kafka metadata, example command
sudo -u kafka /usr/bin/kafka-storage.sh format -t "$(/usr/bin/kafka-storage.sh random-uuid)" -c /etc/kafka/server.properties --standalone
:: Running post-transaction hooks...After running this command, it works again.
Offline
I am no longer in need of this package, but since I started the topic, I wanted to follow up and tested v4.1.1-1.
I saw the same message about migrating metadata, but when I tried the suggested command I got:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: kafka/tools/StorageTool has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: kafka/tools/StorageTool has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)I have near zero experience with Java, but I guess it may be worth setting a check for a compatible JDK version if that's what causes the error.
Offline