AnsweredAssumed Answered

'Error updating database'

Question asked by sscbrian on Sep 29, 2014
Latest reply on Nov 24, 2014 by sscbrian
I've got logs full of that general error and I don't know what to do about it.  Not sure what forum to post in, but I'm guessing it's due to a configuration error?  Appears to have something to do with Activiti, which I believe is the workflow engine.  The errors have been going on for a long time, and workflows were working for the bulk of that time.  As of today, workflows no longer function, but we had a catastrophic failure trying to add the Records Management module over the weekend.  New errors could have been introduced, but the error logs actually look the same…  Could also be that it was just waiting for a reboot to fail?

**edit**

I was able to fix our workflow issues.  Apparently an amp went missing during the Records Management install.  However, these database errors continue.  Not only that, but I pulled historical logs and they've been going on for weeks before I tried the RM upgrade.  Appears to be a long running issue unrelated to my recent changes.


### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: cannot execute UPDATE in a read-only transaction
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.updateByteArray_postgres-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: ERROR: cannot execute UPDATE in a read-only transaction
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:120)
   at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:646)
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:458)
   at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:169)
   at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:116)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:70)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.TaskServiceImpl.getVariables(TaskServiceImpl.java:199)
   at org.alfresco.repo.workflow.activiti.properties.ActivitiPropertyConverter.getTaskProperties(ActivitiPropertyConverter.java:122)
   at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.getTaskProperties(ActivitiTypeConverter.java:485)
   at org.alfresco.service.cmr.workflow.LazyActivitiWorkflowTask.ensureProperties(LazyActivitiWorkflowTask.java:131)
   at org.alfresco.service.cmr.workflow.LazyActivitiWorkflowTask$LazyPropertiesMap.get(LazyActivitiWorkflowTask.java:212)
   at org.alfresco.service.cmr.workflow.LazyActivitiWorkflowTask$LazyPropertiesMap.get(LazyActivitiWorkflowTask.java:150)
   at org.alfresco.repo.web.scripts.workflow.WorkflowModelBuilder.isPooled(WorkflowModelBuilder.java:404)
   at org.alfresco.repo.web.scripts.workflow.WorkflowModelBuilder.buildSimple(WorkflowModelBuilder.java:196)
   at org.alfresco.repo.web.scripts.workflow.TaskInstancesGet.buildModel(TaskInstancesGet.java:187)
   at org.alfresco.repo.web.scripts.workflow.AbstractWorkflowWebscript.executeImpl(AbstractWorkflowWebscript.java:81)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   … 32 more
Caused by: org.postgresql.util.PSQLException: ERROR: cannot execute UPDATE in a read-only transaction
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:22)
   at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:51)
   at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:29)
   at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:87)
   at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:46)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:118)
   … 52 more

Outcomes