Server crash

Bug and problem reporting on Cyclos 4 version

Moderators: hugo, alexandre, rmvanarkel

Post Reply
stanfidu
Posts: 7
Joined: Thu Apr 04, 2019 1:45 pm

Server crash

Post by stanfidu »

Hello everyone,

Please help me I found this info on log file on Jelastic

2020-01-24T21:23:42.841Z Expired sessions purging
org.cyclos.model.UnexpectedDataAccessException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.2.v20180622-f627448): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database!
Error Code: 0
Call: DELETE FROM sessions WHERE (session_token = ?)
bind => [1 parameter bound]
Query: DeleteAllQuery(referenceClass=Session sql="DELETE FROM sessions WHERE (session_token = ?)")
at org.cyclos.impl.InvokerHandler.translateException(InvokerHandler.java:99)
at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:189)
at org.cyclos.impl.InvokerHandlerImpl.runAsInTransaction(InvokerHandlerImpl.java:168)
at org.cyclos.impl.access.SessionHandlerImpl.purgeExpired(SessionHandlerImpl.java:477)
at org.cyclos.impl.access.PurgeSessionsPollingTask.execute(PurgeSessionsPollingTask.java:61)
at org.cyclos.impl.utils.tasks.SimplePollingTask.doExecute(SimplePollingTask.java:99)
at org.cyclos.impl.utils.tasks.SimplePollingTask.doRun(SimplePollingTask.java:70)
at org.cyclos.impl.utils.tasks.AbstractPollingTask.run(AbstractPollingTask.java:77)
at org.cyclos.impl.utils.cluster.AbstractClusterHandlerImpl.runPollingTask(AbstractClusterHandlerImpl.java:153)
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.cyclos.bootstrap.BeanHandlerImpl$CustomBeanInvocationHandler.invoke(BeanHandlerImpl.java:84)
at com.sun.proxy.$Proxy18.runPollingTask(Unknown Source)
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
at com.sun.proxy.$Proxy28.runPollingTask(Unknown Source)
at org.cyclos.impl.utils.tasks.PollingTaskHandlerImpl.lambda$1(PollingTaskHandlerImpl.java:184)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.2.v20180622-f627448): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database!
Error Code: 0
Call: DELETE FROM sessions WHERE (session_token = ?)
bind => [1 parameter bound]
Query: DeleteAllQuery(referenceClass=Session sql="DELETE FROM sessions WHERE (session_token = ?)")
at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:310)
at com.querydsl.jpa.impl.JPADeleteClause.execute(JPADeleteClause.java:70)
at org.cyclos.impl.access.SessionHandlerImpl.remove(SessionHandlerImpl.java:488)
at org.cyclos.impl.access.SessionHandlerImpl.lambda$0(SessionHandlerImpl.java:478)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.runEnsuringInvocationContext(TransactionHandlerImpl.java:183)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.doRun(TransactionHandlerImpl.java:109)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:159)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:80)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
at com.sun.proxy.$Proxy20.run(Unknown Source)
at org.cyclos.impl.InvokerHandlerImpl.performInTransaction(InvokerHandlerImpl.java:238)
at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:187)
... 28 more

alexandre
Posts: 913
Joined: Wed Sep 06, 2006 9:06 am

Re: Server crash

Post by alexandre »

Hi,

This logs says that the database could not be contacted when Cyclos tried to delete a session.
You you was restarting your enviroment or something like, seems that the database was stopped while Cyclos was still active.

Regards
Alexandre Caurrinhos
Cyclos development team.

stanfidu
Posts: 7
Joined: Thu Apr 04, 2019 1:45 pm

Re: Server crash

Post by stanfidu »

alexandre wrote:
Mon Jan 27, 2020 2:17 pm
Hi,

This logs says that the database could not be contacted when Cyclos tried to delete a session.
You you was restarting your enviroment or something like, seems that the database was stopped while Cyclos was still active.

Regards
Thx Alexandre
But, does Cyclos purge sessions itself when the qty reach the limit? If so, how to prevent that?

alexandre
Posts: 913
Joined: Wed Sep 06, 2006 9:06 am

Re: Server crash

Post by alexandre »

Hi,

It's something related to your environment, not a Cyclos problem.
The log says that cannot communicate with the database: Connections could not be acquired from the underlying database!

You should make sure the database server (postgresql) must be online and accepting connections.

regards
Alexandre Caurrinhos
Cyclos development team.

stanfidu
Posts: 7
Joined: Thu Apr 04, 2019 1:45 pm

Re: Server crash

Post by stanfidu »

Everything is ok when i restart the server. I was just trying to get the cause of the problem and try to prevent that in future. Thanks!

Post Reply