You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by nicolas lavoillotte <ni...@gmail.com> on 2013/11/21 08:40:06 UTC

DatabaseException : connexion closed

MCF 1.4.0

Hello,

MCF is connected to a PostgreSQL server .
Every night (09:00 am) the database server is stopped for a cold backup,
and restarts ten minutes later.

I have no job sheduled,  and MCF generates
The following exception before stopping.

ERROR 2013-11-20 21:07:27,935 (main) - Exception: Database exception :
SQLException doing query ( 08003 ) : This connection has-been closed.
org.apache.manifoldcf.core.interfaces.ManifoldCFException : Database
exception : SQLException doing query ( 08003 ) : This connection has-been
closed.
at org.apache.manifoldcf.core.database.Database.executeViaThread (
Database.java : 723 )
at org.apache.manifoldcf.core.database.Database.executeUncachedQuery (
Database.java : 770)
org.apache.manifoldcf.core.database.Database at $ QueryCacheExecutor.create
( Database.java 1437 )
at
org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute
( CacheManager.java : 144)
at org.apache.manifoldcf.core.database.Database.executeQuery (
Database.java : 191 )
at
at org.apache.manifoldcf.core.database.BaseTable.performQuery (
BaseTable.java : 221 )
at org.apache.manifoldcf.agents.agentmanager.AgentManager.getAllAgents (
AgentManager.java : 218)
at org.apache.manifoldcf.agents.system.ManifoldCF.startAgents (
ManifoldCF.java : 147 )
at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.runAgents (
ManifoldCFJettyRunner.java : 150)
at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main (
ManifoldCFJettyRunner.java : 244 )
Caused by: org.postgresql.util.PSQLException : This connection has-been
closed.
at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed (
AbstractJdbc2Connection.java : 714)
at org.postgresql.jdbc3.AbstractJdbc3Connection.createStatement (
AbstractJdbc3Connection.java : 230)
at org.postgresql.jdbc2.AbstractJdbc2Connection.createStatement (
AbstractJdbc2Connection.java : 191 )
at org.apache.manifoldcf.core.database.Database.execute ( Database.java :
840 )
org.apache.manifoldcf.core.database.Database at $ ExecuteQueryThread.run (
Database.java : 683 )

How can I do to avoid restart MCF daily

regards

nicolas

Re: DatabaseException : connexion closed

Posted by Karl Wright <da...@gmail.com>.
Hi Nicolas,

MCF requires its database to be running in order to function.  If you shut
it down, MCF will stop functioning.

If you know the window when the database is going down, I suggest you set
up a cron job that shuts down your MCF process before the database goes
away, and brings it back up when the database is alive again.  Either that
or get a PostgreSQL installation that you control.

Thanks,
Karl



On Thu, Nov 21, 2013 at 2:40 AM, nicolas lavoillotte <
nicolas.lavoillotte@gmail.com> wrote:

> MCF 1.4.0
>
> Hello,
>
> MCF is connected to a PostgreSQL server .
> Every night (09:00 am) the database server is stopped for a cold backup,
> and restarts ten minutes later.
>
> I have no job sheduled,  and MCF generates
> The following exception before stopping.
>
> ERROR 2013-11-20 21:07:27,935 (main) - Exception: Database exception :
> SQLException doing query ( 08003 ) : This connection has-been closed.
> org.apache.manifoldcf.core.interfaces.ManifoldCFException : Database
> exception : SQLException doing query ( 08003 ) : This connection has-been
> closed.
> at org.apache.manifoldcf.core.database.Database.executeViaThread (
> Database.java : 723 )
> at org.apache.manifoldcf.core.database.Database.executeUncachedQuery (
> Database.java : 770)
> org.apache.manifoldcf.core.database.Database at $ QueryCacheExecutor.create
> ( Database.java 1437 )
> at
> org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute
> ( CacheManager.java : 144)
> at org.apache.manifoldcf.core.database.Database.executeQuery (
> Database.java : 191 )
> at
> at org.apache.manifoldcf.core.database.BaseTable.performQuery (
> BaseTable.java : 221 )
> at org.apache.manifoldcf.agents.agentmanager.AgentManager.getAllAgents (
> AgentManager.java : 218)
> at org.apache.manifoldcf.agents.system.ManifoldCF.startAgents (
> ManifoldCF.java : 147 )
> at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.runAgents (
> ManifoldCFJettyRunner.java : 150)
> at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main (
> ManifoldCFJettyRunner.java : 244 )
> Caused by: org.postgresql.util.PSQLException : This connection has-been
> closed.
> at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed (
> AbstractJdbc2Connection.java : 714)
> at org.postgresql.jdbc3.AbstractJdbc3Connection.createStatement (
> AbstractJdbc3Connection.java : 230)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.createStatement (
> AbstractJdbc2Connection.java : 191 )
> at org.apache.manifoldcf.core.database.Database.execute ( Database.java :
> 840 )
> org.apache.manifoldcf.core.database.Database at $ ExecuteQueryThread.run (
> Database.java : 683 )
>
> How can I do to avoid restart MCF daily
>
> regards
>
> nicolas
>