[GRASSLIST:2869] Re: SOLVED (Re: d.mon can't bind to socket)

Eric G. Miller egm2 at jps.net
Sun Jan 6 21:45:55 EST 2002


On Mon, 7 Jan 2002 13:02:05 +1100, Anthony Morton <abmorton at mac.com> wrote:

> 
> > In pre2 and earlier, the monitor socket is created in a subdirectory
> > of the current mapset, specifically:
> > 	$GISDBASE/$LOCATION_NAME/$MAPSET/.tmp/<hostname>/<monitor name>
> > Eric changed this (after pre2) to use:
> > 	/tmp/grass-<username>/<monitor name>
> > Other than the pathname used, the behaviour hasn't changed.
> > Basically, the directions given by Eric aren't applicable to pre2. But
> > check that the .tmp/<hostname> subdirectory exists. If it doesn't,
> > that would cause the bind() call to fail.
> 
> That wasn't the problem, as it turned out - it seems to be an issue with 
> long pathnames.

Yes. This is one of the reasons (along with NFS mounts) that I've since moved
it to /tmp/grass-$USER.  The maximum length of a local socket path is
something like 104 characters (there is some slight variation per platform).

> Up to now my GISDBASE had been set to
> 
> 	/Users/amorton/Documents/TransportResearch/grassdata
> 
> and my HOSTNAME (set by the University IT folks) is 
> G4-tonym.eng.monash.edu.au.
> 
> Stringing these together with a location and mapset seems to have made 
> too much of a mouthful for something (whether it's a bug in OSX or GRASS 
> I'm not sure).  My hunch is that although PATH_MAX for my system is 
> notionally 1024 bytes there's some code somewhere that's limited to 128 
> bytes.
> 
> Anyway, everything works when I move my GISDBASE to 
> /usr/local/share/grassdata instead.
> 
> My only concern now is that the monitor sockets still exist in the 
> .tmp/<hostname> folder after I exit GRASS - even when I tell it to stop 
> all monitors.  Should I be concerned about this?  Admittedly they don't 
> take up space on my disk.

No worries, they generally don't take up any space.

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list