Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

apt-get insserv loop errors

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
agowa338
Posts: 3
Joined: 2017-01-15 19:34

apt-get insserv loop errors

#1 Post by agowa338 »

Hello,
I'm having problems using apt-get on my Debian 8 server.
Can anyone help? I've no clue, what I'm suposed to to in order to fix this...

Code: Select all

root@vmi99794:~# apt-get install screen
Reading package lists... Done
Building dependency tree
Reading state information... Done
screen is already the newest version.
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]
Setting up screen (4.2.1-3+deb8u1) ...
insserv: warning: script 'S99iptables' missing LSB tags and overrides
insserv: warning: script 'iptables' missing LSB tags and overrides
insserv: There is a loop between service fail2ban and mountnfs if started
insserv:  loop involving service mountnfs at depth 4
insserv:  loop involving service networking at depth 3
insserv: There is a loop between service iptables and udev if started
insserv:  loop involving service udev at depth 1
insserv: There is a loop at service iptables if started
insserv: There is a loop between service iptables and mountall if started
insserv:  loop involving service mountall at depth 4
insserv:  loop involving service checkfs at depth 3
insserv: There is a loop between service iptables and mountall-bootclean if started
insserv:  loop involving service mountall-bootclean at depth 5
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service fail2ban and iptables if started
insserv:  loop involving service iptables at depth 5
insserv:  loop involving service fail2ban at depth 4
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv:  loop involving service mountnfs-bootclean at depth 9
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop at service rc.local if started
insserv:  loop involving service urandom at depth 7
insserv: There is a loop between service rc.local and mountdevsubfs if started
insserv:  loop involving service mountdevsubfs at depth 2
insserv:  loop involving service mountkernfs at depth 1
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting iptables depends on rc.local 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 package screen (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 screen
E: Sub-process /usr/bin/dpkg returned an error code (1)

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: apt-get insserv loop errors

#2 Post by dilberts_left_nut »

Fix your custom iptables script.
AdrianTM wrote:There's no hacker in my grandma...

agowa338
Posts: 3
Joined: 2017-01-15 19:34

Re: apt-get insserv loop errors

#3 Post by agowa338 »

This is my /etc/init.d/iptables script, what's wrong with it, it worked well on my former server?

Code: Select all

#!/bin/sh

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

default=/etc/default/iptables
if test -f $default; then
  . $default
fi

have_a_cow_man () {
  for i in $@; do
    if ! command -v "$i" >/dev/null 2>&1; then
      echo "Aborting iptables initd: no $i executable."
      exit 0
    fi
  done
}

iptables="/sbin/${iptables_command-iptables}"
iptables_save="${iptables}-save"
iptables_restore="${iptables}-restore"

have_a_cow_man "$iptables_save" "$iptables_restore"

libdir=/var/lib/iptables
autosave="${libdir}/autosave"
initd="$0"

initd_clear () {
  rm -f "$autosave"
  echo -n "Clearing iptables ruleset: default ACCEPT policy"
  $iptables_save | sed "/-/d;/^#/d;s/DROP/ACCEPT/" | $iptables_restore
  echo "."
}

initd_halt () {
  rm -f $autosave
  echo -n "Clearing iptables ruleset: default DROP policy"
  $iptables_save | sed "/-/d;/^#/d;s/ACCEPT/DROP/" | $iptables_restore
  echo "."
}

initd_load () {
  ruleset="$libdir/$@"
  if ! test -f "$ruleset"; then
    echo "Aborting iptables load: unknown ruleset, \"$@\"."
    if  ! test "${ruleset#${libdir}/}" = active -o inactive; then
        usage
    fi
    exit 0
  fi
  if test "${ruleset#${libdir}/}" = inactive; then
    initd_autosave
  fi
  rm -f "$autosave"
  echo -n "Loading iptables ruleset: load \"$@\""
  $iptables_restore < "$ruleset"
  echo "."
}

initd_counters () {
  if test "${enable_save_counters:-false}" = true; then
    echo -n " with counters"
    $iptables_save -c > "$ruleset"
  else
    $iptables_save | sed '/^:/s@\[[0-9]\{1,\}:[0-9]\{1,\}\]@[0:0]@g' > "$ruleset"
  fi
}

initd_save () {
  rm -f $autosave
  ruleset="${libdir}/$@"
  echo -n "Saving iptables ruleset: save \"$@\""
   initd_counters
  echo "."
}

initd_autosave () {
  if test -f $autosave -a ${enable_autosave-false} = true; then
    ruleset="${libdir}/active"
    echo -n "Autosaving iptables ruleset: save \"active\""
    initd_counters
    echo "."
  fi
}

usage () {
  current="$(ls -m /var/lib/iptables \
    | sed 's/ \{0,1\}autosave,\{0,1\} \{0,1\}//')"
cat << END
$initd options:
  start|restart|reload|force-reload
     load the "active" ruleset
  save <ruleset>
     save the current ruleset
  load <ruleset>
     load a ruleset
  stop
     load the "inactive" ruleset
  clear
     remove all rules and user-defined chains, set default policy to ACCEPT
  halt
     remove all rules and user-defined chains, set default policy to DROP

Saved rulesets:
  $current

Please read: $default

END
}

case "$1" in
  start|restart|reload|force-reload)
    initd_load active
    if test ${enable_autosave-false} = true; then
      touch $autosave
    fi
    ;;
  stop)
    initd_load inactive
    ;;
  clear)
    initd_clear
    ;;
  halt)
    initd_halt
    ;;
  save)
    shift
    initd_save "$@"
    ;;
  load)
    shift
    initd_load "$@"
    ;;
  save_active) #legacy option
    initd_save active
    ;;
  save_inactive) #legacy option
    initd_save inactive
    ;;
  *)
    if test "$@"; then
      echo "Aborting iptables initd: unknown command(s): \"$@\"."
    fi
    usage
    ;;
esac

exit 0

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: apt-get insserv loop errors

#4 Post by bw123 »

There's /etc/init.d/README and /etc/init.d/skeleton and be sure and check man update-rc.d
insserv: warning: script 'S99iptables' missing LSB tags and overrides
insserv: warning: script 'iptables' missing LSB tags and overrides
There are a lot of threads on here about how to implement iptables the debian way, so maybe search around a bit. Good Luck.
resigned by AI ChatGPT

agowa338
Posts: 3
Joined: 2017-01-15 19:34

Re: apt-get insserv loop errors

#5 Post by agowa338 »

You could have said it, but thanks anyway for the hint "to implement iptables the debian way".
For all others stranded here, you do it like that:
1. Remove the iptables init.d script.
2. add the iptables startup command to your /etc/network/interfaces

Code: Select all

iface eth0 inet static
        address 192.0.2.27
        netmask 255.255.255.0
        gateway 192.0.2.254
        pre-up iptables-restore < /etc/iptables.up.rules

iface eth0 inet6 static
    address 2001:DB8::07C0
    netmask 64
    gateway fe80::1
    accept_ra 0
    autoconf 0
    privext 0
    pre-up ip6tables-restore < /etc/ip6tables.up.rules
and if you want to save your iptables rules on shutdown too (what I don't recommend), just add:

Code: Select all

post-down iptables-save > /etc/iptables.up.rules
post-down ip6tables-save > /etc/ip6tables.up.rules
if you want to save iptables you don't run "service iptables save active" but "iptables-save /etc/iptables.up.rules" and "ip6tables-save /etc/ip6tables.up.rules"

Post Reply