# ypbind : RPC problems

## pmatos

Hi all,

I've just done an emerge -uDp world and I broke some network stuff. When I run the startup ypbind script I get "NIS Domain Not Found" and the following shows up in the logs:

ypbind: broadcast: RPC: Unable to send.

Any ideas what this might be about? Somehow it doesn't seem to be about ypbind since at least yp.conf is ok. Any ideas?

Cheers,

----------

## Raffi

A recent change to the startup files now sets the nis domain name in the file /etc/nisdomainname.  Put your nis domain name in that file and restart domainname and ypbind.

----------

## pmatos

 *Raffi wrote:*   

> A recent change to the startup files now sets the nis domain name in the file /etc/nisdomainname.  Put your nis domain name in that file and restart domainname and ypbind.

 

Hi, thanks for your suggestion. However, I already had nisdomainname already set so I still get:

```
auriga ~ #  /etc/init.d/domainname restart

 * Setting NIS domainname to sat ...                                      [ ok ] * Setting DNS domainname to sat ...                                      [ ok ]auriga ~ # /etc/init.d/ypbind restart

 * Starting ypbind ...

 * No NIS server found                                                    [ !! ]
```

Do you have any more ideas why this would happen? 

Cheers,

----------

## Raffi

What does your /etc/yp.conf look like? Do you get your ip from dhcp? If so, you might want to add the -Y option to keep dhcp from overwriting that file.

----------

## pmatos

 *Raffi wrote:*   

> What does your /etc/yp.conf look like? Do you get your ip from dhcp? If so, you might want to add the -Y option to keep dhcp from overwriting that file.

 

My yp.conf is:

```
auriga ~ # cat /etc/yp.conf

ypserver 146.193.36.1
```

Where 146.193.36.1 is sat:

```
auriga ~ # ping sat

PING sat (146.193.36.1) 56(84) bytes of data.

64 bytes from sat (146.193.36.1): icmp_seq=1 ttl=64 time=0.192 ms

64 bytes from sat (146.193.36.1): icmp_seq=2 ttl=64 time=0.095 ms
```

```
auriga ~ # cat /etc/hosts

127.0.0.1       localhost

146.193.36.9    caelum.inesc-id.pt caelum caelum.inesc.pt

146.193.36.1 sat sat.inesc-id.pt

(...)
```

----------

## Raffi

That yp.conf does not look like mine does. Try something like

domain yourdomain broadcast

or

domain yourdomain server 146.193.36.1

----------

## pmatos

 *Raffi wrote:*   

> That yp.conf does not look like mine does. Try something like
> 
> domain yourdomain broadcast
> 
> or
> ...

 

Still doesn't work... Any way to get more information from the logs than this?

```
Nov 27 03:18:43 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:44 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:45 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:46 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:47 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:48 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:49 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:50 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:18:51 auriga rc-scripts: No NIS server found

Nov 27 03:18:57 auriga ypbind[10381]: broadcast: RPC: Unable to send.

Nov 27 03:19:17 auriga ypbind[10381]: broadcast: RPC: Unable to send.
```

----------

## Raffi

Sounds like portmap is not working right. It should have started automatically before ypbind, but make sure it is running. If you watch the network with tcpdump, do you see any traffic?

----------

## pmatos

 *Raffi wrote:*   

> Sounds like portmap is not working right. It should have started automatically before ypbind, but make sure it is running. If you watch the network with tcpdump, do you see any traffic?

 

```
auriga ~ # /etc/init.d/portmap restart

 * Saving portmap table ...                                      [ ok ] 

 * Stopping famd ...                                             [ ok ]

 * Stopping NFS mountd ...                                       [ ok ]

 * Stopping NFS daemon ...                                       [ ok ]

 * Stopping NFS statd ...                                        [ ok ]

 * Stopping portmap ...                                          [ ok ]

 * Starting portmap ...                                          [ ok ]

 * Reloading portmap table ...                                   [ ok ]

 * Starting famd ...

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound                              [ ok ]

 * Starting NFS statd ...                                        [ ok ]

 * Exporting NFS directories ...                                 [ ok ]

 * Starting NFS daemon ...                                       [ ok ]

 * Starting NFS mountd ...

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound

YPBINDPROC_DOMAIN: Domain not bound                              [ ok ]
```

```
Nov 27 03:43:28 auriga rpc.mountd: Caught signal 15, un-registering and exiting.Nov 27 03:43:28 auriga nfsd: last server has exited

Nov 27 03:43:28 auriga nfsd: unexporting all filesystems

Nov 27 03:43:28 auriga rpc.statd[10268]: Caught signal 15, un-registering and exiting.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga rpc.statd[14110]: Version 1.0.6 Starting

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.

Nov 27 03:43:31 auriga ypbind[10377]: broadcast: RPC: Unable to send.
```

----------

## Raffi

I'm about out of ideas. Here's the version I have running

net-nds/ypbind-1.17.2-r1

Restarting yp does not leave any log messages, so I guess it is one of those programs where no news is good news. You did not mention if you saw any traffic with tcpdump.

Did use the ypdomainname command to make sure the domain was properly set while ypbind was running? It is interesting that you are trying to bind to a particular server, yet the syslog messages talk about broadcast. What is your broadcast address set to?

----------

## pmatos

Same ypbind version here. What's your portmap version? 

```

auriga ~ # ypdomainname

sat
```

Seems OK.

Broadcast address, hummm, where can I find that? Probably that's it. With this new version of net.* scripts my /etc/conf.d/net script is empty so it is being set up by the gentoo scripts incorrectly! Can it be? Where can I check that?

Didn't have tcpdump emerged... emerging now!

Cheers,

Paulo Matos

 *Raffi wrote:*   

> I'm about out of ideas. Here's the version I have running
> 
> net-nds/ypbind-1.17.2-r1
> 
> Restarting yp does not leave any log messages, so I guess it is one of those programs where no news is good news. You did not mention if you saw any traffic with tcpdump.
> ...

 

----------

## Raffi

The output of ifconfig will show the the current ip, netmask and broadcast address.

----------

## pmatos

 *Raffi wrote:*   

> The output of ifconfig will show the the current ip, netmask and broadcast address.

 

Set up with dhcp so it's probably OK.

```
auriga ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:00:00:21:4D:39

          inet addr:146.193.36.7  Bcast:255.255.36.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:43346 errors:0 dropped:0 overruns:0 frame:0

          TX packets:20727 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:30776523 (29.3 Mb)  TX bytes:3301079 (3.1 Mb)

          Interrupt:11 Base address:0xd000
```

```
auriga ~ # ping 255.255.36.255

connect: Invalid argument
```

----------

## Raffi

That is definitely not a good broadcast address. In your case, it should be 146.193.36.255. That must be what is going on.

You can override what dhcp gave you by doing

ifconfig eth0 broadcast 146.193.36.255

and then try ypbind again.

----------

## pmatos

 *Raffi wrote:*   

> That is definitely not a good broadcast address. In your case, it should be 146.193.36.255. That must be what is going on.
> 
> You can override what dhcp gave you by doing
> 
> ifconfig eth0 broadcast 146.193.36.255
> ...

 

Hi, for some reason that doesn't seem to be the problem. I am still not able to start ypbind correctly. Same  "No NIS Server Found" error! I have some other clients with the same broadcast and all seem to work ok. Any more ideas? I'm just getting crazy...  :Sad: 

----------

## Raffi

Can you do a broadcast ping?

ping -b 146.193.36.255

I'm trying to think of what other program does broadcasts. Since all the yp stuff looks good, it seems likely to be something different on that system.

----------

## pmatos

 *Raffi wrote:*   

> Can you do a broadcast ping?
> 
> ping -b 146.193.36.255
> 
> I'm trying to think of what other program does broadcasts. Since all the yp stuff looks good, it seems likely to be something different on that system.

 

```
auriga ~ # ping -b 146.193.36.255

WARNING: pinging broadcast address

PING 146.193.36.255 (146.193.36.255) 56(84) bytes of data.

64 bytes from 146.193.36.7: icmp_seq=1 ttl=64 time=0.034 ms

64 bytes from 146.193.36.1: icmp_seq=1 ttl=64 time=0.237 ms (DUP!)

64 bytes from 146.193.36.3: icmp_seq=1 ttl=64 time=0.271 ms (DUP!)

64 bytes from 146.193.36.4: icmp_seq=1 ttl=64 time=0.282 ms (DUP!)

64 bytes from 146.193.36.254: icmp_seq=1 ttl=64 time=0.292 ms (DUP!)

(...)
```

The problem is that changing the broadcast address to this one makes me lose my net connection.

----------

## Raffi

OK. That's odd. What happens when you ping or ping -b 255.255.36.255? I really would not expect that to work, it is not what the broadcast address should be.

----------

## pmatos

 *Raffi wrote:*   

> Can you do a broadcast ping?
> 
> ping -b 146.193.36.255
> 
> I'm trying to think of what other program does broadcasts. Since all the yp stuff looks good, it seems likely to be something different on that system.

 

Can't even call ypwhich:

```
auriga ~ # ypwhich

can't yp_bind: Reason: Domain not bound
```

Do you know what this means?

----------

## Raffi

Yep. Means ypbind could not bind to the domain.   :Smile:   Not much information there that you did not already know.

----------

## pmatos

 *Raffi wrote:*   

> Yep. Means ypbind could not bind to the domain.    Not much information there that you did not already know.

 

Is this what one would expect:

 *Quote:*   

> auriga ~ # /etc/init.d/ypbind status
> 
>  * status:  stopped
> 
> auriga ~ # rpcinfo -p localhost
> ...

 

----------

## Raffi

That looks about right.

----------

## pmatos

 *Raffi wrote:*   

> That looks about right.

 

 :Sad: 

Weird... Well, I think when I get this working I won't do emerge -uD world so often... Can't imagine what broke the configuration. Well, I think I'll try posting on the mailing list. Thanks a lot for your help.

Cheers,

----------

## pmatos

Damn it, I just don't know what to do...  :Sad:  I can't even post to the ML since I can't check mail due to some ISP problems. 

Any more ideas from anyway? (crazy ideas accepted).

----------

## Raffi

At least you still have an ISP. The satellite I was using died on Sunday.    :Sad:   As a result, I can only see these forums from work.

Anyway,  are you able to change your dhcp server to serve out a correct broadcast to all your machines? Is your current yp.conf set to do a host or a broadcast? Not sure were you left it since we did try a few things.

----------

## pmatos

 *Raffi wrote:*   

> At least you still have an ISP. The satellite I was using died on Sunday.     As a result, I can only see these forums from work.
> 
> Anyway,  are you able to change your dhcp server to serve out a correct broadcast to all your machines? Is your current yp.conf set to do a host or a broadcast? Not sure were you left it since we did try a few things.

 

Right now I have ypserver <ipaddress of sat>

The problem is I have about 9 other computers connected to sat that work so the problem is with some configuration in this computer. yp.conf is just like every other computer.

----------

## Raffi

Well if we are now into trying crazy things. How about changing to 

ypserver hostname

and putting hostname in your /etc/hosts file.

I still think that getting your broadcast address correct on all your machines is a good thing even if it does not immediately solve the problem. By any chance, is the network card in this machine different than the others? If so, the driver on this one may not function with that bad broadcast.

----------

## pmatos

 *Raffi wrote:*   

> Well if we are now into trying crazy things. How about changing to 
> 
> ypserver hostname
> 
> and putting hostname in your /etc/hosts file.
> ...

 

Keeps doing the same. Network card is the same. This was working a week ago... I just did and emerge -uD world...  :Sad:  and I've probably incorrectly replaced some config files.

----------

## Raffi

OK. Let's look at all the files I can think of

We have gone over yp.conf. How about /etc/conf.d/ypbind, what does that look like? You said you have an /etc/nisdomainname. Does the ypdomainname command return the correct value?

You have the server in your /etc/hosts file.

----------

## pmatos

 *Raffi wrote:*   

> OK. Let's look at all the files I can think of
> 
> We have gone over yp.conf. How about /etc/conf.d/ypbind, what does that look like? You said you have an /etc/nisdomainname. Does the ypdomainname command return the correct value?
> 
> You have the server in your /etc/hosts file.

 

Don't know if these helps but if I connect remotely to my work computer I get:

```
pmatos@euler ~ $ ssh root@auriga

Password: 

Last login: Tue Nov 30 01:55:59 2004

YPBINDPROC_DOMAIN: Domain not bound

auriga ~ #
```

Here are the cats of some files... Can you remember any more important files?

```
auriga ~ # cat /etc/conf.d/ypbind 

# Config file for /etc/init.d/ypbind

# NIS domain (not necessarily the same as DNS domain)

YP_DOMAIN=146.193.36.1

auriga ~ # cat /etc/hosts 

127.0.0.1       localhost

146.193.36.9    caelum.inesc-id.pt caelum caelum.inesc.pt

146.193.36.1 sat sat.inesc-id.pt

146.193.36.2 gemini

146.193.36.7 auriga

# IPV6 versions of localhost and co

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

auriga ~ # nisdomainname 

sat
```

----------

## Raffi

In the /etc/conf.d/ypbind file, that should be the name of your yp domain, not the ip of the server.

OK. From what I'm seeing, it looks like you might be a little confused on some of the terms.

The yp server is the machine that serves up yp.

The yp domain is the name of your domain. That name should probably be different than the machine name of the yp server just to avoid confusion.

So if your yp server was the machine named server1,  you might want your yp domain name to be something like company_name.

In that case, you should make  your yp.conf file look like

```

domain company_name  server server1

```

The nisdomainname file would contain company_name and the YP_DOMAIN variable in the /etc/conf.d/ypbind file would also be set to company_name.

If you set the yp.conf file to point to the server, there should be no issue with your broadcast address. At this point, if you are willing, I would suggest cleaning up a couple of things so that we can not be distracted by them while trying to find the problem. Your broadcast address should be fixed on all the machines and you should separate out the server name and the yp domain name.

----------

## pmatos

 *Raffi wrote:*   

> In the /etc/conf.d/ypbind file, that should be the name of your yp domain, not the ip of the server.
> 
> OK. From what I'm seeing, it looks like you might be a little confused on some of the terms.
> 
> The yp server is the machine that serves up yp.
> ...

 

Ok, I've done that, changed yp.conf and conf.d/ypbind.

But still get the same message that is cannot find a NIS server. It seems the problem is not on the yp configuration but something to do with RPC. Are there any configuration files for this?

Cheers,

----------

## Raffi

/etc/rpc defines some stuff, but your rpcinfo command you posted earlier implies that that is OK.

Have you changed the broadcast address on the network?

----------

## pmatos

 *Raffi wrote:*   

> /etc/rpc defines some stuff, but your rpcinfo command you posted earlier implies that that is OK.
> 
> Have you changed the broadcast address on the network?

 

I've noticed something...

On auriga, my computer I have the following info:

```
auriga ~ # rpcinfo -p | grep ypbind

    100007    2   udp    980  ypbind

    100007    1   udp    980  ypbind

    100007    2   tcp    983  ypbind

    100007    1   tcp    983  ypbind
```

and on a working computer I have:

```
caelum ~ # rpcinfo -p | grep ypbind

    100007    2   udp    877  ypbind

    100007    1   udp    877  ypbind

    100007    2   tcp    880  ypbind

    100007    1   tcp    880  ypbind
```

They have different port numbers, can this be a reason?

Cheers,

----------

## Raffi

The numbers that are different are the tcp/udp port numbers assigned via the rpc system. Since the rpc number is the same, the portmapper will do the translation for anything connecting.

In short, no that's not the problem.

----------

## pmatos

 *Raffi wrote:*   

> The numbers that are different are the tcp/udp port numbers assigned via the rpc system. Since the rpc number is the same, the portmapper will do the translation for anything connecting.
> 
> In short, no that's not the problem.

 

 :Sad: 

Back to the broadcast address, it seems to be given via dhcp through the server which I do not have access to so I cannot change that directly. The only way is to modify it only in my computer overriding dhcp settings.  :Neutral: 

----------

## Raffi

So who runs your dhcp server? Since the address is wrong, requesting that it be fixed seems very reasonable to me. However, let's see what else we can look at while you try to get that fixed.

OK. On my machine, I ran tcpdump and then stopped and restarted my ypbind. Since I am doing a broadcast for my server, this should not be identical to what you see, but it should be similar.

First thing that happened after starting ypbind was a udp broadcast to the sunrpc port on my broadcast address. Responses were received from both of my yp servers. My machine then started talking to the first server that responded via a reserved port on that machine. A icmp error message was sent to the second server.

What do you see when you do a tcpdump?

----------

## pmatos

 *Raffi wrote:*   

> So who runs your dhcp server? Since the address is wrong, requesting that it be fixed seems very reasonable to me. However, let's see what else we can look at while you try to get that fixed.
> 
> OK. On my machine, I ran tcpdump and then stopped and restarted my ypbind. Since I am doing a broadcast for my server, this should not be identical to what you see, but it should be similar.
> 
> First thing that happened after starting ypbind was a udp broadcast to the sunrpc port on my broadcast address. Responses were received from both of my yp servers. My machine then started talking to the first server that responded via a reserved port on that machine. A icmp error message was sent to the second server.
> ...

 

I get a lot of stuff, how can you request tcpdump how to just look for those packets from ypbind, etc?

I'm downloading a file so I receive a lot of packets with tcpdump.

----------

## Raffi

Since you want to see what is really going on, we don't want to look for what we expect, but all traffic. At this point, you can note the traffic caused by the download and remove it

```

tcpdump not host remotehost

```

or you can pause your download while doing the test.

----------

## pmatos

I'll just reinstall gentoo all over again... This is just getting me crazy...

Thanks for all your help and time.

Cheers,

Paulo Matos

----------

## Raffi

 :Sad:   Sorry to hear that. I think I'd go crazey never knowing what happened. Oh well, hopefully the re-install does fix it and it is not some sort of hardware issue.

----------

## pmatos

 *Raffi wrote:*   

>   Sorry to hear that. I think I'd go crazey never knowing what happened. Oh well, hopefully the re-install does fix it and it is not some sort of hardware issue.

 

Man, I need to say thanks for all your help and tell ya that I've just solved the issue. I reinstalled Gentoo and this just worked. I now what the problem was. The emerge I had done updated my /etc/conf.d/net file and that file was passing the -Y option to dhcpcd_eth0. Without it dhcpcd was always overwriting /etc/yp.conf which would make ypbind tell me that the nis server could not be found. Probably was not only this since we had also the broadcast problem but the issue is solved and I can at last rest peacefully.

Cheers,

----------

