MyDNS service does not start upon reboot

Discussion in 'HOWTO-Related Questions' started by atjensen11, Aug 9, 2009.

  1. atjensen11

    atjensen11 New Member

    I used the following tutorial to install ISPConfig3 on Debian Lenny with the necessary services.

    http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3

    I have run into the situation a few times that DNS resolution will fail. After a few occurences, I noticed that the service fails to start upon rebooting the machine. Therefore, it takes a manual action to start the service which rectifies the problem.

    I could easily be user error on my part when creating the init.d scripts. My other theory is that perhaps MyDNS is trying to start before MySQL is up and running which causes a failure.

    I do not have much experience with startup scripts. How can I troubleshoot this problem?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -l /etc/rc3.d/
    ?
     
  3. atjensen11

    atjensen11 New Member

    Here is the output as requested.

    Code:
    [email protected]:~$ ls -l /etc/rc3.d/
    total 4
    -rw-r--r-- 1 root root 556 Aug 12  2008 README
    lrwxrwxrwx 1 root root  18 Jun 24 22:40 S01rc.local -> ../init.d/rc.local
    lrwxrwxrwx 1 root root  17 Jun 24 22:40 S01rsyslog -> ../init.d/rsyslog
    lrwxrwxrwx 1 root root  19 Jun 24 22:40 S01saslauthd -> ../init.d/saslauthd
    lrwxrwxrwx 1 root root  16 Jun 24 22:40 S02amavis -> ../init.d/amavis
    lrwxrwxrwx 1 root root  17 Jun 24 22:40 S02apache2 -> ../init.d/apache2
    lrwxrwxrwx 1 root root  23 Jun 24 22:40 S02clamav-daemon -> ../init.d/clamav-daemon
    lrwxrwxrwx 1 root root  28 Jun 24 22:40 S02courier-authdaemon -> ../init.d/courier-authdaemon
    lrwxrwxrwx 1 root root  22 Jun 24 22:40 S02courier-imap -> ../init.d/courier-imap
    lrwxrwxrwx 1 root root  26 Jun 24 22:40 S02courier-imap-ssl -> ../init.d/courier-imap-ssl
    lrwxrwxrwx 1 root root  21 Jun 24 22:40 S02courier-pop -> ../init.d/courier-pop
    lrwxrwxrwx 1 root root  25 Jun 24 22:40 S02courier-pop-ssl -> ../init.d/courier-pop-ssl
    lrwxrwxrwx 1 root root  14 Jun 24 22:40 S02cron -> ../init.d/cron
    lrwxrwxrwx 1 root root  18 Jun 24 22:40 S02fail2ban -> ../init.d/fail2ban
    lrwxrwxrwx 1 root root  23 Jun 24 22:40 S02mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
    lrwxrwxrwx 1 root root  25 Jun 24 22:40 S02pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql
    lrwxrwxrwx 1 root root  22 Jun 24 22:40 S02spamassassin -> ../init.d/spamassassin
    lrwxrwxrwx 1 root root  13 Jun 24 22:40 S02ssh -> ../init.d/ssh
    lrwxrwxrwx 1 root root  23 Jun 24 22:40 S02stop-bootlogd -> ../init.d/stop-bootlogd
    lrwxrwxrwx 1 root root  26 Jun 24 22:40 S03clamav-freshclam -> ../init.d/clamav-freshclam
    lrwxrwxrwx 1 root root  15 Jun 24 22:40 S03mydns -> ../init.d/mydns
    lrwxrwxrwx 1 root root  19 Jun 24 22:40 S03mysql-ndb -> ../init.d/mysql-ndb
    lrwxrwxrwx 1 root root  15 Jun 24 22:40 S04mysql -> ../init.d/mysql
    lrwxrwxrwx 1 root root  17 Jun 24 22:40 S05postfix -> ../init.d/postfix
    lrwxrwxrwx 1 root root  13 Jun 24 22:40 S15fam -> ../init.d/fam
    lrwxrwxrwx 1 root root  18 Jun 24 22:40 S18quotarpc -> ../init.d/quotarpc
    lrwxrwxrwx 1 root root  19 Jun 24 22:40 S19rmnologin -> ../init.d/rmnologin
    lrwxrwxrwx 1 root root  19 Aug  5 13:20 S20dkimproxy -> ../init.d/dkimproxy
    lrwxrwxrwx 1 root root  13 Jun 25 12:32 S23ntp -> ../init.d/ntp
    lrwxrwxrwx 1 root root  18 Jun 25 21:54 S99webmin -> /etc/init.d/webmin
    
    Again, I don't know a lot about startup scripts. But it appears that Linux often processes folders in a top down fashion. If that logic applies here, it looks as though the MyDNS script would be processed prior to the MySQL script. Perhaps my theory was correct?

    It also appears that the symlinks are created using a S## prefix to order their priority within this listing. If the MyDNS script has to be given a lower priority, how does one go about doing that? Do you manually create the symlink with a new name? Are there command line commands that handle the creation, deletion, and re-prioritization of this directory?

    Thanks.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Try this:
    Code:
    cd /etc/rc3.d/
    mv S03mydns S99mydns
     
  5. atjensen11

    atjensen11 New Member

    Falko,

    Thanks for the help. I figured that I could rename the link as you suggested. I just thought there was probably a more "elegant" or "correct" way of updating the startup scripts.

    I am still learning, but am pleased that it appears I may have correctly diagnosed the problem in my original post.
     
  6. atjensen11

    atjensen11 New Member

    This fix appeared to work initially, but I still have issues where MyDNS does not start up after rebooting the server. Is there another RC directory where I need to change the order of startup scripts? I noticed in other directories, such as rc.6, the MyDNS script starts up before MySQL. In the rc.6 directory, the links start with the letter K rather than S. Again, I don't have a firm understanding of start up scripts or RC directories.
     
  7. falko

    falko Super Moderator ISPConfig Developer

    You can rename the link in all rc directories.
     

Share This Page