dev@glassfish.java.net

Re: asadmin vs java -jar

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 03 Sep 2009 17:27:48 -0700

Bobby Bissett wrote:
>>>
>>> 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.

Yeah, I can take a look if you provide me the domain. But I think I know
what's going on and I am working on a fix that will make life slightly
better. Yet, if the server dies the way it did in your case, it is
possible that the pipe from server to asadmin is broken.

To answer Bill's question -- no V2 would not start with a broken
javaagent. I think what happened in this case was in domain.xml, during
upgrade a -javaagent:../lib/monitoring/btrace.jar was added, but
maybe either btrace.jar was not present or its path was wrong.


>
> 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%
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>