-
1. Re: High Availability with FUSE ESB 4.1.0.2
jgoodyea Nov 5, 2009 12:48 PM (in response to concombremasqué)Hi,
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:
http://icodebythesea.blogspot.com/2009/10/setting-up-smx4-failover-with-mysql.html
Adding container level locking to your H.A. Servicemix 4 deployment:
http://icodebythesea.blogspot.com/2009/01/adding-container-level-locking-to-your.html
Setting up Servicemix 4 with H.A. in mind:
http://icodebythesea.blogspot.com/2009/01/setting-up-servicemix-4-with-ha-in-mind.html
J
-
2. Re: High Availability with FUSE ESB 4.1.0.2
concombremasqué Nov 6, 2009 3:29 AM (in response to jgoodyea)Hi,
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.
Thanks again.
-
3. Re: High Availability with FUSE ESB 4.1.0.2
concombremasqué Nov 6, 2009 4:11 AM (in response to jgoodyea)Jamie,
One last question:
What is the difference between karaf.lock and servicemix.lock? Is servicemix.lock deprecated?
Thanks.
-
4. Re: High Availability with FUSE ESB 4.1.0.2
concombremasqué Nov 6, 2009 5:30 AM (in response to concombremasqué)Hi Jamie,
I've just tried with following entries in my 'etc/system.properties':
servicemix.lock=true
servicemix.lock.level=50
servicemix.lock.delay=10
or
karaf.lock=true
karaf.lock.level=50
karaf.lock.delay=10
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 4.1.0.2 correctly supports these settings?
Thanks.
Edited by: concombre masqué on Nov 6, 2009 10:27 AM
-
5. Re: High Availability with FUSE ESB 4.1.0.2
jgoodyea Nov 6, 2009 10:21 AM (in response to concombremasqué)Hi,
In Fuse ESB 4.1.0.2 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
J
Apache Servicemix Kernel subproject moves to Apache Felix:
http://icodebythesea.blogspot.com/2009/04/apache-servicemix-kernel-subproject.html
-
6. Re: High Availability with FUSE ESB 4.1.0.2
concombremasqué Nov 6, 2009 11:36 AM (in response to jgoodyea)Hi,
Thanks for your help. I missed the two following lines:
servicemix.lock.class=org.apache.servicemix.kernel.main.SimpleFileLock
servicemix.lock.dir=/path/to/lock/file/directory
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
-
7. Re: High Availability with FUSE ESB 4.1.0.2
jgoodyea Nov 6, 2009 12:19 PM (in response to concombremasqué)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
-
8. Re: High Availability with FUSE ESB 4.1.0.2
concombremasqué Nov 6, 2009 12:28 PM (in response to jgoodyea)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.
-
9. Re: High Availability with FUSE ESB 4.1.0.2
michael.wengle May 10, 2010 10:38 AM (in response to jgoodyea)For Fuse 4.2 users:
karaf.lock=true
karaf.lock.dir=/path/to/lock/file/directory
karaf.lock.level=20
karaf.lock.delay=10