Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    222
    cPanel/Enkompass Access Level

    Root Administrator

    Default DNS Server Syntax Error

    Hi,

    In my new Cpanel server (FreeBSD 5.4) i get error on starting BIND.

    named has failed, please contact the sysadmin (result was "named is not running").
    Sep 16 13:32:45 server20 named[5792]: starting BIND 9.3.1 -u bind -c /etc/namedb/named.conf -t /var/named
    Sep 16 13:32:45 server20 named[5792]: /etc/namedb/named.conf:2: syntax error near '{'
    Sep 16 13:32:45 server20 named[5792]: loading configuration: unexpected token
    Sep 16 13:32:45 server20 named[5792]: exiting (due to fatal error)
    This is new server, no domains hosted, but named seems down.

    content of named are

    include "/etc/namedb/rndc.key";
    {
    algorithm hmac-md5;
    secret "/f19YLO40Zgd8Yui5Jxspw==";
    };


    controls {
    inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    };
    /scripts/fixrndc gives



    !! fixrndc requires a syntactically correct /etc/namedb/named.conf.
    !! No changes were made to /etc/namedb/named.conf. Problem was:
    !! /etc/namedb/named.conf:2: syntax error near '{'
    How do i correct this ?

    Regards,

    Annie Steephan

  2. #2
    Member
    Join Date
    Jul 2003
    Posts
    5

    Default

    Same problem here.

  3. #3
    Member
    Join Date
    Apr 2003
    Location
    Denver, CO
    Posts
    294

    Default

    Lines cannot begin with {

    Here is an example of how mine looks:

    Code:
    //
    // named.conf for Red Hat caching-nameserver
    //
     key "rndc-key" {
           algorithm hmac-md5;
           secret "25AtCNQJNCih14txC/77cQ==";
    };
    
    controls {
           inet 127.0.0.1 port 953
                   allow { 127.0.0.1; } keys { "rndc-key"; };
    };
    
    options {
            directory "/var/named";
            dump-file "/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            /*
             * If there is a firewall between you and nameservers you want
             * to talk to, you might need to uncomment the query-source
             * directive below.  Previous versions of BIND always asked
             * questions using port 53, but BIND 8.1 uses an unprivileged
             * port by default.
             */
             query-source address * port 53;
    };

  4. #4
    Member
    Join Date
    Apr 2003
    Location
    Denver, CO
    Posts
    294

    Default

    Quote Originally Posted by flashweb
    Hi,

    In my new Cpanel server (FreeBSD 5.4) i get error on starting BIND.



    This is new server, no domains hosted, but named seems down.

    content of named are



    /scripts/fixrndc gives




    How do i correct this ?

    Regards,

    Annie Steephan
    Also, it appears you are trying to include the server key file, but then specifying it on the next line...which won't work, again refer to my example above.

Similar Threads & Tags
Similar threads

  1. Parse error: syntax error, unexpected T_ECHO
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-03-2009, 04:58 AM
  2. syntax error
    By hassnetwork in forum New User Questions
    Replies: 3
    Last Post: 01-18-2006, 09:09 AM
  3. Microsoft disables user:pass@server causing Invalid Syntax Error
    By hostultra in forum cPanel and WHM Discussions
    Replies: 23
    Last Post: 12-01-2004, 03:20 AM
  4. syntax error in X theme
    By mikeyskona in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-05-2004, 02:06 AM
  5. MySQL syntax error HELP!
    By MscLimp in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-15-2003, 02:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube