SUMMARY: rpc.bootparamd: bp_getclntent failed

From: Bill Reynolds (breynolds@ucsd.edu)
Date: Wed Jul 17 1991 - 07:25:44 CDT


My original question:

>We're trying to get some diskless Sun3/110s up as clients to a
>Sun3/280 (?) fileserver. We installed the client software using
>setup_exec (under SunOS4.0.3), and then used setup_client to add the
>client. The 3/110's will rarp and boot tftp with tftp, but when they
>try to mount root, they hang, after 20 minutes or so dying, claiming
>they can't talk to the bootparam daemon. We fired up rpc.bootparamd
>with the -d option and got the following error:
>
>bp_getclntent failed

I got a lot of good stuff on this one, the trick turned out to be to
specify the clients full name "venus.ucsd.edu" in the bootparams map
instead of the system generated "venus". Others suggested to modify
the hosts map s.t. "venus" would be a recognized name (which didn't
help us, since we use a nameserver). I got a summary of a previous
post from Andrew Luebker that had some good stuff, including a long
bug report on bootparamd on the sgi which I did not include. If
anyone is interested, I'd be happy to send it along. Casper Dik sent
along a nice program to listen in on the boot process, and I've
included it below. Thanks to:

howell@themoon.NYU.EDU (Andy Howell)
era@niwot.scd.ucar.EDU (Ed Arnold)
bks@okeeffe.Berkeley.EDU (Brian K. Shiratsuki)
Mike Raffety <oconnor!miker@oddjob.uchicago.edu>
casper@fwi.uva.nl (Casper H.S. Dik)
sdo@phoebus.larc.nasa.gov (Sharon O. Beskenis)
rodney@snowhite.cis.uoguelph.ca (barking at airplanes)
Andrew Luebker <aahvdl@sunserver.psych.umn.edu>

From: sdo@phoebus.larc.nasa.gov (Sharon O. Beskenis)
To: breynolds@ucsd.edu
Subject: Re: rpc.bootparamd: bp_getclntent failed.
Date: Tue, 16 Jul 91 09:23:36 EDT

There seems to be a problem when the fully qualified domain name is not used
in the /etc/bootparams file. Try the following:

venus.ucsd.edu root=server_name:/export/root/venus\
      swap=server_name:/export/swap/venus

Hopefully, this is your problem.

Sharon Beskenis

From: rodney@snowhite.cis.uoguelph.ca (barking at airplanes)
To: breynolds@ucsd.edu
Subject: Re: rpc.bootparamd: bp_getclntent failed.
Date: Tue, 16 Jul 91 08:47:01 -0500

The error message "bp_getclntent" is the boot param get client entry error.
This means that it could not find an entry in the NIS map for the client
by the name that the client was giving. This is usually a result of how the
"hosts" file has been arranged. If you added "venus" as a client and in the
hosts file venus is an alternate name (i.e.:
100.20.30.40 venus.inls1.ucsd.edu venus
)
Then what you need to do is either switch the order in the hosts file (it
doesn't seem to affect other functions) or spec the first name on the
line in the hosts file (i.e. venus.inls1.ucsd.edu) in the add_client function.
Remake the NIS maps again.
-Rodney Ruddock

rodney@snowhite.cis.uoguelph.ca
Department of Computing and Information Science
University of Guelph Sun & NeXT Admin.
Guelph, Ontario ph#: (519)824-4120 x8136,x4297
CANADA fax: (519)837-0323
N1G 2W1

From: ernie@usurp.Calvin.EDU (Ernie Brouwer)
Message-Id: <9106201242.AA26962@usurp.Calvin.EDU>
To: aahvdl
Subject: Re: bootparamd problems
Status: R

bp_getclntent failed means that the bootparamd couldn't find an entry in its
/etc/bootparams file for your machine.

I've had that too and for me the fix was to make sure that the following
references to the client's host name are all _identical_:

its entry in /etc/hosts
its entry in /etc/ethers
its entry(ies) in /etc/bootparams
its entry(ies) in /etc/exports

At our site, add_client will do everything ok but since we use DNS and not
NIS (YP), rarp returns umachine.calvin.edu as the hostname. This does not
_exactly_ match the entries add_client makes which refer to the machine as
umachine

Hope this helps. Feel free to inquire further if necessary.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Ernest D. Brouwer Internet: ernie@calvin.edu |
| Unix Systems Administrator uucp: uunet!Calvin.EDU!ernie |
| Calvin College & Seminary phone: (616) 957-8548 |
| fax: (616) 957-8551 |
| USnail: 3201 Burton SE. |
| Grand Rapids, MI 49546-4388 |
| "Yes I'm on a Sun, and Yes, I do 8MHz NeXT voicemail" (try it :-) |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: stern@sunne.East.Sun.COM (Hal Stern - Consultant)
Message-Id: <9106211529.AA03038@sunne.East.Sun.COM>
To: aahvdl
Subject: Re: bootparamd problems
Status: R

looks like the system running rpc.bootparamd has no information
for this client. the client will ask for info by hostname,
so make sure that your /etc/ethers file/map has the right
ether -> hostname mapping, and that /etc/hosts also has the right
IP -> hostname mapping.

then, obviously, check out /etc/bootparam for the client that's
failing to boot. you can use
>b -v
to see what name/address/servers the client is using while booting.

--hal stern
  sun microsystems
  northeast area consulting group

From: casper@fwi.uva.nl (Casper H.S. Dik)
To: breynolds@ucsd.edu
Subject: Re: rpc.bootparamd: bp_getclntent failed.
Date: Tue, 16 Jul 91 09:44:39 +0200

This simply indicates that bootparamd can't find the entry for
your host in de bootparam map (or /etc/bootparams). This often happens
if the bootparam entry uses the not fully qualified domain name, but the
bootparam server does.

To find out whether this is the case, you must do a reverse query with
the address of the client.

The following program might help.

Casper
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: Makefile README boot.shar boottest.c
# Wrapped by casper@fwi.uva.nl on Tue Jul 16 09:44:08 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(16 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
XLDLIBS=-lrpcsvc
END_OF_FILE
if test 16 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'README' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(376 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
XBoottest does some consistency checking on the bootparams for a specific
Xclient.
X
XIt first calls BOOTPARAMS_WHOAMI. The name returned by this call must
XEXACTLY match the name specified in /etc/bootparams.
X
XIf things go wrong, it is often the case that the clients queries
Xthe parameters with its fully qualified domain name, when the
Xbootparam map only lists the short name.
END_OF_FILE
if test 376 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'boot.shar' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'boot.shar'\"
else
echo shar: Extracting \"'boot.shar'\" \(0 characters\)
sed "s/^X//" >'boot.shar' <<'END_OF_FILE'
END_OF_FILE
if test 0 -ne `wc -c <'boot.shar'`; then
    echo shar: \"'boot.shar'\" unpacked with wrong size!
fi
# end of 'boot.shar'
fi
if test -f 'boottest.c' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'boottest.c'\"
else
echo shar: Extracting \"'boottest.c'\" \(3223 characters\)
sed "s/^X//" >'boottest.c' <<'END_OF_FILE'
X/*
X * Program meant to print bootparam responses for a specific host
X * Just a test of the bootparam service
X *
X * By Casper H.S. Dik, casper@fwi.uva.nl
X */
X
X#include <sys/types.h>
X#include <sys/param.h>
X#include <sys/socket.h>
X#include <netinet/in.h>
X#include <arpa/inet.h>
X#include <rpc/rpc.h>
X#include <rpcsvc/bootparam.h>
X#include <rpc/pmap_clnt.h>
X#include <stdio.h>
X#include <netdb.h>
X
Xbool_t check_result();
Xbool_t check_fresult();
Xstatic char resulthost[MAX_MACHINE_NAME];
Xchar *strcpy();
X
Xmain(argc,argv)
Xint argc;
Xchar **argv;
X{
X bp_whoami_res result;
X bp_whoami_arg arg;
X bp_getfile_res fresult;
X bp_getfile_arg farg;
X
X arg.client_address.address_type = IP_ADDR_TYPE;
X
X if (argc <= 1) {
X fprintf(stderr,"Usage: %s host ...\n",*argv);
X exit(1);
X }
X while(*++argv) {
X long hostip;
X struct hostent *host, *gethostbyname();
X
X hostip = inet_addr(*argv);
X if (hostip == -1) {
X host = gethostbyname(*argv);
X if (!host) {
X fprintf(stderr,"%s: no such host\n",*argv);
X continue;
X }
X bcopy(host->h_addr_list[0],
X (caddr_t)&arg.client_address.bp_address.ip_addr,
X host->h_length);
X } else
X bcopy((caddr_t)&hostip,
X (caddr_t)&arg.client_address.bp_address.ip_addr,
X sizeof(arg.client_address.bp_address.ip_addr));
X
X resulthost[0] = 0;
X printf("Calling bootparam - whoami for %s:\n", *argv);
X bzero(&result,sizeof(result));
X clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS, BOOTPARAMPROC_WHOAMI,
X xdr_bp_whoami_arg, &arg, xdr_bp_whoami_res, &result, check_result);
X
X if (resulthost[0]) {
X printf("Calling bootparam - getfile(root) for %s:\n", resulthost);
X bzero(&fresult,sizeof(fresult));
X farg.file_id = "root";
X farg.client_name = resulthost;
X clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS, BOOTPARAMPROC_GETFILE,
X xdr_bp_getfile_arg, &farg, xdr_bp_getfile_res, &fresult,
X check_fresult);
X }
X }
X exit(0);
X}
X
Xbool_t check_result(resultsp, raddr)
Xcaddr_t resultsp;
Xstruct sockaddr_in *raddr;
X{
X static times;
X bp_whoami_res *res = (bp_whoami_res *) resultsp;
X struct hostent *thehost, *gethostbyaddr();
X
X thehost = gethostbyaddr(&raddr->sin_addr,sizeof(raddr->sin_addr),AF_INET);
X printf(" response: %s from %s\n",
X *res->client_name ? res->client_name : "<ERROR-empty string>",
X thehost ? thehost->h_name : inet_ntoa(raddr->sin_addr));
X
X if (! resulthost[0]) {
X times = 1;
X if(*res->client_name) strcpy(resulthost,res->client_name);
X } else
X if (*res->client_name && ++times > 2) return TRUE;
X
X return FALSE;
X}
X
Xbool_t check_fresult(resultsp, raddr)
Xcaddr_t resultsp;
Xstruct sockaddr_in *raddr;
X{
X bp_getfile_res *res = (bp_getfile_res *) resultsp;
X struct hostent *thehost, *gethostbyaddr();
X
X thehost = gethostbyaddr(&raddr->sin_addr,sizeof(raddr->sin_addr),AF_INET);
X if (*res->server_name) {
X printf(" reply: server=%s, root=%s from %s\n",
X res->server_name,
X *res->server_path ? res->server_path : "<ERROR-empty string>",
X thehost ? thehost->h_name : inet_ntoa(raddr->sin_addr));
X return TRUE;
X } else
X printf(" empty reply from %s\n",
X thehost ? thehost->h_name : inet_ntoa(raddr->sin_addr));
X
X return FALSE;
X}
END_OF_FILE
if test 3223 -ne `wc -c <'boottest.c'`; then
    echo shar: \"'boottest.c'\" unpacked with wrong size!
fi
# end of 'boottest.c'
fi
echo shar: End of shell archive.
exit 0

--
_______________________________________________________________________
	"Dignity, always Dignity."		|  Bill Reynolds
	  			-Don Lockwood   |  bill@inls1.ucsd.edu



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:20 CDT