\i Cannot find parent NetInfo server, still looking
\i0 ” when I boot my system?\
\
A: If
\b localhost
\b0 is not in the
\f1 /etc/hosts
\f0 file, NetInfo will not run correctly. Likewise, if the local domain's
\b /machines
\b0 directory is not correctly set up, NetInfo will not run correctly. The
\i Cannot connect to parent NetInfo server
\i0 message is one possible symptom of these things.\
\
The
\i flat file
\i0
\f1 /etc/hosts
\f0
\b must, must, must
\b0 contain the line\
\
\f1 127.0.0.1 localhost\
\f0 \
In addition, the local domain's
\b /machines
\b0 directory should contain directories for
\b localhost
\b0 and for
\b broadcasthost
\b0 . The localhost directory should have the value
\b 127.0.0.1
\b0 for the
\b ip_address
\b0 property; the
\b broadcasthost
\b0 directory's
\b ip_address
\b0 property should have the value
\b 255.255.255.255
\b0 .\
\
In addition,
\b localhost
\b0 should have a
\b serves
\b0 property with the value
\b ./local
\b0 and
\b broadcasthost
\b0 should have a
\b serves
\b0 property with the value
\b ../network
\b0 . After this is set up correctly,
\f1 niutil(1)
\f0 should show the following:\
\
\f1 #
\b niutil -read . /machines/localhost
\b0 \
name: localhost\
ip_address: 127.0.0.1\
serves: ./local\
#
\b niutil -read . /machines/broadcasthost
\b0 \
name: broadcasthost\
ip_address: 255.255.255.255\
serves: ../network\
\f0 \
Note that the
\f1 nidump(1)
\f0 command will NOT show all of this, and
\f1 niload(1)
\f0 will NOT set this all up correctly (the
\b serves
\b0 property will be missing).
\b\i It is essential that NetInfoManager or
\f1 niutil(1)
\f0 be used.
\b0\i0 Another possible mistake might be in the NetManager settings, stored in
\f1 /etc/hostconfig
\f0 . Ensure that, especially, the
\f1\b HOSTNAME
\f0\b0 and the
\f1\b INETADDR
\f0\b0 lines are correct.\
\
It could also be that the
\i Cannot connect to parent NetInfo server
\i0 message is the result of “normal” operation. If you see this message, don't get nervous until twenty minutes have gone by and the child netinfo domain is still looking for its parent. When a configuration server boots, one might need to wait up to twenty minutes (at least, that's the longest we've ever seen it take) before connecting to the “parent” server.\
\
The issue is that
\f1 netinfod(8)
\f0 checks the NetInfo database when it fires up. If the database is small (e.g., the database for the
\b local
\b0 domain), this won't take long. If the database is big, this can take a long time. The lower-level
\f1 netinfod
\f0 process (the one for
\b local
\b0 , e.g.) will try to connect to the parent domain's daemon, and won't be able to, because the parent domain's daemon is still checking the database, and not responding to queries. So, just wait.\
\
Now, if twenty minutes goes by and the connection is still not established, it's likely that something else is wrong. Ensure that the network is OK. For example, if this is the top-level server, and it serves all appropriate domains, take it off the main net, and hook up an empty net (a doubly-terminated T connector). Power up. What happens? If things are fine now, but not when on the main net, the problem is in the main net (cables, for example).\
\
Another tack to take is to boot single user, and run
\f1 /etc/rc
\f0 by hand. Check the messages from the NetInfo system. NOTE: after doing this,
\b HALT THE SYSTEM
\b0 .
\b\i DO NOT continue to multi-user start-up
\b0\i0 -- the daemons will be started twice this way, and things may get horribly mucked up.\