2013-11-28 95 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关闭并重新打开其文件描述符。

相关问题