/etc/hosts ::1, bind 9, rncd

Eduardo Viruena Silva mrspock at esfm.ipn.mx
Wed Apr 14 05:15:03 PDT 2004



Hello, FreeBSD Gurus!

I have a very strange question for you.

I have two FreeBSD-5.2.1-p4  boxes, i386 & sparc64.

I installed bind-9.3.2 in both computers, configured
my /etc/rc.conf as follows:

named_enable="YES"
named_flags="-u bind"
named_program="/usr/local/sbin/named"

it worked perfectly in my i386 box, particularly rndc worked fine.

Now, in the sparc64 box, I tried:

sparc64:/home/mrspock# rndc reload
rndc: connect failed: connection refused

WHY?   I asked myself, in my i386 box it works fine.

Then I tried:

------------------------
sparc64:/home/mrspock# rndc -V reload
create memory context

... a lot of useful information, and then, this:

using server localhost (::1#953)
create socket
connect
rndc: connect failed: connection refused
------------------------

in my i386 box, the things were different:

------------------------
i386:/home/mrspock# # rndc -V reload
create memory context

... a lot of useful information, and then, this:

using server localhost (127.0.0.1#953)
create socket
connect
create message
render message
schedule recv
send message
parse message
create message
render message
schedule recv
send message
parse message
------------------------

Now, the problem seemed to be that my i386 opened
communication with 127.0.0.1#953, and my sparc64
tried:  ::1#953

Then I remembered that my rndc.conf file  referred
to "localhost".  The i386 converted it to "127.0.0.1"
and the sparc64 to "::1".

And finally, I found that, in /etc/hosts there were
two lines saying:

::1                     localhost
127.0.0.1               localhost

and here I am... driving myself crazy...

WHY DID NOT MY SPARC TAKE THE FIRST LINE
OF localhost IN  /etc/hosts/  AS MY
I386 DID?

To fix it, I just exchange those lines.

Incredible, isn't it?
What happened here?
Should I report this as a bug??

Hope you can give relief by sending me an answer.

Thanks in advance.

	Eduardo.


More information about the freebsd-questions mailing list