dev@glassfish.java.net

Re: Behavior of asadmin stop-instance command

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Tue, 02 Nov 2010 11:03:11 -0700

Yes - that is how stop-server commands work. Before the --force option
was 100% ignored. Now it is used. If you set --force to false, then
the server will not stop. That's because System.exit() is not called
and your server has non-daemon threads left running - so it will never stop.

See [1] for details

https://glassfish.dev.java.net/issues/show_bug.cgi?id=13951

=============================


What this means: The default for --force is true for both types of
servers. Just stick with the default.


On 11/1/2010 5:22 PM, Ken wrote:
> I don't understand what I am observing with the asadmin stop-instance
> command (current build as of around noon
> today, rev 42362). I have an orb failover test that runs a number of
> requests, then calls (using Runtime.exec)
> asadmin stop-instance NAME. I have tested this with and without the
> --force true option. In either case, the command
> prints out:
>
> The instance, NAME, is stopped.
> Command stop-instance executed successfully.
>
> But WITHOUT the --force true option, the server instance PROCESS never
> dies: it just stays around in an
> odd partially shutdown state, probably with the application shutdown,
> causing spurious CORBA errors
> (basically looks like the EJB does not exist). This causes my
> failover test to fail.
>
> WITH the --force option, everything works correctly: the ORB fails
> over to another instance in the cluster,
> and stays on the other instance when I bring the shutdown instance
> back up with an asadmin start-instance command.
> ORB failover is dependent on getting a communication failure with the
> instance in order to detect the failover.
> I also observe that an instance of the app server is running with a
> new PID, so apparently in this case
> the process really was destroyed, which is what I require in the
> failover test.
>
> Is stop-instance supposed to work this way?
> I remember a discussion about (lack of) daemon threads, is this
> related to that problem?
>
> Thanks,
>
> Ken.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188