[
https://issues.apache.org/jira/browse/BROOKLYN-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161370#comment-16161370
]
Aled Sage commented on BROOKLYN-532:
------------------------------------
A few quick observations:
* One can set a higher timeout for resolving the reference, e.g.:
{noformat}
<reference id="shutdownHandler"
interface="org.apache.brooklyn.core.mgmt.ShutdownHandler" timeout="300000"/>
{noformat}
However, that doesn't feel like the right fix - it's just increasing the max
rebind time rather than fixing the underlying problem.
* The dependency could be marked as optional (it would not be injected if it
was not available within the 60 second grace period). Talking with
[~m4rkmckenna], he thinks it would be injected when it became available.
However, I'm not sure how much (if any) the other bundles would need changed
so they handle that gracefully.
* With classic-mode, the web-apps (rest-api and web-console) are started in the
middle of the {{BrooklynLauncher.start()}}. We could achieve a similar thing if
we split the karaf startup into two phases: {{brooklyn-karaf-init}} would
instantiate the management context (thus making it available to other bundles);
and a new {{brooklyn-karaf-start}} could then actually start it (e.g. bind to
the persisted state, etc).
My preference is for the last option.
> UI / rest api not available after a very long rebind
> ----------------------------------------------------
>
> Key: BROOKLYN-532
> URL: https://issues.apache.org/jira/browse/BROOKLYN-532
> Project: Brooklyn
> Issue Type: Bug
> Affects Versions: 0.11.0
> Reporter: Aled Sage
>
> I restarted Brooklyn (in karaf-mode) when it had a huge number of entities
> (approx 50,000). It eventually finished rebinding, but the REST api and
> web-console didn't come up properly.
> The log showed the exception below:
> {noformat}
> 2017-08-31T18:15:49,691 ERROR 15 o.a.a.b.c.BlueprintContainerImpl [rint
> Extender: 1] Unable to start blueprint container for bundle
> org.apache.brooklyn.rest-resources/0.12.0.SNAPSHOT due to unresolved
> dependencies [(objectClass=org.apache.brooklyn.core.mgmt.ShutdownHandler),
> (objectClass=org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal)]
> java.util.concurrent.TimeoutException: null
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:370)
> [15:org.apache.aries.blueprint.core:1.8.2]
> at
> org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
> [15:org.apache.aries.blueprint.core:1.8.2]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> [?:?]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [?:?]
> at java.lang.Thread.run(Thread.java:748) [?:?]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)