[ubuntu-jp:2864] Ubuntu Server 10.04 の起動順

Mitsuru Ogino ogino @ verama.net
2010年 8月 3日 (火) 12:30:17 BST


荻野といいます。

Ubuntu Server 10.04 を使用しようとしていますが、IPv6 を使用したときに、
unbound や bind9 を使用しようとすると、OS 起動時の unbound 等の起動に失
敗するという現象に出会っています。

> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=10.04
> DISTRIB_CODENAME=lucid
> DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"

unbound のメッセージ

> unbound[1357:0] error: can't bind socket: Cannot assign requested address

いったん起動した後に手動で起動する分には問題ありません。


/etc/network/interfaces に、

  iface eth0 inet6 static
    address 2001:xx:xx:200::18

と書いているのですが、どうやら起動時に IPv4 アドレスは有効になっている
が、IPv6 アドレスはまだ有効でないというタイミングで起動されるため、
Listen に失敗しているようです。

で、/etc/rc2.d を見るわけですが、ここにはもはやネットワークの設定をして
いそうなところがありません。

  $ ls -l /etc/rc2.d/
  total 4
  -rw-r--r-- 1 root root 677 2010-03-30 16:17 README
  lrwxrwxrwx 1 root root  15 2010-08-03 18:32 S10sleep -> ../init.d/sleep
  lrwxrwxrwx 1 root root  15 2010-07-09 14:46 S15bind9 -> ../init.d/bind9
  lrwxrwxrwx 1 root root  17 2010-07-12 13:59 S20postfix -> ../init.d/postfix
  lrwxrwxrwx 1 root root  17 2010-07-09 14:44 S20unbound -> ../init.d/unbound
  lrwxrwxrwx 1 root root  15 2010-07-02 15:00 S50rsync -> ../init.d/rsync
  lrwxrwxrwx 1 root root  19 2010-07-02 15:00 S70dns-clean -> ../init.d/dns-clean
  lrwxrwxrwx 1 root root  18 2010-07-02 15:00 S70pppd-dns -> ../init.d/pppd-dns
  lrwxrwxrwx 1 root root  21 2010-07-02 15:00 S99grub-common -> ../init.d/grub-common
  lrwxrwxrwx 1 root root  18 2010-07-02 14:54 S99ondemand -> ../init.d/ondemand
  lrwxrwxrwx 1 root root  18 2010-07-02 14:54 S99rc.local -> ../init.d/rc.local


/etc/init.d/unbound の先頭は

  #!/bin/sh
  
  ### BEGIN INIT INFO
  # Provides:          unbound
  # Required-Start:    $network $remote_fs $syslog
  # Required-Stop:     $network $remote_fs $syslog
  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6
  ### END INIT INFO

で始まっており、network の後に起動するように見えますが、どうもうまくいっ
ていないようです。


とりあえず、/etc/rc2.d 内は順番に実行されるのは間違いなさそうなので、
/etc/rc2.d/S10sleep という名前で sleep 10 を実行するようにすると問題な
く起動するようになりましたが、どうもすっきりしません。

なんとなく upstart が並列起動を試みていてフライングしているような感じに
見えますが、どこを確認すべきとか、どこを修正すべきなど、ご示唆をいただ
ければ助かります。

よろしくお願いいたします。

-- 
荻野 充 (おぎの みつる) ... 「萩(はぎ)」にあらず
Key fingerprint = 7F26 5414 1805 F31B 1617  10B7 C117 07AE 1691 9BD1



ubuntu-jp メーリングリストの案内