I am trying to recover the logs from a Linux server with rsyslog. When the exchanges are not encrypted it works, but when I try to encrypt it does not work.
At the level of the logs on the Graylog server, I have this error message:
2018-07-06T09:28:30.929+02:00 ERROR [NettyTransport] Error in Input [Syslog TCP/5b3a124909908a03e1e70bb5] (channel [id: 0xca9ca86a, /ip_client:36470 => /ip_graylog_server:5514])
org.jboss.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 3c33303e4a756c2020362030393a32383a3239207372632d63656e746f732d746573742d677261796c6f67206468636c69656e745b3836315d3a204448435052455155455354206f6e20656e7331363020746f203137322e32322e312e3120706f727420363720287869643d307864353134313062290a3c32373e4a756c2020362030393a32383a3239207372632d63656e746f732d746573742d677261796c6f67206468636c69656e745b3836315d3a2073656e645f7061636b65743a204f7065726174696f6e206e6f74207065726d69747465640a3c32373e4a756c2020362030393a32383a3239207372632d63656e746f732d746573742d677261796c6f67206468636c69656e745b3836315d3a206468636c69656e742e633a323638383a204661696c656420746f2073656e64203330302062797465206c6f6e67207061636b6574206f7665722066616c6c6261636b20696e746572666163652e0a
at org.jboss.netty.handler.ssl.SslHandler.decode(SslHandler.java:857) ~[graylog.jar:?]
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425) ~[graylog.jar:?]
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[graylog.jar:?]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[graylog.jar:?]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [graylog.jar:?]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [graylog.jar:?]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [graylog.jar:?]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [graylog.jar:?]
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [graylog.jar:?]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [graylog.jar:?]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [graylog.jar:?]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [graylog.jar:?]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [graylog.jar:?]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [graylog.jar:?]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [graylog.jar:?]
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) [graylog.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
With your configuration, rsyslog has to be able to verify the certificate of the Syslog input in Graylog.
If you’re using a self-signed certificate or a custom CA, you have to add these to the local certificate trust store.