Hi Team,
Im using below configuration in logstash beats and im getting below error,
Could anyone help to resolve this issue,
input {
beats {
port => 5044
host => server"
ssl => true
ssl_certificate => "/opt/ls_home/logstash/config/certs/server.crt.pem"
ssl_key => "/opt/ls_home/logstash/config/certs/server.key.p8"
ssl_key_passphrase => "bAy?t6bHX)T%GCjdrEtz8cXe"
ssl_certificate_authorities => "/opt/ls_home/logstash/config/certs/trust_chain.pem"
ssl_verify_mode => "none"
}
}
Getting below error in logstash:
[2021-01-20T10:09:29,915][ERROR][logstash.inputs.beats ] Looks like you either have a bad certificate, an invalid key or your private key was not in PKCS8 format.
[2021-01-20T10:09:29,915][WARN ][io.netty.channel.ChannelInitializer] Failed to initialize a channel. Closing: [id: 0x1a8f87d8, L:/ip:5044 - R:/ip:57287]
java.lang.IllegalArgumentException: File does not contain valid private key: /opt/ls_home/logstash/config/certs/cbgplstapr01.boigroup.net.key.p8
at io.netty.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:267) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]
at io.netty.handler.ssl.SslContextBuilder.forServer(SslContextBuilder.java:90) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]
at org.logstash.netty.SslSimpleBuilder.build(SslSimpleBuilder.java:112) ~[logstash-input-beats-5.1.6.jar:?]
at org.logstash.beats.Server$BeatsInitializer.initChannel(Server.java:131) ~[logstash-input-beats-5.1.6.jar:?]
at org.logstash.beats.Server$BeatsInitializer.initChannel(Server.java:101) [logstash-input-beats-5.1.6.jar:?]
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:113) [netty-all-4.1.18.Final.jar:4.1.18.Final]
Could anyone help us to resolve that above issue