Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Help a newbie? - BIND Problem

Discussion in 'Bind/DNS/Nameserver' started by griz, Mar 11, 2002.

  1. griz

    griz Well-Known Member

    Joined:
    Dec 29, 2001
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    306
    similar problem:

    http://support.cpanel.net/obb/read.php?TID=1715

    My Problem:

    - BIND does not appear to be running. I have changed the nameserver in the resolv.conf file to 127.0.0.1, and I can now use cpanel by using an external nameserver, but I will need this server to have it's own nameserver running. I get a message that NDC will not connect, and ndc reload does not work. when I run ndc reload I get the following:

    root@a1 [/home]# ndc reload
    ndc: connect: connection refused
    root@a1 [/home]#

    When I run an nslookup, I get the following:

    root@a1 [/home]# nslookup hiexpress-fortuna.com
    Note: nslookup is deprecated and may be removed from future releases.
    Consider using the `dig' or `host' programs instead. Run nslookup
    with
    the `-sil[ent]' option to prevent this message from appearing.
    ;; connection timed out; no servers could be reached

    - For the life of me, I can't figure out how to set up my main ip account, which should be lin2.a1webserver.com

    - ipusage is not working either. The &SHOW IP ADRESS USAGE& tool in WHM gives the following
    output:

    --Invalid argument at /scripts/ipusage line 33.--

    - PROFTPD is hung. I find the following entry in /var/log/messages:

    Mar 11 01:16:03 a1 proftpd: a1.fds.lightone.net - Fatal: unable to determine IP address of `a1.fds.lightone.net'.

    and when I attempt to reload proftpd I get the following message:

    root@a1 [/var/log]# /etc/rc.d/init.d/proftpd restart
    Hangup


    Possibly but doubtfully related problem?: While setting up new accounts, the domain name 'hudson-les.com' was mistakenly entered as '89 hudson-les.com'. This pulled down apache until I edited httpd.conf and found the error. note - there is no entry for this domain in /etc/proftpd.conf because it is name-based.

    Can anyone help with this? Thanks in advance!

    Griz
     
  2. zex

    zex Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    306
    cPanel Access Level:
    Root Administrator
    First ensure that dns is running.
    Try ndc restart if you have bind 8 (redhat 6.x)
    For red hat 7.x /etc/rc.d/init.d/named restart
    If your named server does not start go to /var/log/messages
    and check errors from bind.
    Then fix errors :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. griz

    griz Well-Known Member

    Joined:
    Dec 29, 2001
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    306
    re:

    Thanks for the reply.

    my /etc/rc.d/init.d/ directory doesn't have named. when doing a locate command, I found 'named' files at the following locations:

    /usr/sbin/named

    when I run /usr/sbin/named stop I get the following output:

    root@a1 # /usr/sbin/named stop
    usage: named [-c conffile] [-d debuglevel] [-f|-g] [-n number_of_cpus]
    [-p port] [-s] [-t chrootdir] [-u username]
    named: extra command line arguments
     
  4. zex

    zex Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    306
    cPanel Access Level:
    Root Administrator
    This down is /etc/rc.d/init..d/named file :)
    put all this in that file.
    And use it for starting and restarting named...
    something like /etc/rc.d/init.d/named restart
    Dont forgot to put chmod 755 on /etc/rc.d/init.d/named
    Actualy the best solution is to reinstall bind, but you can use also this.

    You can also use ps -aux|grep bind to track PID
    and then kill -HUP PID to reload it.
    Then check /var/log/messages

    If you have still problems conntact me on e-mail.

    #!/bin/bash
    #
    # named This shell script takes care of starting and stopping
    # named (BIND DNS server).
    #
    # chkconfig: - 55 45
    # description: named (BIND) is a Domain Name Server (DNS) \
    # that is used to resolve host names to IP addresses.
    # probe: true

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    [ &${NETWORKING}& = &no& ] && exit 0

    [ -f /etc/sysconfig/named ] && . /etc/sysconfig/named

    [ -f /usr/sbin/named ] || exit 0

    [ -f /etc/named.conf ] || exit 0

    RETVAL=0
    prog=&named&

    start() {
    # Start daemons.
    if [ -n &`/sbin/pidof named`& ]; then
    echo -n $&$prog: already running&
    return 1
    fi
    echo -n $&Starting $prog: &
    if [ -n &${ROOTDIR}& -a &x${ROOTDIR}& != &x/& ]; then
    OPTIONS=&${OPTIONS} -t ${ROOTDIR}&
    fi
    # Since named doesn't return proper exit codes at the moment
    # (won't be fixed before 9.2), we can't use daemon here - emulate
    # its functionality
    base=$prog
    named -u named ${OPTIONS}
    RETVAL=$?
    usleep 100000
    if [ -z &`/sbin/pidof named`& ]; then
    # The child processes have died after fork()ing, e.g.
    # because of a broken config file
    RETVAL=1
    fi
    [ $RETVAL -ne 0 ] && failure $&$base startup&
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named && success $&$base startup&
    echo
    return $RETVAL
    }
    stop() {
    # Stop daemons.
    echo -n $&Stopping $prog: &
    killproc named
    RETVAL=$?
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
    echo
    return $RETVAL
    }
    rhstatus() {
    # FIXME: use this once it's implemented
    # /usr/sbin/rndc status
    # return $?
    PIDS=`/sbin/pidof named`
    if [ -z &$PIDS& ]; then
    echo $&$prog not running.&
    return 1
    else
    echo $&$prog is running, PIDs: $PIDS.&
    return 0
    fi
    }
    restart() {
    stop
    start
    }
    reload() {
    /usr/sbin/rndc reload &/dev/null 2&&1 || /usr/bin/killall -HUP named
    return $?
    }
    probe() {
    # named knows how to reload intelligently; we don't want linuxconf
    # to offer to restart every time
    /usr/sbin/rndc reload &/dev/null 2&&1 || echo start
    return $?
    }

    # See how we were called.
    case &$1& in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
    rhstatus
    ;;
    restart)
    restart
    ;;
    condrestart)
    [ -f /var/lock/subsys/named ] && restart
    ;;
    reload)
    reload
    ;;
    probe)
    probe
    ;;
    *)
    echo $&Usage: $0 {start|stop|status|restart|condrestart|reload|probe}&
    exit 1
    esac

    exit $?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. albertg

    albertg Well-Known Member
    PartnerNOC

    Joined:
    Sep 4, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    156
    I have no prob restarting named but i think something is wrong..../etc/hosts and resolv.conf is setup correctly i believe.

    Is there any other place i should check?

    Thanks in advance.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice