赞
踩
使用rsyslogd -f /etc/rsyslog.conf -N 1检查配置,无报错。
尝试重启服务,未解决:
systemctl restart syslog.socket
systemctl restart systemd-journald.socket
systemctl restart rsyslog
修改rsyslog.conf配置,添加如下配置,重启rsyslog服务,开启debug日志:
$DebugFile /var/log/debug
$DebugLevel 2
比对发下,记录异常的服务器,debug文件中记录的启动日志,缺失如下部分:
4868.692809878:main thread : wti.c: sent SIGTTIN to worker thread 0x7f21720f8700 | |
4868.692816994:main thread : wtp.c: main Q:Reg: waiting 1500ms on worker thread termination, 1 still running | |
4868.692921354:main Q:Reg/w0 : wti 0x5626ef493060: wti.c: worker awoke from idle processing | |
4868.692931698:main Q:Reg/w0 : queue.c: DeleteProcessedBatch: we deleted 0 objects and enqueued 0 objects | |
4868.692936460:main Q:Reg/w0 : queue.c: doDeleteBatch: delete batch from store, new sizes: log 0, phys 0 | |
4868.692941371:main Q:Reg/w0 : queue.c: regular consumer finished, iret=4, szlog 0 sz phys 0 | |
4868.692945473:main Q:Reg/w0 : wti 0x5626ef493060: wti.c: terminating worker terminateRet=5, bInactivityTOOccured=0 | |
4868.692950304:main Q:Reg/w0 : wti.c: DDDD: wti 0x5626ef493060: worker cleanup action instances | |
4868.692954432:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 0, ptr (nil) | |
4868.692958462:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 1, ptr 0x7f215c0088d0 | |
4868.692963690:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 2, ptr 0x7f215c002480 | |
4868.692969072:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 3, ptr (nil) | |
4868.692972996:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 4, ptr (nil) | |
4868.692976893:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 5, ptr (nil) | |
4868.692980639:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 6, ptr (nil) | |
4868.692984584:main Q:Reg/w0 : wti.c: wti 0x5626ef493060, action 7, ptr 0x7f215c002660 | |
4868.692998207:main Q:Reg/w0 : wti.c: wti 0x5626ef493060: worker exiting | |
4868.693003018:main Q:Reg/w0 : wtp.c: main Q:Reg: Worker thread 5626ef493060, terminated, num workers now 0 | |
4868.693030339:main Q:Reg/w0 : debug.c: destructor for debug call stack 0x7f215c000b20 called |
搜索发下,该进程由如下配置控制:
/etc/systemd/journald.conf中的配置ForwardToSyslog,修改为yes即可。
另外,出现异常时,可根据异常发生的时间,修改异常发生时间前当天修改过的配置文件,问题很大概率由此配置导致。
参考链接:
Rsyslog Debug Support — rsyslog 8.18.0.master documentation
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。