You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ismael Juma (JIRA)" <ji...@apache.org> on 2018/05/03 16:31:00 UTC
[jira] [Resolved] (KAFKA-6855) Kafka fails to start due to faulty
Java version detection
[ https://issues.apache.org/jira/browse/KAFKA-6855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ismael Juma resolved KAFKA-6855.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.1.1
2.0.0
Thanks for the report. This has already been fixed:
[https://github.com/apache/kafka/commit/e9f86c3085fa8b65e77072389e0dd147b744f117]
Since we had no JIRA for it, I will use this one.
> Kafka fails to start due to faulty Java version detection
> ---------------------------------------------------------
>
> Key: KAFKA-6855
> URL: https://issues.apache.org/jira/browse/KAFKA-6855
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 1.1.0
> Environment: Ubuntu 18.04
> Java 10
> Reporter: Anders Tornblad
> Assignee: Ismael Juma
> Priority: Major
> Fix For: 2.0.0, 1.1.1
>
>
> After downloading fresh installations of ZooKeeper and Kafka, and then starting ZooKeeper and Kafka the way that is recommended on [http://kafka.apache.org/documentation/#quickstart] the following error message is shown:
> {{Unrecognized VM option 'PrintGCDateStamps'}}
> I found the error in the kafka-run-class.sh file, where the Java version is determined and put in the JAVA_MAJOR_VERSION variable. My Java runtime reports the version as openjdk version "10.0.1" 2018-04-17, which makes the JAVA_MAJOR_VERSION value be "10 2018-04-17" instead of just "10". That makes the subsequent if statement fail.
> I found the following line to fix the problem:
> {{JAVA_MAJOR_VERSION=$($JAVA -version 2>&1 | sed -E -n 's/.* version "([^.-]*).*/\1p')}}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)