[
https://issues.apache.org/jira/browse/KARAF-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387284#comment-14387284
]
Jean-Baptiste Onofré commented on KARAF-3564:
---------------------------------------------
Fixed on karaf-2.3.x:
https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=270a72bf05cb55d498200fd95f3d997ea6a3ec65
> bin/stop fails for slave in case of Lock strategies
> ---------------------------------------------------
>
> Key: KARAF-3564
> URL: https://issues.apache.org/jira/browse/KARAF-3564
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 2.3.7
> Reporter: Paolo Antinori
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.0, 2.4.2, 3.0.4, 2.3.11
>
>
> {{bin/stop}} invokes {{org.apache.karaf.main.Stop}}
> https://github.com/apache/karaf/blob/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Stop.java
> {{Stop}} reads the socket port it has to connect to from a file:
> {{data/port}} is the default.
> But when a Lock strategy is in place, and the instance is the one that could
> not obtain the lock, the shutdown socket is never started:
> https://github.com/apache/karaf/blob/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java#L1411-L1415
> {code}
> if (lock.lock()) {
> if (lockLogged) {
> LOG.info("Lock acquired.");
> }
> setupShutdown(props);
> {code}
> and the Shutdown socket is created only in {{setupShutdown()}}
> A workaround is to use {{bin/client -u admin -p admin 'shutdown --force'}}
> It should be safe to move the invocation of {{setupShutdown}} outside the
> {{if(lock.lock())}} branch
> cross reference: https://issues.jboss.org/browse/ENTESB-2417
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)