缺少/ dev / xconsole导致rsyslog以及所有其他服务停止
我在Hyper-V环境中运行Ubuntu-10.04.04LTS。 我发现SSH,HTTP或其他任何其他服务都已停止,因为rsyslog
守护程序因消息unable to find the /dev/xconsole file
。
我用以下内容暂时修复了它。
FILE=/dev/xconsole if [ -e $FILE ]; then echo "$FILE exists Carry on!" else mknod -m 640 /dev/xconsole c 1 3 chown syslog:adm /dev/xconsole echo "Created $FILE." fi
问题是当我重新启动守护进程时,我无法让rsyslog
守护进程处理这8行。
同样重新启动守护程序会删除/dev/xconsole
文件,我们将返回所有已停止的服务。 在解决这个问题时,我在rsyslog
脚本中的启动和重启条件之后插入了if
– fi
行。 问题是我没有得到stdio
的echo
。 有人知道如何在创建/dev/xconsole
设备时将/dev/xconsole
报告发送到stdio
吗?
这存在的原因是因为Ubuntu Server 12.04错误地假设您已安装xterminal 。 它可能是他们的桌面操作系统的遗留问题,默认情况下它可能存在。
无论如何,最好的办法就是将它从/etc/rsyslog.d/50-default.conf
注释掉,如下所示:
# daemon.*;mail.*;\ # news.err;\ # *.=debug;*.=info;\ # *.=notice;*.=warn |/dev/xconsole
而中提琴,没有更多的错误。
BTW。 我怀疑这会导致它死亡。