admin@glassfish.java.net

Re: create-local-instance and create-instance

From: Jennifer Chou <jennifer.chou_at_oracle.com>
Date: Mon, 12 Jul 2010 14:50:13 +0100

create-instance can be used when the instance is on a different machine
from DAS and ssh is available.
create-local-instance is run locally on the instance machine.
You won't see any difference between the 2 commands when DAS and
instance are on the same machine.

Both commands do
Step 1: registers the instance with DAS (adds server element to domain.xml)

Then
Step 2: create the local file structure for the instance (by default
under <gf install>/nodeagents/<machine name>)
create-local-instance always does step 2.
create-instance does step 2 when
     a) SSH is available OR
     b) instance is on the same machine as the DAS

Case 1: SSH available, instances on different machine as DAS
asadmin create-instance --node M1 instance1 (on DAS)

Case2: instances on same machine as DAS
asadmin create-instance --node localhost instance1
OR
asadmin create-local-instance instance1

Case3: SSH unavailable, instances on different machine as DAS
asadmin create-instance --node M1 instance1 (on DAS)
asadmin --host DAS create-local-instance instance1 (on M1)
OR
asadmin --host DAS create-local-instance instance1 (on M1)

Is there still a bug with list-instances?
Can you file a bug?

Thanks,
Jennifer

On 7/11/2010 8:46 PM, Anissa Lam wrote:
>
>
> On 7/11/10 12:44 PM, Anissa Lam wrote:
>> Hi,
>>
>> What is the difference between these 2 commands:
>> create-local-instance and create-instance
>>
>> %aadmin create-local-instance --node localhost M1
>> results in :
>> <server node="localhost" node-agent-ref="macau2.local" name="M1" >
>>
>> %asadmin create-instance --node localhost M2
>> results in
>> <server node="localhost" node-agent-ref="localhost" >
> oops, my copy&paste error. should be
> server node="localhost" node-agent-ref="localhost" name="M2" >
>
> Anissa.
>>
>> I am able to start both instances ok.
>> There seems a bug with list-insances if i specify the node name as
>> the target, it doesn't return the instances that reference this node.
>>
>> %asadmin list-instances localhost
>> remote failure: Unable to find a valid target with name localhost
>>
>> Command list-instances failed.
>>
>> thanks
>> Anissa.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>