photon icon indicating copy to clipboard operation
photon copied to clipboard

kafka daemon fails to start

Open dcasota opened this issue 10 months ago • 1 comments

Describe the bug

With x86_64 package 3.4.0-9.ph5, the kafka daemon fails to start.

root@photon-6782ea121050 [ ~ ]# systemctl status kafka
× kafka.service - Kafka
     Loaded: loaded (/usr/lib/systemd/system/kafka.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2025-01-31 19:00:49 UTC; 1min 14s ago
   Duration: 230ms
    Process: 859 ExecStart=/usr/kafka/bin/kafka-server-start.sh /etc/kafka/server.properties (code=exited, status=1/FAILURE)
   Main PID: 859 (code=exited, status=1/FAILURE)
        CPU: 255ms

Jan 31 19:00:49 photon-6782ea121050 systemd[1]: Started Kafka.
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[1217]: mkdir: cannot create directory ‘/usr/kafka/bin/../logs’: Permission denied
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[859]: [0.000s][error][logging] Error opening log file '/usr/kafka/bin/../logs/kafkaServer-gc.log': No such file or directory
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[859]: [0.000s][error][logging] Initialization of output 'file=/usr/kafka/bin/../logs/kafkaServer-gc.log' using options 'filecount=10,filesize=100M' failed.
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[859]: Invalid -Xlog option '-Xlog:gc*:file=/usr/kafka/bin/../logs/kafkaServer-gc.log:time,tags:filecount=10,filesize=100M', see error log for details.
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[859]: Error: Could not create the Java Virtual Machine.
Jan 31 19:00:49 photon-6782ea121050 kafka-server-start.sh[859]: Error: A fatal exception has occurred. Program will exit.
Jan 31 19:00:49 photon-6782ea121050 systemd[1]: kafka.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 19:00:49 photon-6782ea121050 systemd[1]: kafka.service: Failed with result 'exit-code'.

journal.log snippet

Jan 31 19:00:34 photon-6782ea121050 systemd[1]: Configuration file /usr/lib/systemd/system/kafka.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jan 31 19:00:34 photon-6782ea121050 [RPM][959]: install kafka-3.4.0-9.ph5.x86_64: success

Reproduction steps

  1. x86_64 setup 6.1.126-5.ph5-esx
  2. tdnf install kafka
  3. reboot
  4. systemctl status kafka

Expected behavior

Correct kafka daemon setup

Additional context

No response

dcasota avatar Jan 31 '25 19:01 dcasota

Yes, issue is valid. We will fix it.

Wokaround: chown -R kafka /usr/kafka/ And then: systemctl restart kafka verify using systemctl status kafka

sshedi avatar Feb 10 '25 08:02 sshedi

Fixed by: https://github.com/vmware/photon/commit/0bb72e338b677933671d80581a0e7da31e947c10 Thanks @prashant1221

sshedi avatar Jul 03 '25 07:07 sshedi