dev@glassfish.java.net

Re: asadmin vs java -jar

From: Bobby Bissett <Robert.Bissett_at_Sun.COM>
Date: Thu, 03 Sep 2009 19:55:49 -0400

>>
>> BTW, I will try to fix the issue that you are running into, w.r.t.
>> asadmin start-domain. It's a bit tricky to get right.
>
> Right, we need to fix that, but I still don't understand how you
> (Bobby) got into this situation. The failure was caused by a bad
> Java agent specification. How did that happen? Did the v2 domain
> actually start even with the bad Java agent specification?

Having to reboot today, I saw that I had an asadmin process still
running when Terminal shut down. There was no java process running,
but something with asadmin in the text was (it went by quickly and I
didn't think to capture it). Could that be related at all? I doubt it
right now. The code I sent you was exactly what I ran. At some point I
imagine upgrade tool exec'ed asadmin, which hung during an upgrade. At
that point I may have killed anything with "java" in the process, but
that didn't get everything.

(BTW, I've filed a bug that upgrade tool needs a cancel button to take
care of the spawned process in case it's hanging.)

This is new territory for me, so I'm at a loss. I can recreate it
though, even after a reboot. I have a tarball of my server along with
the domain, and I just untarred and still see it. First the btrace-
agent.jar error and then after that pipe error, pipe error, pipe error
(output below).

So if you want to give it a look you're welcome to it. Kedar, let me
know if you'd like it. I can put it on a server somewhere so you can
just pull it down with a browser.

Cheers,
Bobby

-----------
output directly after a reboot:

hostname% mkdir testserver
hostname% cd testserver
hostname%
hostname%
hostname%
hostname% tar xvf ../gfv3_pipe_issue.tar
[etc]
hostname%
hostname% cd glassfishv3/glassfish
hostname%
hostname% ls domains
domain1.original pipedomain
hostname% ./bin/asadmin start-domain pipedomain

Waiting for DAS to start.
Error starting domain: domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /Users/bobby/servers/
testserver/glassfishv3/glassfish/lib/monitor/btrace-agent.jar

Command start-domain failed.
hostname%
hostname% ./bin/asadmin start-domain pipedomain

JVM failed to start: java.io.IOException: Broken pipe
Command start-domain failed.
hostname%
hostname% ./bin/asadmin start-domain pipedomain

Waiting for DAS to start.
Error starting domain: domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /Users/bobby/servers/
testserver/glassfishv3/glassfish/lib/monitor/btrace-agent.jar

Command start-domain failed.
hostname%