dev@glassfish.java.net

Re: start-domain fails to finish for 600 seconds

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Fri, 18 Feb 2011 14:28:54 -0500

On 2/18/11 13:39, Byron Nevins wrote:
> The 10 minute timeout is simply a constant that we use. It is a
> worst-case wait that was worked out eons ago. I had an idea a while
> ago to keep track of how long it takes a domain to start and then
> automagically change that constant to, say 2 or X that amount of
> time. That would be nice -- but involved to implement.
>
> We could make it configurable. File an issue with your thoughts Vince.
>
> =================
> p.s. We have gone to a LOT of trouble to make GlassFish 100%
> relocatable. The OSGi cache problems are disappointing and need to be
> fixed!

To be clear, this is not an OSGi cache problem, it is an issue with how
we deploy bundles into OSGi. We are using the file system path of a
bundle as a sort of key/id when we deploy the bundle into the framework.
When the GF installation directory is moved, our launcher just uses the
new file system location when deploying the bundle, but the bundle is
already deployed under the old location.

-> richard

>
>
>
> On 2/18/2011 8:01 AM, vince kraemer wrote:
>> Hi Tom, Richard and all,
>>
>> Thanks for the additional info.
>>
>> While I was googling about this yesterday, I noticed that Arun had a
>> TOTD posting for this, that explained the 'solution'...
>> http://blogs.sun.com/arungupta/entry/totd_140_moving_glassfish_installation
>>
>>
>> That was excellent.
>>
>> Snjezana wrote to me yesterday and pointed out that this is a filed
>> issue... http://java.net/jira/browse/GLASSFISH-9988.
>>
>> Does anybody know why it takes start-domain 600 seconds to detect
>> that the server did not start when the exceptions are triggered in
>> less than one second?
>>
>> Could we put a better message into the log file or in the
>> start-domain command's response for this?
>>
>> Or, just fail faster, so the user can start to take action sooner,
>> rather than later...
>>
>> vbk
>>
>> ps... I kept the strace on this message to help users find the info
>> that will help them...
>>
>>
>> Richard S. Hall wrote:
>>> On 2/18/11 9:52, Tom Mueller wrote:
>>>> Vince,
>>>> I appears that the Felix is not properly detecting that the
>>>> directory moved.
>>>>
>>>> It looks like it is seeing the "new" modules at the new directory
>>>> name, but every new module looks like a duplicate of the old module
>>>> at the old directory name. Felix is not realizing that the old
>>>> modules are now gone.
>>>
>>> Felix is not involved in such issues, it is the framework launcher
>>> that tries to re-deploy bundles, so it would be the one that would
>>> need to detect it.
>>>
>>> -> richard
>>>
>>>>
>>>> If the domain's osgi_cache directory is removed after changing the
>>>> name of the directory, then the domain will startup just fine.
>>>>
>>>> Tom
>>>>
>>>>
>>>> On 2/17/2011 5:39 PM, Vince Kraemer wrote:
>>>>>
>>>>> WARNING: Failed to install
>>>>> file:/export/home/vkraemer/GlassFish_Server5/glassfish/modules/gms-bootstrap.jar
>>>>>
>>>>> org.osgi.framework.BundleException: Bundle symbolic name and
>>>>> version are not unique: org.glassfish.cluster.gms-bootstrap:3.1.0
>>>>> at
>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1180)
>>>>>
>>>>> at
>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2528)
>>>>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2436)
>>>>> at
>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:129)
>>>>>
>>>>> at org.jvnet.hk2.osgimain.Main.install(Main.java:363)
>>>>> at org.jvnet.hk2.osgimain.Main.traverse(Main.java:293)
>>>>> at org.jvnet.hk2.osgimain.Main.start(Main.java:144)
>>>>> at
>>>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
>>>>>
>>>>> at
>>>>> org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
>>>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
>>>>> at
>>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
>>>>> at
>>>>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>>>
>>>>> at java.lang.Thread.run(Thread.java:662)
>>>>>
>>>>> the last strace I see (if I start-domain --verbose) is this one
>>>>>
>>>>> java.lang.NullPointerException
>>>>> at org.jvnet.hk2.osgimain.Main.start(Main.java:147)
>>>>> at
>>>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
>>>>>
>>>>> at
>>>>> org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
>>>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
>>>>> at
>>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
>>>>> at
>>>>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>>>
>>>>> at java.lang.Thread.run(Thread.java:662)
>>>>>
>>>>> vbk
>>>>>
>>
>
> --
> Oracle <http://www.oracle.com>
> Byron Nevins | Principal MTS
> Phone: +1 6503958992 <tel:+1%206503958992>
>
> Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
> developing practices and products that help protect the environment