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:28:00 UTC
[jira] [Assigned] (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 reassigned KAFKA-6855:
----------------------------------
Assignee: Ismael Juma
> 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
>
> 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)