rsyslog 升级失败:子进程 /usr/bin/dpkg 返回错误代码 (1)

rsyslog 升级失败:子进程 /usr/bin/dpkg 返回错误代码 (1)

我在 Debian 服务器上升级 rsyslog 时遇到了问题。

root@trip:/home# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up rsyslog (8.4.2-1+deb8u2) ...
Job for rsyslog.service failed. See 'systemctl status rsyslog.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript rsyslog, action "start" failed.
dpkg: error processing package rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rsyslog
E: Sub-process /usr/bin/dpkg returned an error code (1)

输出systemctl status rsyslog.service

â rsyslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled)
   Active: failed (Result: start-limit) since Mon 2016-01-25 09:54:17 CET; 3min 43s ago
     Docs: man:rsyslogd(8)
           http://www.rsyslog.com/doc/
  Process: 27385 ExecStart=/usr/sbin/rsyslogd -n (code=exited, status=1/FAILURE)
 Main PID: 27385 (code=exited, status=1/FAILURE)

Jan 25 09:54:16 trip systemd[1]: Failed to start System Logging Service.
Jan 25 09:54:16 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 09:54:17 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 09:54:17 trip systemd[1]: Failed to start System Logging Service.
Jan 25 09:54:17 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 09:54:17 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 09:54:17 trip systemd[1]: Failed to start System Logging Service.

输出journalctl -xn

-- Logs begin at Sun 2016-01-24 18:29:42 CET, end at Mon 2016-01-25 09:54:17 CET. --
Jan 25 09:54:16 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 09:54:16 trip systemd[1]: rsyslog.service: main process exited, code=exited, status=1/FAILURE
Jan 25 09:54:16 trip systemd[1]: Failed to start System Logging Service.
-- Subject: Unit rsyslog.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rsyslog.service has failed.
--
-- The result is failed.
Jan 25 09:54:16 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 09:54:17 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 09:54:17 trip systemd[1]: Failed to start System Logging Service.
-- Subject: Unit rsyslog.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rsyslog.service has failed.
--
-- The result is failed.
Jan 25 09:54:17 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 09:54:17 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 09:54:17 trip systemd[1]: Failed to start System Logging Service.
-- Subject: Unit rsyslog.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rsyslog.service has failed.
--
-- The result is failed.
Jan 25 09:54:17 trip systemd[1]: Unit syslog.socket entered failed state.

我删除了 rsyslog,然后尝试重新安装它,但这没有帮助。并apt-get -f install抛出了与 相同的错误apt-get upgrade。所以现在我似乎被一个半配置的 rsyslog 困住了。我该如何解决这个问题?

编辑:输出systemctl status syslog.service

â rsyslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled)
   Active: failed (Result: start-limit) since Mon 2016-01-25 11:14:36 CET; 3min 49s ago
     Docs: man:rsyslogd(8)
           http://www.rsyslog.com/doc/
  Process: 31319 ExecStart=/usr/sbin/rsyslogd -n (code=exited, status=1/FAILURE)
 Main PID: 31319 (code=exited, status=1/FAILURE)

Jan 25 11:14:36 trip systemd[1]: Failed to start System Logging Service.
Jan 25 11:14:36 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 11:14:36 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 11:14:36 trip systemd[1]: Failed to start System Logging Service.
Jan 25 11:14:36 trip systemd[1]: Unit rsyslog.service entered failed state.
Jan 25 11:14:36 trip systemd[1]: rsyslog.service start request repeated too quickly, refusing to start.
Jan 25 11:14:36 trip systemd[1]: Failed to start System Logging Service.

答案1

今天我遇到了和你一样的问题@RonaldPK。我通过以下方法修复了ps axu|grep rsyslog- 我发现我已经在运行了rsyslog,所以我终止它并执行,apt-get -f install一切顺利。

我希望这可以帮助你。

答案2

首先停止 rsyslog

 sudo service rsyslog stop
 sudo systemctl stop rsyslog.service
 sudo systemctl disable rsyslog.service

然后尝试:

 sudo apt-get -f install

相关内容