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

Bug #1824847 reported by Erol Guzoglu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Erol Guzoglu
Rocky
Fix Released
Medium
Unassigned
Stein
Fix Released
Medium
Unassigned
Train
Fix Released
Medium
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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/653930

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/655388

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/stein)

Reviewed: https://review.opendev.org/655388
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=e0137e7df46b3917a86c6062668f7b717a9356ca
Submitter: Zuul
Branch: stable/stein

commit e0137e7df46b3917a86c6062668f7b717a9356ca
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
    (cherry picked from commit cb8fa69407bfcbd32a1e40a10c99a8fe53508d1e)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/rocky)

Reviewed: https://review.opendev.org/653930
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=7bb4770d2877211e31347e44e7ad793e73296a52
Submitter: Zuul
Branch: stable/rocky

commit 7bb4770d2877211e31347e44e7ad793e73296a52
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
    (cherry picked from commit cb8fa69407bfcbd32a1e40a10c99a8fe53508d1e)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 7.0.3

This issue was fixed in the openstack/kolla 7.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 8.0.0.0rc2

This issue was fixed in the openstack/kolla 8.0.0.0rc2 release candidate.

Mark Goddard (mgoddard)
Changed in kolla:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 9.0.0.0rc1

This issue was fixed in the openstack/kolla 9.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.