留言板

Problema configurazione cluster database

Sara Ceglie,修改在9 年前。

Problema configurazione cluster database

New Member 帖子: 9 加入日期: 13-7-8 最近的帖子
Salve a tutti,
sulla nostra istanza Liferay CE 6.2 su Tomcat 7 abbiamo utilizzato la configurazione documentata qui Read-Writer Database Configuration per gestire più istanze di db (singolo master). Il portare risponde sostanzialmente in maniera corretta tranne che al momento della di generazione di nuovi siti: viene generato - in seguito a messaggio di fallimento dell'interfacci di amministrazione - un sito completamente vuoto. Tutto invece funziona tornando alla configurazione con singolo nodo db.
Il db utilizzato è Postgresql 9.2. Apparentemente non vengono loggate a livello di db chiamate in scrittura sui nodi slave. Non capiamo quale possa essere il problema.
Qualsiasi suggerimento è bene accetto.

Grazie in anticipo.
Diego Vicentini,修改在9 年前。

RE: Problema configurazione cluster database

New Member 帖子: 2 加入日期: 14-3-20 最近的帖子
Questo è quello che si vede nel log (catalina.out) appena dopo il tentativo di creazione del nuovo site social office:

09:11:14,037 ERROR [ajp-apr-7009-exec-4][JDBCExceptionReporter:82] Batch entry 1 insert into ResourcePermission (companyId, name, scope, primKey, roleId, own
erId, actionIds, resourcePermissionId) values ('10157', 'com.liferay.portal.model.Layout', '4', '82949', '10168', '0', '1', '8651') was aborted. Call getNex
tException to see the cause.
09:11:14,087 ERROR [ajp-apr-7009-exec-4][JDBCExceptionReporter:82] ERRORE: un valore chiave duplicato viola il vincolo univoco "resourcepermission_pkey"_ De
tail: La chiave (resourcepermissionid)=(8651) esiste già. [Sanitized]
09:11:14,093 ERROR [ajp-apr-7009-exec-4][SitesImpl:1279] com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.exception.SystemExcept
ion: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.
hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
thumbnail
Denis Signoretto,修改在9 年前。

RE: Problema configurazione cluster database

Expert 帖子: 375 加入日期: 09-4-21 最近的帖子
Ciao Sara,
per questioni di performance il Counter utilizza un prorio datasource (counterDataSource) che prende i valori dalla configuraizone jdbc di default (vedi property counter.jdbc.prefix).

##
## Counter
##
#
# The counter operates with its own data source to prevent deadlocks. By
# default, the data source created for the counter uses the same settings as
# those used to create the data source used for the rest of the portal. That
# happens because the counter service will look up the properties prefixed
# with "jdbc.default." to create its data source. See the JDBC properties
# prefixed with "jdbc.default." for more information.
#
# Setting a different value for the counter JDBC prefix allows you to better
# fine tune the counter data source with its own set of configuration
# settings for high availability installations. Note that these settings,
# though separate, are a copy of the default settings with the newly
# overridden values.
#
counter.jdbc.prefix=jdbc.default.


Hai già provato a forzare che il counter punti direttamente al nodo che si occupa delle scritture settando la seguente property ?

counter.jdbc.prefix=jdbc.write.


Ciao,
Denis.
Diego Vicentini,修改在9 年前。

RE: Problema configurazione cluster database

New Member 帖子: 2 加入日期: 14-3-20 最近的帖子
Grazie Denis,
ora funziona correttamente