Thx Raja for detailed steps - I have a problem of NOT compiling ACS with non-oss stuff - so I'm missing this JAR file completely :)
But other than that, yes, this is fine. Thanks again! On 26 June 2015 at 10:12, raja sekhar <rajsekhar....@gmail.com> wrote: > Andrija, > > file is missing in that path. > > Follow the steps to enable the database high availability in cloudstack. > > 1) Go to the path: > > *“/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/”* > > Find the *“cloud-plugin-database-mysqlha-4.3.1.jar” *file. > > 2) Create the path: > > *“/usr/share/cloudstack-mysql-ha/lib/”* > > Copy the above file to this path. > > 3) Edit the file *“/etc/cloudstack/management/catalina.properties”* > > check the *“common.loader” *line looks like: > > > *“common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/usr/share/java/mysql-connector-java.jar,/usr/share/cloudstack-mysql-ha/lib/*.jar”* > > 4) Edit the file *“/etc/cloudstack/management/db.properties”* > > *db.ha.enabled=true* > > *db.cloud.slaves=<slave IP address>* > > *db.usage.slaves=<slave IP address>* > > 5) Restart the management server. > > *“Service cloudstack-management restart”* > > > > *Regards,* > > *Rajasekhar.* > > On Thu, Jun 11, 2015 at 8:52 PM, Andrija Panic <andrija.pa...@gmail.com> > wrote: > > > HI Marcus, yes I'm familiar with that, that was my guess, based on some > > other ML thread :( > > > > Thx for confirmation... > > > > On 11 June 2015 at 17:03, Marcus <shadow...@gmail.com> wrote: > > > > > When I build CloudStack RPMs on 4.5 branch I get mysql ha RPMs. Looking > > at > > > the specfile: > > > > > > %if "%{_ossnoss}" == "noredist" > > > > > > %package mysql-ha > > > > > > Summary: Apache CloudStack Balancing Strategy for MySQL > > > > > > Requires: mysql-connector-java > > > > > > Requires: %{_tomcatversion} > > > > > > Group: System Environmnet/Libraries > > > > > > %description mysql-ha > > > > > > Apache CloudStack Balancing Strategy for MySQL > > > > > > > > > %endif > > > > > > > > > Looks like you need to "./package.sh -p noredist" when packaging. Not > > sure > > > what the equivalent is for .deb packaging. That means you also have to > > be > > > set up with the non-oss dependencies. If you're not familiar with that > > let > > > us know. > > > > > > On Thu, Jun 11, 2015 at 7:06 AM, Andrija Panic < > andrija.pa...@gmail.com> > > > wrote: > > > > > > > Actually, on another ACS installation, there is file: > > > > > > > > > > > > > > /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.2.jar > > > > (acs 4.3.2 :) ) > > > > > > > > But on this 4.5.1 there is no such file. > > > > > > > > Is it possible that we didnt compile 4.5.1 in appropriate way ? > > > > > > > > Thanks, > > > > Andrija > > > > > > > > On 11 June 2015 at 15:14, Andrija Panic <andrija.pa...@gmail.com> > > wrote: > > > > > > > > > Hi, > > > > > > > > > > I'm trying the DB HA setup, by chaning 3 lines in db.properties > file > > > > > (enable HA, define slaves for cloud, define slaves for usage DB) > > > > > > > > > > After restart, mgmt server doesn start with folowing error, as it > > seems > > > > > invalid load balancing strategy variable... > > > > > > > > > > Any clues on this ? > > > > > > > > > > mysql setup is galera 3 node cluster, 1st node being used as master > > in > > > > > db.properties, and only second node being used as slave (galera2 > > node) > > > > > I confirmed I can telnet, login etc... also mysql login from mgmt > to > > > > these > > > > > master/slaves works of course... > > > > > > > > > > > > > > > > > > > > 2015-06-11 14:25:03,149 INFO [c.c.u.d.T.Transaction] (main:null) > Is > > > Data > > > > > Base High Availiability enabled? Ans : true > > > > > 2015-06-11 14:25:03,191 INFO [c.c.u.d.T.Transaction] (main:null) > The > > > > > slaves configured for Cloud Data base is/are : 10.20.10.6 > > > > > 2015-06-11 14:25:03,269 ERROR [c.c.u.d.Merovingian2] (main:null) > > Unable > > > > to > > > > > get a new db connection > > > > > java.sql.SQLException: Invalid load balancing strategy > > > > > 'com.cloud.utils.db.StaticStrategy'. > > > > > at > > > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) > > > > > at > > > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) > > > > > at com.mysql.jdbc.Util.loadExtensions(Util.java:602) > > > > > at > > > > > > > > > > > > > > > com.mysql.jdbc.LoadBalancingConnectionProxy.<init>(LoadBalancingConnectionProxy.java:285) > > > > > at > > > > > > > > > > > > > > > com.mysql.jdbc.FailoverConnectionProxy.<init>(FailoverConnectionProxy.java:67) > > > > > at > > > > > > > > > > > > > > > com.mysql.jdbc.NonRegisteringDriver.connectFailover(NonRegisteringDriver.java:430) > > > > > at > > > > > > > > > > > > > > > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:343) > > > > > at > > java.sql.DriverManager.getConnection(DriverManager.java:571) > > > > > at > > java.sql.DriverManager.getConnection(DriverManager.java:215) > > > > > at > > > > > > > > > > > > > > > org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75) > > > > > at > > > > > > > > > > > > > > > org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) > > > > > at > > > > > > > > > > > > > > > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188) > > > > > at > > > > > > > > > > > > > > > org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) > > > > > at > > > > > > > > > > > > > > > com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:203) > > > > > at > > com.cloud.utils.db.Merovingian2.<init>(Merovingian2.java:68) > > > > > at > > > > > > > com.cloud.utils.db.Merovingian2.createLockMaster(Merovingian2.java:80) > > > > > at > > > > > > > com.cloud.server.LockMasterListener.<init>(LockMasterListener.java:33) > > > > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > > Method) > > > > > at > > > > > > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > > > > > at > > > > > > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > > > > > at > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:526) > > > > > at > > > > > > > > > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) > > > > > at > > > > > > > > > > > > > > > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) > > > > > at > > > > > > > > > > > > > > > org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) > > > > > at > > > > > > > > > > > > > > > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:145) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:122) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:245) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:250) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:233) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:117) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:70) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:57) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:61) > > > > > at > > > > > > > > > > > > > > > org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:52) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210) > > > > > at > > > > > > > > > org.apache.catalina.core.StandardContext.start(StandardContext.java:4709) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802) > > > > > at > > > > > > > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) > > > > > at > > > > > > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) > > > > > at > > > > > > > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) > > > > > at > > > > > org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) > > > > > at > > > > > > > > > > > > > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) > > > > > at > > > > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068) > > > > > at > > > > > org.apache.catalina.core.StandardHost.start(StandardHost.java:822) > > > > > at > > > > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) > > > > > at > > > > > > > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) > > > > > at > > > > > > > > > org.apache.catalina.core.StandardService.start(StandardService.java:525) > > > > > at > > > > > > > org.apache.catalina.core.StandardServer.start(StandardServer.java:759) > > > > > at > > > org.apache.catalina.startup.Catalina.start(Catalina.java:595) > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > > > > at > > > > > > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > > > at > > > > > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > > at > > > > org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > > > > at > > > > > > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > > > at > > > > > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > > at > > > > > > > > > > > > > > > org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243) > > > > > Caused by: java.lang.ClassNotFoundException: > > > > > com.cloud.utils.db.StaticStrategy > > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > > > > > at java.security.AccessController.doPrivileged(Native > Method) > > > > > at > java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > > > at java.lang.Class.forName0(Native Method) > > > > > ... 74 more > > > > > > > > > > -- > > > > > > > > > > Andrija Panić > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Andrija Panić > > > > > > > > > > > > > > > -- > > > > Andrija Panić > > > -- Andrija Panić