Problem with ConfigUtil.getHostName()

"Logan, Patrick" <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
I am using the following in a confic file...

serverExporter = new BasicJeriExporter(
    TcpServerEndpoint.getInstance(ConfigUtil.getHostName(), 0),
                                  invocationLayerFactory,
                                  false,
                                  true);



And when I look at the output from reggie I am seeing a very strange
hostname...

Apr 6, 2007 2:58:12 PM com.sun.jini.reggie.RegistrarImpl init
INFO: started Reggie: 55ef24a2-15c7-43b2-b1a5-f0c934c103f3, 
    [Yoshi0], ConstrainableLookupLocator[
    [jini://sunny-side.lab.pi.amit.lmig.com.lab.pi.amit.lmig.com/], 
    [null]]

On another node, mahalo is looking for a reggie and obviously cannot
resolve that name.

When I change the above config to getInstance(0) then the reggie output
still looks the same, but on the other node, mahalo is getting a
connection refused because it is using an address of 127.0.1.1. i.e. it
does not have the name in that case.

Em, maybe the dns is setup strange on our little lab network, resulting
in the host name with redundent parts?

But when I run a simple java app that uses
java.net.InetAddress.getLocalHost().getHostName() it does display the
expected...

sunny-side.lab.pi.amit.lmig.com


Any ideas?

Thanks,
Patrick



Patrick Logan
Premium Innovation
Liberty Mutual - Agency Markets IT West
650 NE Holladay Street
PO Box 4555
Portland, OR   97208-4555

Office: 503.736.7537
Cell: 503.476.5387



--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.