Forums de discussion

Problema configurazione cluster database

Sara Ceglie, modifié il y a 9 années.

Problema configurazione cluster database

New Member Publications: 9 Date d'inscription: 08/07/13 Publications récentes
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, modifié il y a 9 années.

RE: Problema configurazione cluster database

New Member Publications: 2 Date d'inscription: 20/03/14 Publications récentes
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, modifié il y a 9 années.

RE: Problema configurazione cluster database

Expert Publications: 375 Date d'inscription: 21/04/09 Publications récentes
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, modifié il y a 9 années.

RE: Problema configurazione cluster database

New Member Publications: 2 Date d'inscription: 20/03/14 Publications récentes
Grazie Denis,
ora funziona correttamente