FUSE ESB
  1. FUSE ESB
  2. ESB-1103

Possible hang with slave instances of the ESB when using Oracle JDBC lock.

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.2.0-fuse-02-00
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Possible hang with slave instances of the ESB when using Oracle JDBC lock.

      If we start up the master and slave as normal, then try to stop the slave, it does not release its attempted JDBC lock, and therefore hangs during shutdown. If we then stop the master, the slave throws an error and finally exits.

      It's not a major problem, as (1) it's not something we would need to do often, (2) it does not affect the master, and (3) we can work around it by forcefully killing the slave. However it looks ugly, and forceful shutdowns are never a good thing, so if there's a quick fix you can do before tonight's build, please try.

      Reproducing the problem is fairly easy, once you have Oracle installed...

      • install two instances (master and slave) of FUSE ESB onto one host
      • edit the slave's configuration as follows:

      org.apache.felix.karaf.shell.cfg:
      sshPort=8102

      org.apache.felix.karaf.management.cfg:
      rmiRegistryPort =1199

      system.properties:
      org.osgi.service.http.port=8182

      activemq-broker.xml

      • replace all occurrances of "61616" with "61617"
      • replace all occurrances of "default" with "slave"
      • add JDBC lock configuration to both instances:

      system.properties:

      karaf.lock=true
      karaf.lock.class=org.apache.felix.karaf.main.OracleJDBCLock
      karaf.lock.level=50
      karaf.lock.delay=10
      karaf.lock.jdbc.url=jdbc:oracle:thin:@localhost:1521:XE
      karaf.lock.jdbc.driver=oracle.jdbc.driver.OracleDriver
      karaf.lock.jdbc.user=karaf
      karaf.lock.jdbc.password=karaf
      karaf.lock.jdbc.table=KARAF_LOCK
      karaf.lock.jdbc.clustername=karaf
      karaf.lock.jdbc.timeout=30
      
      • start the master
      cd C:\path\to\master
      .\bin\servicemix.bat
      
      • start the slave
      cd C:\path\to\slave
      .\bin\servicemix.bat
      
      • stop the slave
      karaf@root> ^D
      (hangs...)
      
      • stop the master
      karaf@root> ^D
      (exits as usual)
      
      • the slave now exits, with the following exception:
      java.lang.NullPointerException
              at org.apache.felix.karaf.main.Main.setStartLevel(Main.java:1148)
              at org.apache.felix.karaf.main.Main.lock(Main.java:1114)
              at org.apache.felix.karaf.main.Main$1.run(Main.java:212)
      
      • the slave's log file shows it shutting down and unregistering various bundles, then hanging until the master exits, at which point it prints just two additional lines of logging before exiting:
      20-Jan-2010 10:20:03 org.apache.felix.karaf.main.OracleJDBCLock setUpdateCursor
      SEVERE: Cleaning up DB connection.
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jamie Goodyear
            Reporter:
            Jamie Goodyear
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: