admin@glassfish.java.net

Re: Schrödinger's instance

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Mon, 21 Jun 2010 17:20:54 -0400

> You have server2 running and it is using port 25848

Maybe. I had no other Java processes running, and didn't set that port
on the domain or any other instance I created, so I don't know how I'd
see that welcome page unless the port conflict message was an error.
It still doesn't address my question, which is why CLI and server log
don't agree. But there's more....

> You then try to start instance1 which also wants to use port 25848.
> That's a fatal error.

Except that it's not. I show that I have all 3 processes running: the
DAS and the two instances I created.If it were a fatal error, which is
what I'd expect, shouldn't asadmin tell me so? What's annoying is that
the port conflict seems is intermittent. But the result is the same.
Here's the full(er) story:

0) No java processes running
1) Create 'mydomain' -- ok
2) Start mydomain -- ok
3) Create cluster -- ok
4) Stop/start mydomain so that gms gets a chance to bootstrap
5) Create instance 1 with 25848 admin port -- ok
6) Create instance 2 with 23848 admin port -- ok
7) Start instance 1 -- ok this time (though asadmin said it was ok
last time too)

Now I see instance 1 up on http://localhost:38080/ and I have 2 Java
processes running as expected.

8) Start instance 2 -- ok

So I have 3 Java processes running (from 'ps') but I still see this:

hostname% $GF_HOME/bin/asadmin list-instances
instance1 not running
instance2 running
Command list-instances executed successfully.

Looking at the process list, instance1 is definitely running. There's
something hokey with asadmin or instance1. I've attached the script
that does all of the above (originally from Joe).

Thanks,
Bobby