[AG-DEV] Toolkit.CmdlineApplication.instance().GetHostname() question

Eric Olson eolson at mcs.anl.gov
Tue Sep 22 08:01:42 CDT 2009


Hi Jason,
It's checked in AccessGrid/Config.py
   in the SetHostname() function.

Normally, it's checked with socket.getfqdn() and then verified that it's 
valid.  Otherwise the localhost ip address is used.

It can be overridden by setting the environment variable "AG_HOSTNAME" 
to an ip address or hostname before launching an AG application.


Often the problem you're seeing means the network isn't configured with 
a matching (usually static) ip address and hostname.  Let us know if you 
find out any more details or if the code isn't working correctly.

Eric


Jason Bell wrote:
> Hi guys
> 
> Quick question, there is a function call within VenueVNCServer3.py:
> 
> 	hostname=Toolkit.CmdlineApplication.instance().GetHostname()
> 
> Question, how does it get the hostname, as I have found this to not
> always get the correct hostname....  (IE, I had a machine today - winXP
> - 64bit that keep returning localhost address [127.0.0.1]), so I
> manually changed hostname="ipadress" and it then worked.
> 
> So, does it do a nslookup... Or something like that ???
> 
> I am just not sure if this method is the best, rather simply getting the
> ip address would be better (as not all machines would be in the DNS,
> etc).
> 
> Anyway, would like to know how
> "Toolkit.CmdlineApplication.instance().GetHostname()" works better.
> Where do I find this function?????
> 
> Many thanks,
> Jason.
> 
> 
> 
> --------------------------------------------
> Jason Bell, B.I.T. (Honours)
> 
> Research Systems Support Officer
> Information Technology Division 
> CQ University Australia
> 
> Australian Research Collaboration Service
> http://www.arcs.org.au/
> 
> E-mail : j.bell at cqu.edu.au
>          jason.bell at arcs.org.au
> Work   : +61 7 4930 9229
> Mobile : 0409 630897
> Postal : Building 19
>          Central Queensland University
>          Bruce Highway
>          Rockhampton, Queensland, Australia, 4702
> --------------------------------------------
> Patience is a virtue.
> 
> But if I wanted Patience,
> I would have become a Doctor.
> --------------------------------------------
> 
> 
> 



More information about the ag-dev mailing list