web-dev-qa-db-ja.com

tomcatをインストールしようとした後のapt-get操作でのinsservによる多くのエラー

Debian6.0.4マシンにTomcatをインストールしたかったのです。私は試した apt-get install Tomcat6-userうまくいきました。しかし、その後、ユーザーのインストールについて考えを変え、Tomcat6パッケージをインストールしたいと思いました。これにより、多数のエラーが発生しました(以下を参照)。

Apt-getまたはaptitudeで何をしようとしても(Tomcat6-userを削除しようとしたり、Tomcat6を削除しようとしたり、apt-getアップグレードを実行しようとしたり...)、同じエラーリストが表示されます。

どうやってそれを管理したのですか?どうすれば修正できますか?

# apt-get install Tomcat6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  authbind
Suggested packages:
  Tomcat6-docs Tomcat6-admin Tomcat6-examples libtcnative-1
The following NEW packages will be installed:
  authbind Tomcat6
0 upgraded, 2 newly installed, 0 to remove and 32 not upgraded.
Need to get 56.6 kB of archives.
After this operation, 442 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://mirror.hetzner.de/debian/packages/ squeeze/main authbind AMD64 1.2.0 [17.3 kB]
Get:2 http://mirror.hetzner.de/debian/security/ squeeze/updates/main Tomcat6 all 6.0.35-1+squeeze2 [39.3 kB]
Fetched 56.6 kB in 0s (441 kB/s)
Preconfiguring packages ...
Selecting previously deselected package authbind.
(Reading database ... 34717 files and directories currently installed.)
Unpacking authbind (from .../authbind_1.2.0_AMD64.deb) ...
Selecting previously deselected package Tomcat6.
Unpacking Tomcat6 (from .../Tomcat6_6.0.35-1+squeeze2_all.deb) ...
Processing triggers for man-db ...
Setting up authbind (1.2.0) ...
Setting up Tomcat6 (6.0.35-1+squeeze2) ...

Creating config file /etc/default/Tomcat6 with new version
Adding system user `Tomcat6' (UID 108) ...
Adding new user `Tomcat6' (UID 108) with group `Tomcat6' ...
Not creating home directory `/usr/share/Tomcat6'.
insserv: warning: script 'S99iptables-custom' missing LSB tags and overrides
insserv: warning: script 'iptables-custom' missing LSB tags and overrides
insserv: There is a loop at service iptables-custom if started
insserv: There is a loop between service rmnologin and mountnfs if started
insserv:  loop involving service mountnfs at depth 6
insserv:  loop involving service networking at depth 5
insserv:  loop involving service kbd at depth 9
insserv: There is a loop between service rmnologin and mountall-bootclean if started
insserv:  loop involving service mountall-bootclean at depth 5
insserv:  loop involving service mountall at depth 4
insserv: There is a loop between service iptables-custom and lvm2 if started
insserv:  loop involving service lvm2 at depth 2
insserv:  loop involving service udev at depth 1
insserv: There is a loop at service rmnologin if started
insserv: There is a loop between service iptables-custom and checkroot if started
insserv:  loop involving service checkroot at depth 2
insserv:  loop involving service keyboard-setup at depth 1
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv:  loop involving service courier-imap-ssl at depth 1
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv:  loop involving service hwclockfirst at depth 2
insserv:  loop involving service mountoverflowtmp at depth 9
insserv:  loop involving service checkfs at depth 6
insserv:  loop involving service mdadm-raid at depth 4
insserv:  loop involving service hostname at depth 3
insserv: There is a loop between service iptables-custom and ifupdown-clean if started
insserv:  loop involving service ifupdown-clean at depth 5
insserv: There is a loop between service rmnologin and mountall if started
insserv: There is a loop between service iptables-custom and mountdevsubfs if started
insserv:  loop involving service mountdevsubfs at depth 1
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv:  loop involving service mtab at depth 6
insserv: There is a loop between service rmnologin and mountoverflowtmp if started
insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing Tomcat6 (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 Tomcat6
E: Sub-process /usr/bin/dpkg returned an error code (1)
4
yankee

はい、分かりました。いくつかの静的iptablesルールのみを含む独自のスクリプトiptables-commonを作成しました。そのスクリプトを削除すると、問題が解決しました。私はこれが問題の前に決してなかったと混乱していますが。おそらくTomcatがiptableルールを追加したためです...

4
yankee

/etc/init.d/にある他のスクリプトを見ると、次のような特定のセクションで始まっていることに気付くかもしれません。

#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:    iptables
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Initialize iptables rules.
# Description:
### END INIT INFO

このようなセクションを追加することで、Tomcatをインストールしようとしたときに発生したエラーはなくなりました。

詳細情報: Debian Wiki LSBInitScripts

3
sltk