2013-11-28 97 views
1

我在RHEL 6.4下配置rsyslog,將log4j文件發送到中央rsyslog服務器。這將一直運行,直到應用程序日誌文件旋轉。 rsyslog現在仍然試圖讀取文件,但沒有找到任何數據:rsyslog不釋放文件句柄

9332.655820752:7f609100d700: strm 0x7f607c005580: file 10 read 0 bytes 
9332.655829701:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-performance-events.log', inode 2069/2069file 7 read 0 bytes 
9342.665937537:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-all-events.log', inode 2063/2063file 8 read 0 bytes 
9342.665949751:7f609100d700: stream checking for file change on '/var/log/tomcat7x/catalina-daemon.out', inode 1179/1179file 9 read 0 bytes 
9342.665960655:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-application-all-events.log', inode 2068/2068file 10 read 0 bytes 

它看起來像rsyslog現在正在嘗試與舊的文件句柄訪問文件。我如何告訴rsyslog總是通過實際的文件名來訪問文件? 謝謝 Peter

+0

面臨同樣的麻煩。你在哪裏找到這些消息? –

回答

1

旋轉應用程序日誌文件後,發送一個HUP信號到rsyslog。這將強制rsyslog關閉並重新打開其文件描述符。

相關問題