留言板

Installing a plugin in a MySQL Server Cluster Data Base

thumbnail
Alba García,修改在12 年前。

Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
Hi!
I have Liferay installed in several JBoss Servers in a farm configuration and a MySQL Server Cluster Data Base with two data nodes.

When I run the portal the data base is corrctly created but when I try to install one plugin with the Plugin Manager from the Liferay Portal that need to create a table in the lportal data base I found errors in all the JBoss nodes logs.

For example when I try to install the Open Social Portlet I found this:

2011-12-21 15:14:57,446 ERROR [org.hibernate.util.JDBCExceptionReporter] (main) Table 'lportal.opensocial_gadget' doesn't exist
2011-12-21 15:14:57,454 ERROR [com.liferay.portal.kernel.util.BasePortalLifecycle] (main) com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:195)
	at com.liferay.opensocial.service.persistence.GadgetPersistenceImpl.findAll(GadgetPersistenceImpl.java:794)
	at com.liferay.opensocial.service.persistence.GadgetPersistenceImpl.findAll(GadgetPersistenceImpl.java:714)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
	at com.liferay.portal.dao.shard.ShardAdvice.invokePersistence(ShardAdvice.java:241)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy555.findAll(Unknown Source)
	at com.liferay.opensocial.service.impl.GadgetLocalServiceImpl.initGadgets(GadgetLocalServiceImpl.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy554.initGadgets(Unknown Source)
	at com.liferay.opensocial.service.GadgetLocalServiceUtil.initGadgets(GadgetLocalServiceUtil.java:269)
	at com.liferay.opensocial.servlet.OpenSocialServletContextListener.doPortalInit(OpenSocialServletContextListener.java:67)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
	at com.liferay.opensocial.servlet.OpenSocialServletContextListener.contextInitialized(OpenSocialServletContextListener.java:42)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
	at $Proxy38.start(Unknown Source)
	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
	at org.jboss.system.ServiceController.start(ServiceController.java:460)
	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
	at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
	at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
	at org.jboss.Main.boot(Main.java:221)
	at org.jboss.Main$1.run(Main.java:556)
	at java.lang.Thread.run(Thread.java:662)



I was looking through the web, the Liferay Forum ,etc but I can't find the answer. Please help!!!


Software Version:

Centos 5
JBoss 5.1.0 GA
Liferay 6.0
MySQL Server Cluster 7
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
This is a known error. MySQL Server Cluster is still based on previous version of MySQL and there is some functionality limitation.

It's doesn't work with UTF8 encoding when using Liferay. If you are only using alphabet, try setting the encoding to ASCII or to any
single byte character set in your language.
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
My Database status:


Current database: lportal
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.47-ndb-7.0.16-cluster-gpl MySQL Cluster Server (GPL)
Protocol version: 10
Connection: 127.0.0.1 via TCP/IP
Server characterset: latin1
Db characterset: utf8
Client characterset: latin1
Conn. characterset: latin1


My portal-ext.properties


#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://192.168.1.26:5000/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=


Should I change my portal-ext.properties or my Database configuration?

Tanks Hitoshi!!!
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
You'll have to change your database encoding to some single byte encoding and also your portal-ext.properties characterEncoding to match that encoding.
Note, that changing encoding may disable some Liferay functionalities such as import/export and multilanguage support.

The other option is not to use MySQL cluster but to setup a MySQL HA. There are several tool to do this. Use synchronous update tool to
ensure proper data replication between master and slave. If performance is an issue, use asynchronous replication but be warned that some data maybe
lost if the system goes down.
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
Hitoshi Ozawa:
You'll have to change your database encoding to some single byte encoding and also your portal-ext.properties characterEncoding to match that encoding.
Note, that changing encoding may disable some Liferay functionalities such as import/export and multilanguage support.


I wouldn't like loosing these functionalities.


Hitoshi Ozawa:
The other option is not to use MySQL cluster but to setup a MySQL HA. There are several tool to do this. Use synchronous update tool to
ensure proper data replication between master and slave. If performance is an issue, use asynchronous replication but be warned that some data maybe
lost if the system goes down.


¿Is there another posibility? ¿What database do you recomend me (We don't have Oracle Cluster Licence)?


Thanks in advance and Happy Christmas!!!
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
I'm installing systems using MySQL HA, but you can try Postgresql. I think there was a cluster support.
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
Could you tell me more information about how are you installing systems
using MySQL HA
. I would like to try the confguration you use because you are a Liferay legend. emoticon


Thanks in advance!
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
You may find the following page of interest:
http://code.google.com/p/mysql-master-ha/

BTW, I'm learning much from trying to answer questions as much as from asking. emoticon
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
To start trying I have thought to create next HA configuration:

• Host 1 Master (MySQL Server)
• Host 2 Slave (MySQL Server+ MHA Manager)

The installation understand that s not difficult but ¿Is the Liferay and the HA architecture configuration difficult?


Thanks in advance!!! I'm learning asking too!! And also with your answers emoticon
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Is the Liferay and the HA architecture configuration difficult


I don't think it's that difficult. Test your system for failover and recovery after setting up to make sure it works. emoticon
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
BTW ¿Why are you installing MySQL HA instead of PostgreSQL o r any of the Databases which Liferay works with?
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Because of maintenance cost, downtime, and other SLAs factors.

Especially around topics around "vacuum". You'll know it when you try to write out all maintenance procedures.
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
Did you also use Sequoia + MySQL?

I've been reading this


But I'd like to know If you have ever use this configuration.


Thanks in advance!
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
Do you think this is a better solution?




Thanks in advance!!
thumbnail
Alba García,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

Junior Member 帖子: 49 加入日期: 11-2-10 最近的帖子
I'm afraid that I don't know what are SLAs factors? I'm unable to create the MySQL HA platform emoticon

I'm using Pacemaker + Corosyn + DRDB but I'm unable to get all the elements working together.


Help!!!
thumbnail
Jose Antonio Blaya,修改在12 年前。

RE: Installing a plugin in a MySQL Server Cluster Data Base

New Member 帖子: 8 加入日期: 11-10-19 最近的帖子
Tu eres muy de leyendas!