1

I'm trying to install Bind 9.9 on Windows Server 2008, but calling "rndc reload" fails with a very strange error message:

PS C:\bind\etc> ..\bin\rndc.exe reload
rndc: error: C:\bind\etc\rndc.conf:1: unknown option ' ■#...'
rndc: error: C:\bind\etc\rndc.conf:5: unknown option ''
rndc: error: C:\bind\etc\rndc.conf:11: unknown option ''
rndc: error: C:\bind\etc\rndc.conf:13: unexpected token near end of file
rndc: could not load rndc configuration

Here's the contents of rndc.conf. I opened the file up in Notepad++ and verified that there are no non-printing characters and the line endings look fine (normal Windows line endings):

# Start of rndc.conf
key "rndc-key" {
    algorithm hmac-md5;
    secret "vP+yTbzcnlq90UFC4GuNCg==";
};

options {
    default-key "rndc-key";
    default-server 127.0.0.1;
    default-port 953;
};
# End of rndc.conf

Here's the contents of named.conf:

# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
    algorithm hmac-md5;
    secret "vP+yTbzcnlq90UFC4GuNCg==";
};

controls {
    inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

For what it's worth, I have gotten Bind and rndc to work properly on Windows 7 following the same installation process. Any ideas what's going on?

2
  • Try using a different editor like gvim, notepad doesn't always accurately display the hidden characters.
    – Eirik Toft
    Mar 27, 2013 at 20:34
  • 4
    I'm trying to install Bind 9.9 on Windows Server 2008 There's your problem. Mar 27, 2013 at 20:35

2 Answers 2

3

Looks like you got a UTF-8 BOM at the beginning of your configuration file. Use a different editor (or editor setting in Notepad++) which doesn't add the BOM (and with which you can strip this one out).

1
  • It was in fact the encoding issue.
    – Nelson
    Mar 28, 2013 at 15:49
2

Check your character encoding; make sure it's at least set to ANSI.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .