[ome-devel] Launching VisBio from the OME web interface

Chris Allan callan at blackcat.ca
Wed Apr 13 10:26:29 BST 2005


On Tue, Apr 12, 2005 at 02:30:18PM -0500, Curtis Rueden wrote:
> Chris Allan wrote:
> 
> >On Linux we have the handy "hostname -f" however that doesn't exist on
> >BSD systems, of which OS X's userland inherits so much from. As I recall
> >there's a Perl module called Sys::FQDN or Sys::Hostname::FQDN, can't
> >remember which, that does the lookup properly (ie. against the inet_*
> >structures of a bound socket). I'll look at this a little closer later
> >in the week.
> > 
> >
> 
> Well, I figured out why Tomasz's `hostname` was producing a blank server 
> name. When digging through apache's error log just now, I came across this:
> 
> [Tue Apr 12 12:03:59 2005] null: Can't exec "hostname": No such file or 
> directory at /usr/local/share/perl/5.8.4/OME/Web/VisBio.pm line 67.
> 
> It seems odd that /bin isn't in perl's path, but with Ilya's change it's 
> irrelevant now.

It has nothing to do with Perl interpreter paths it has to do with the
Apache user's lack of PATH elements.

> 
> Also, "hostname -f" returns "localhost" on my machine. "dnsdomainname" 
> returns nothing, and "dnsdomainname -f" also returns "localhost." I'm 
> starting to feel like I must have installed "Debian: Defective Edition." :-)

No, you have the defective /etc/hosts file edition. :) Machines don't
magically guess their hostnames and FQDN's guys. /etc/hosts or your
authoritative DNS server has to have something better in it than:

127.0.0.1	localhost

A proper /etc/hosts file for Linux:

callan at runemaster callan $ cat /etc/hosts
127.0.0.1       localhost
10.2.1.11       runemaster.openmicroscopy.org.uk        runemaster
callan at runemaster callan $ hostname -f
runemaster.openmicroscopy.org.uk
callan at runemaster callan $ hostname
runemaster
callan at runemaster callan $ dnsdomainname 
openmicroscopy.org.uk

> 
> -Curtis

Ciao.

-Chris


More information about the ome-devel mailing list