In your setup for Master/Slave HA what is the lock level you have set for the kernel/karaf? If the lock level is high enough then the slave will start up certain bundles suck as the camel components.
I've blogged a few discussions on setting up various H.A. failover configurations for SMX4 that you may find useful.
Setting up SMX4 failover with MySQL:
Adding container level locking to your H.A. Servicemix 4 deployment:
Setting up Servicemix 4 with H.A. in mind:
Wow I wasn't ever aware of a lock level setting (I don't think FUSE documentation mention that). Your blog entries, and particularly the second url, provide a great deal of information. Thank you very much.
I should now be able to prevent some of my bundles to start untill the lock is acquired.
One last question:
What is the difference between karaf.lock and servicemix.lock? Is servicemix.lock deprecated?
I've just tried with following entries in my 'etc/system.properties':
but it does not change anything: my bundles (level 60) are started and the camel routes deployed. Even by setting lock level to 1 (for cold standby) every bundles start.
Can you confirm that FUSE ESB 18.104.22.168 correctly supports these settings?
Edited by: concombre masqué on Nov 6, 2009 10:27 AM
In Fuse ESB 22.214.171.124 we make use of the 'old' Servicemix Kernel. The functionality of the kernel has been transfered to the Apache Felix Karaf project and will soon appear in Fuse ESB.
The three configuration lines provided should work, may I ask which locking mechanism your using? (file lock, derby, generic jdbc?) The below configuration is for a simple lock file that resides on a host machine, leveraging the operating system's file lock behavior. This allows two instances on a single host to use a file lock to control start up level.
servicemix.lock=true servicemix.lock.class=org.apache.servicemix.kernel.main.SimpleFileLock servicemix.lock.dir=/path/to/lock/file/directory servicemix.lock.level=20 servicemix.lock.delay=10
Apache Servicemix Kernel subproject moves to Apache Felix:
Thanks for your help. I missed the two following lines:
I cannot found documentation regarding this two variables while it is so important. Why? It seems JDBC master/slave deployment is more detailled on the web than file lock master/slave.
Now it works fine
The smx lock class and dir configuration entries have default values already provided to the kernel (SimpleLockFile & smx.home - this is why you would see a lock file in the ESB home directory after first running servicemix). As to why the feature works once its specifically configured am I not sure, this may have already been fixed in Karaf builds however.
As to documentation, when I added the jdbc locking feature I just appended the info to the online docs that already existed for simple locking
I think it now works because with the default value of variable 'servicemix.lock.dir' (which is servicemix.base) each ESB acquires its own lock in its own directory and not a common/shared lock file. Thus nothing prevents the slave ESB from starting all the bundles.
By using 'servicemix.lock.dir' in both ESB configuration and by specifying a common lock directory then it works: the slave ESB tries to acquire a lock already owned by the master.
For Fuse 4.2 users: