confluentinc / cp-demo

Confluent Platform Demo including Apache Kafka, ksqlDB, Control Center, Schema Registry, Security, Schema Linking, and Cluster Linking
Apache License 2.0
38 stars 322 forks source link

MDS fails to start due to wrong Java version #367

Closed ybyzek closed 3 years ago

ybyzek commented 3 years ago

Description

Start script failure:

Waiting up to 120 seconds for MDS to start
........................ERROR: Failed after 120 seconds. Please troubleshoot and run again. 

Docker logs:

[2021-04-14 20:35:00,087] WARN Failed to initialize a channel. Closing: [id: 0x67e8d0a5] (io.netty.channel.ChannelInitializer)
kafka2      | org.apache.zookeeper.common.X509Exception$SSLContextException: Failed to create KeyManager
kafka2      |   at org.apache.zookeeper.common.X509Util.createSSLContextAndOptions(X509Util.java:336)
kafka2      |   at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:268)
kafka2      |   at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initSSL(ClientCnxnSocketNetty.java:454)
kafka2      |   at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initChannel(ClientCnxnSocketNetty.java:444)
kafka2      |   at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initChannel(ClientCnxnSocketNetty.java:429)
kafka2      |   at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
kafka2      |   at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
kafka2      |   at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938)
kafka2      |   at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
kafka2      |   at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
kafka2      |   at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
kafka2      |   at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
kafka2      |   at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
kafka2      |   at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:502)
kafka2      |   at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:417)
kafka2      |   at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:474)
kafka2      |   at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
kafka2      |   at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
kafka2      |   at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
kafka2      |   at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
kafka2      |   at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
kafka2      |   at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
kafka2      |   at java.base/java.lang.Thread.run(Thread.java:834)

Environment

Based on user troubleshooting, it fails due to Java version.

/Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home/bin/java --version
java 16 2021-03-16
Java(TM) SE Runtime Environment (build 16+36-2231)
Java HotSpot(TM) 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)

The demo should not have a Java dependency (except for building the Kafka Streams app), but maybe it's tied into keytool?

akoh-confluent commented 3 years ago

I've also hit the same issue with 6.1.1-post, and downgrading the JAVA version resolved it. Would it be worth adding a note to the tutorial documentation or the troubleshooting page to highlight this?

https://docs.confluent.io/platform/current/tutorials/cp-demo/docs/on-prem.html#cp-demo-on-prem-tutorial https://docs.confluent.io/platform/current/tutorials/cp-demo/docs/troubleshooting.html#cp-demo-troubleshooting

ybyzek commented 3 years ago

@akoh-confluent docs enhancement would be helpful. Additional options: