長時間アイドル状態の TCP セッションがネットワークデバイスによって切断されるのを防ぐために rsyslog keepAlive を設定する方法
Issue
- rsyslog がログをリモートサーバーに送信する際、ルート上のネットワークデバイス (NAT やファイアウォールなど) により、長時間アイドル状態の TCP セッションが切断されます。
- 送信側の典型的なログ出力は次のとおりです。
omfwd: remote server at 192.168.xx.xx:514 seems to have closed connection. This often happens when the remote peer (or an interim system like a load balancer or firewall) shuts down or aborts a connection. Rsyslog will re-open the connection if configured to do so (we saw a generic IO Error, which usually goes along with that behaviour).
action 'action-7-builtin:omfwd' suspended (module 'builtin:omfwd'), retry 0. There should be messages before this one giving the reason for suspension.
- ログ受信側の典型的なログ出力は次のとおりです。
rsyslogd: netstream session xxxxxxxxxxx from 1.2.3.4 will be closed due to error: Connection reset by peer
- この記事 も参照してください。
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.