Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: ESB-1103
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jamie Goodyear
Reporter: Jamie Goodyear
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FUSE ESB

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

Created: 20/Jan/10 05:42 PM   Updated: 18/Jun/10 03:03 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.0-fuse-02-00


 Description  « Hide
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.


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.