admin@glassfish.java.net

Re: Following glassfish issue that impacts IIOP getting ports from domain.xml was categorized for m4

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Thu, 08 Jul 2010 08:08:26 -0700

FYI I checked in a fix for
com.sun.enterprise.v3.admin.cluster.RemoteInstanceCommandHelper.getHost(Server)
last night. Given a Server it returns the host the server is on.

This morning I found the problem where the "localhost" node entry is
malformed. I'll check in a fix for that today after I've done some testing.
But the above method (with fix) protects you from this bug.

Also if you have a host name and you want to know if it is the local
host, Byron wrote this method:

com.sun.enterprise.util.net.NetUtils.IsThisHostLocal(String hostname)

Joe


Joe Di Pol wrote:
> Tom Mueller wrote:
>> Adding Joe to the message.
>>
>> Joe, can you please summarize the discussion from yesterday's admin
>> meeting regarding <node> elements for localhost?
>
> It's supposed to look like:
>
> <node name="localhost" nodehost="localhost"
> nodehome="${com.sun.aas.installRoot}">
>
> But we're having some problems with defaulting and values getting
> squashed out that I haven't gotten to the bottom of yet.
>
> If the general questions is: I have a Server instance, how do I find what
> host it is running on? Then the answer should be this method:
>
> com.sun.enterprise.v3.admin.cluster.RemoteInstanceCommandHelper.getHost(Server)
>
>
> but it looks a bit wrong at the moment. I will look into it today.
>
> Joe
>
>>
>> Ken, all of the nodes for non-DAS instances will have a node that has
>> a real hostname. I think your question is about how to find the
>> hostname for instances that are on the same host has the DAS, right?
>>
>> Tom
>>
>>
>> On 7/6/2010 6:21 PM, Ken wrote:
>>> Tom Mueller wrote:
>>>>
>>>>
>>>> On 7/6/2010 5:56 PM, Ken wrote:
>>>>> Tom Mueller wrote:
>>>>>> Once you have a Server s, call s.getCluster() which returns a
>>>>>> Cluster, or null if the instance is not clustered.
>>>>>>
>>>>>>
>>>>> How to I figure out which Server instance in Servers corresponds to
>>>>> my instance?
>>>> If you inject a Server, you get the one you are on, AFAIK.
>>> OK, that should work for me. I'll need all of the servers in my
>>> cluster,
>>> but I can inject the Server, get my cluster, and then get the
>>> servers in my cluster.
>>>>>
>>>>> Also, I need to know the host name of the server. In my test, the
>>>>> attribute node-agent-ref
>>>>> was set to the host name. Can I rely on node-agent-ref to always
>>>>> be the host name?
>>>> Don't assume there is a single host name for a server. There could
>>>> be multiple NICs with multiple IP address and multiple hostname.
>>>>
>>>> Get the hostname from the relevant listener, and if it isn't there
>>>> because that listener is listening on 0.0.0.0, then there is a
>>>> Node.getNodeHost() that can be used. The node-agent-ref is a name
>>>> for the node, not a hostname, although often times people name their
>>>> nodes with a hostname.
>>> OK. Generally the ORB iiop-listeners have port 0.0.0.0, but I don't
>>> want to assume that that is always the case.
>>> But the problem is that (in my example) domain.xml contains the
>>> following:
>>>
>>> <nodes>
>>> <node name="localhost" />
>>> </nodes>
>>>
>>> I cannot use localhost. The actual host name (minas is my case) ONLY
>>> appears in the node-agent-ref
>>> in the server element in domain.xml. So how is this supposed to
>>> work? Is there an error somewhere in the setup
>>> of the cluster? I'm using the Hudson plugin that Harshad and Mahti
>>> created to set up my cluster.
>>>
>>> Thanks,
>>>
>>> Ken.
>>>
>>>>
>>>> Tom
>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Ken.
>>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
>