Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3564

bin/stop fails for slave in case of Lock strategies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.7
    • 2.4.2, 2.3.11
    • karaf
    • None

    Description

      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

       if (lock.lock()) {
          if (lockLogged) {
             LOG.info("Lock acquired.");
          }
          setupShutdown(props);
      

      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

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            paolo.antinori Paolo Antinori
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: