Failed to initialize http input channel

Hi,

We keep seeing this error in log files of logstash nodes when we start logstash with http input.

[2018-08-14T22:03:50,292][WARN ][io.netty.channel.ChannelInitializer] Failed to initialize a channel. Closing: [id: 0x31fa5de6, L:/x.x.x.x:6000 - R:/x.x.x.x:44444]
java.lang.NullPointerException: keyCertChainFile
        at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:31) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.handler.ssl.OpenSslServerContext.<init>(OpenSslServerContext.java:352) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.handler.ssl.OpenSslServerContext.<init>(OpenSslServerContext.java:337) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.handler.ssl.SslContext.newServerContextInternal(SslContext.java:413) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:391) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at org.logstash.plugins.inputs.http.util.JksSslBuilder.build(JksSslBuilder.java:57) ~[logstash-input-http-3.2.0.jar:?]
        at org.logstash.plugins.inputs.http.HttpInitializer.initChannel(HttpInitializer.java:34) ~[logstash-input-http-3.2.0.jar:?]
        at org.logstash.plugins.inputs.http.HttpInitializer.initChannel(HttpInitializer.java:17) ~[logstash-input-http-3.2.0.jar:?]
        at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:68) ~[netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:144) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:137) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRegistered(DefaultChannelPipeline.java:1307) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:144) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:820) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:509) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:419) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:478) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.safeExecute(SingleThreadEventExecutor.java:451) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:401) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) [netty-all-4.1.3.Final.jar:4.1.3.Final]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

This is http input configuration

input {
  http {
      port => 6000
      ssl => true
      keystore => "/opt/elastic/logstash/ssl/keystore"
      keystore_password => "password"
  }
}

However, this is only happening on two nodes, other nodes work well with the same configuration. We are currently using logstash 5.6.

Thanks,
Meet

Hi Meet,

Could try starting Logstash without the ssl part? Does that give you the same error?

Also, are you running Logstash as a systemd service or from a binary?

Corrected!. There was some problem with our logstash installation script. It was updating logstash-http-input plugin and i guess it created some version mismatch and found out that the above http configuration for ssl is deprecated in updated http-input-plugin.

Removing that "update plugin" part worked well.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.