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

Karaf slave instance does not write pid or port file until it becomes master

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.9
    • 4.1.6, 4.2.1
    • karaf
    • None

    Description

      In a Karaf master/slave environment, the slave process does not write its pid or port file until it acquires the lock and becomes the master.

      I am running Karaf 4.0.9 (ServiceMix 7.0.1).

      Karaf is configured as master/slave using the following from system.properties. Master and slave are on different physical nodes.

      karaf.lock=true
      karaf.lock.class=org.apache.karaf.main.lock.OracleJDBCLock
      karaf.lock.level=79
      karaf.lock.delay=10000
      karaf.lock.jdbc.url=jdbc:oracle:thin:#REMOVED#
      karaf.lock.jdbc.driver=oracle.jdbc.driver.OracleDriver
      karaf.lock.jdbc.user=#REMOVED#
      karaf.lock.jdbc.password=#REMOVED#
      karaf.lock.jdbc.table=KARAF_LOCK
      karaf.lock.jdbc.clustername=karaf
      karaf.lock.jdbc.timeout=30
      karaf.lock.slave.block=false
      

      Attempting to stop the slave Karaf process results in "Can't connect to the container. The container is not running." This is not true, as a simple ps -ef | grep karaf confirms that it is in fact running. I am able to enter the Karaf shell just fine, use the web console, etc.

      I have confirmed through multiple tests that the pid and port files don't get written until the master lock is acquired.

      Steps:

      1. With the Karaf slave node not started, note the pid and port files do not exist (or contain outdated values from a previous process).
      2. Start the Karaf slave process.
      3. Note that the pid and port files have not been written.
      4. Stop the master process.
      5. Observe the slave process acquire the lock and become master.
      6. Note that the pid and port files have now been written.

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              mzipay Matthew Zipay
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: