kafka container isn't working on Ubuntu with default-jre-headless

Bug #1824847 reported by Erol Guzoglu on 2019-04-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Undecided
Erol Guzoglu

Bug Description

kolla-ansible version: rocky
container OS: ubuntu
image: source
openstack version: rocky

When I try to deploy kafka with k-a I faced with following error:

+ sudo -E kolla_set_configs
INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json
INFO:__main__:Validating config file
INFO:__main__:Kolla config strategy set to: COPY_ALWAYS
INFO:__main__:Copying service configuration files
INFO:__main__:Copying /var/lib/kolla/config_files/kafka.server.properties to /etc/kafka/kafka.server.properties
INFO:__main__:Setting permission for /etc/kafka/kafka.server.properties
INFO:__main__:Writing out command to execute
INFO:__main__:Setting permission for /var/lib/kafka
INFO:__main__:Setting permission for /var/lib/kafka/data
++ cat /run_command
+ CMD='/opt/kafka/bin/kafka-server-start.sh /etc/kafka/kafka.server.properties'
+ ARGS=
+ [[ ! -n '' ]]
+ . kolla_extend_start
++ [[ ! -d /var/log/kolla/kafka ]]
++ mkdir -p /var/log/kolla/kafka
+++ stat -c %a /var/log/kolla/kafka
++ [[ 755 != \7\5\5 ]]
Running command: '/opt/kafka/bin/kafka-server-start.sh /etc/kafka/kafka.server.properties'
+ echo 'Running command: '\''/opt/kafka/bin/kafka-server-start.sh /etc/kafka/kafka.server.properties'\'''
+ exec /opt/kafka/bin/kafka-server-start.sh /etc/kafka/kafka.server.properties
/opt/kafka/bin/kafka-run-class.sh: line 278: [[: 10 2018-07-17: syntax error in expression (error token is "2018-07-17")
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/var/log/kolla/kafka/kafkaServer-gc.log instead.
Unrecognized VM option 'PrintGCDateStamps'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Kolla uses default-jre-headless which is provide Java 10

$apt-cache show default-jre-headless
Package: default-jre-headless
Architecture: amd64
Version: 2:1.10-63ubuntu1~02
Priority: optional
Section: interpreters
Source: java-common (0.63ubuntu1~02)
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian Java Maintainers <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 20
Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless
Depends: openjdk-11-jre-headless, java-common
Suggests: default-jre
Replaces: openjdk-6-jre-headless (<< 6b23~pre8-2~)
Filename: pool/main/j/java-common/default-jre-headless_1.10-63ubuntu1~02_amd64.deb
Size: 3412
MD5sum: 984c0a0320aa0504544061e4a4f440b5
SHA1: 589d67a211358cd62a07ab206ef031d602d52e56
SHA256: 3da43dd593714245d637dae612333b1a08ce0d3115f923fc38033add7158afb8
Homepage: https://wiki.debian.org/Java/
Description: Standard Java or Java compatible Runtime (headless)
Description-md5: 6a80f216cbac62099ce78c02764c55d1
Task: kubuntu-desktop, kubuntu-full
Supported: 5y

Kafka has regex pattern bug in /opt/kafka/bin/kafka-run-class.sh related ouput of java -version.

They are fix it with the following PR: https://github.com/apache/kafka/pull/4895 with this commit: https://github.com/apache/kafka/pull/4895/commits/4d8f848fb62de2c5dca4ed378f39a99bb38a11ce

We need to upgrade Kafka version to 2.2.0 or downgrade Java to lower version of Java.

Changed in kolla:
assignee: nobody → Erol Guzoglu (erolguzoglu)

Reviewed: https://review.openstack.org/652944
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=cb8fa69407bfcbd32a1e40a10c99a8fe53508d1e
Submitter: Zuul
Branch: master

commit cb8fa69407bfcbd32a1e40a10c99a8fe53508d1e
Author: Erol Guzoglu <email address hidden>
Date: Tue Apr 16 11:32:11 2019 +0300

    Pin kafka java version to 8 on ubuntu

    Ubuntu default-jre-headless is not working with kafka

    Change-Id: Ic6ab66128efa931277516e0cf5848a816ca676ad
    Closes-Bug: #1824847

Changed in kolla:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers