Coda File System

Re: unable to connect to internal server

From: Jan Harkes <>
Date: Mon, 24 Jul 2000 13:14:26 -0400
On Mon, Jul 24, 2000 at 10:07:25AM -0400, Bradley W. Langhorst wrote:
> Jan Harkes wrote:
> > It could be that `strange', your server, has a problem in /etc/hosts.
> > To be precise, the following line:
> > 
> > localhost
> > 
> > Things go wrong because gethostbyname("") returns
> > and this is then returned in the volume lookups (i.e. it is
> > stored in the VRDB and VLDB files). The client is then able to find the
> > volume, GetRootVolume and GetVolInfo succeed. But attaching to the
> > volume fails, because it cannot reach a server at
> > 
> > Jan
> Sorry to be thick if I've got this all confused...
> Seems to me that what should happen is that the client
> successfully determines the IP address of the server by looking at the
> hosts file (there is no local DNS).

It did, otherwise the GetRootVolume call wouldn't have succeeded.

> the hosts file looks like this:
>	bwlnote	localhost.localdomain localhost
> ...
> strange
> So why would the client be trying to reach a server at when it
> knows that strange is the server and that its address is  

Ok, the client knows how to contact the `volume location service'
running as part of the server. Now when a volume is created, we build
the Volume Replication Database (VRDB), and the Volume Location Database
(VLDB), _on the server_. These files contain the mappings of volumes to
servers, something like:

rootvolume -> rootvolume.0
repvol     -> repvol.0, repvol.1

rootvolume.0 ->
repvol.0     ->
repvol.1     ->

(actually, I believe the VRDB stores those ip-addresses as well).

Now how did the server come up with the ip-address to put in the VLDB?
myipaddress = gethostbyname(hostname()), so when that call returns the
localhost address on your server, the VLDB will contain:

rootvolume.0 ->

So the client contacts, and asks for the location of
rootvolume and get's back... rootvolume.0 @, then the client
tries to connect to the server running at ooops

> Incidentally, I've added bwlnote to strange's(server's) hosts file so it
> can resolve This does produce one interesting new
> behavior (I think we're getting to the root of the problem).  I now get

Ehhh, you might need to be able to resolve the client on the servers,
because the server tries to set up an RPC2 connection back to the client
to send callback messsages. Although it shouldn't really need it because
the server already knows the ip-address, it might still try to do a
blocking gethostbyaddr to get the `pretty name' to display in log

> The server logs look identical all that I can tell has changed is the
> addition of the error messages giving me info on the failure to find
> Volume name.

There should be a file /vice/db/ROOTVOLUME which is used to find the
name of the volume to mount on /coda.

Received on 2000-07-24 13:16:52