cancel
Showing results for 
Search instead for 
Did you mean: 

Lab3 Shutdown Error in log: sysAdmin Cache is not alive.

albertdbwong
Champ in-the-making
Champ in-the-making
Dear all

Would someone have any idea on why this error will be logged when the Lab3 server shuts down? Everything else seems to be working fine. Is this an installation or configuration issue?

ERROR [context.support.XmlWebApplicationContext] Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.IllegalStateException: The org.alfresco.cache.sysAdminCache Cache is not alive.
        at net.sf.ehcache.Cache.checkStatus(Cache.java:1588)
        at net.sf.ehcache.Cache.get(Cache.java:774)
        at net.sf.ehcache.Cache.get(Cache.java:755)
        at org.alfresco.repo.cache.EhCacheAdapter.get(EhCacheAdapter.java:87)
        at org.alfresco.repo.cache.TransactionalCache.get(TransactionalCache.java:347)
        at org.alfresco.repo.transaction.TransactionServiceImpl.isReadOnly(TransactionServiceImpl.java:82)
        at org.alfresco.repo.transaction.TransactionServiceImpl.getUserTransaction(TransactionServiceImpl.java:137)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:283)
        at org.alfresco.repo.transaction.RetryingTransactionAdvice.invoke(RetryingTransactionAdvice.java:73)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy153.onShutdown(Unknown Source)
        at org.alfresco.linkvalidation.LinkValidationServiceBootstrap.onShutdown(LinkValidationServiceBootstrap.java:62)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:73)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:676)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:651)
        at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:336)
        at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:74)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3805)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4364)
        at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893)
        at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1192)
        at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1163)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067)
        at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
        at org.apache.catalina.core.StandardService.stop(StandardService.java:510)
        at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.stop(Bootstrap.java:307)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.commons.daemon.support.DaemonLoader.stop(DaemonLoader.java:200)

Thank you very much in advance.
14 REPLIES 14

dna
Champ in-the-making
Champ in-the-making
Hi,

I have the same problem. What platform and what db are you using ?

Danielle

raghukumar_c
Champ in-the-making
Champ in-the-making
I too have the same problem. I have installed it on RHEL/Tomcat and use MySQL as the DB. However I read from a thread on log4j bug tracker that it has something to do with Tomcat/Struts. I am not sure about this though.

The horrible thing about this is that the Tomcat server doesnt stop, I need to manually kill it by finding its PID.

Has someone found a way around this. I even tried using the earlier version of Log4j - 1.2.14. But that doesnt make any difference.

-raghu

raghukumar_c
Champ in-the-making
Champ in-the-making
Is anyone else facing the same issue?

-raghu

albertdbwong
Champ in-the-making
Champ in-the-making
My setup environment is
Linux: SuSE SLES 10 sp2
Java: 1.5.0_14
Tomcat: 5.5.27
Database: MySQL 5.0.x
Alfresco deployed from the war

We are in testing phrase to upgrade our current v.2.0.0, because usage of the system as our DMS has increased sufficiently. it really seems it is not always the best idea to upgrade to the latest version… There are on and off a lot more log errors coming up for each restart.. sometimes the error will appear but sometimes not, even without any changes. Really strange.

Alfresco is really a good software but as with most cases, the documentation is slowing down the adoption speed.

mrogers
Star Contributor
Star Contributor
I'm trying to nail this problem down.

Could people please state whether they are seeing this problem on 3A, 3B or HEAD.    And whether this happens every time or just occasionally.

And also check to see whether the link validation service definition in public-services-context.xml looks like this; in particular the definition of "onShutdown". 

    <bean id="linkValidationServiceWriteTxnAdvisor"
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref bean="retryingWriteTxnAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                    <value>onBootstrap</value>
                    <value>onShutdown</value>
                    <value>setLinkValidationDisabled</value>
                    <value>updateHrefInfo</value>
            </list>
        </property>
    </bean>

raghukumar_c
Champ in-the-making
Champ in-the-making
Roger,

  I have pasted the part that is relevant to you. I have used Alfresco-Labs-3b-linux-x86-install.
Sorry to say this. I didn't want to remove the ^M characters because that is exactly the way you have it
in the public-services-context.xml. I think the ^M characters would have got in when the person who edited this file ftp'd it  between a unix/windows machine. Anyways, it is there in every config file under this installer distribution. I thought I will just mention that.
———————————————-
    <!– LinkValidationService –>^M
    <!– Read transaction advisor for link validation service. –>^M
    <bean id="linkValidationServiceReadTxnAdvisor"^M
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">^M
        <property name="advice">^M
            <ref bean="retryingReadTxnAdvice"/>^M
        </property>^M
        <property name="mappedNames">^M
            <list>^M
                    <value>getHrefManifest</value>^M
                    <value>getBrokenHrefManifest</value>^M
                    <value>getHrefDifference</value>^M
                    <value>getHrefManifestBrokenByNewOrMod</value>^M
                    <value>getHrefsDependentUponFile</value>^M
                    <value>getPollInterval</value>^M
                    <value>isLinkValidationDisabled</value>^M
            </list>^M
        </property>^M
    </bean>^M
^M
    <!– Write transaction advisor for link validation service. –>^M
    <bean id="linkValidationServiceWriteTxnAdvisor"^M
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">^M
        <property name="advice">^M
            <ref bean="retryingWriteTxnAdvice"/>^M
        </property>^M
        <property name="mappedNames">^M
            <list>^M
                    <value>onBootstrap</value>^M
                    <value>onShutdown</value>^M
                    <value>setLinkValidationDisabled</value>^M
                    <value>updateHrefInfo</value>^M
            </list>^M
        </property>^M
    </bean>^M
^M
    <bean id="LinkValidationService"^M
          class="org.springframework.aop.framework.ProxyFactoryBean"^M
          lazy-init="true">^M
        <property name="proxyInterfaces">^M
            <list>^M
                <value>org.alfresco.linkvalidation.LinkValidationService</value>^M
            </list>^M
        </property>^M
        <property name="targetName">^M
            <value>linkValidationService</value>^M
        </property>^M
        <property name="interceptorNames">^M
            <list>^M
                <value>linkValidationServiceWriteTxnAdvisor</value>^M
                <value>linkValidationServiceReadTxnAdvisor</value>^M
                <value>checkTxnAdvisor</value>^M
            </list>^M
        </property>^M
    </bean>^M
—————————————-
Answering your question, I always get this error and have to fetch the PID and kill it. Tomcat shutdown doesn't stop the server.

Thank you for looking into this.

Regards,
Raghu

dna
Champ in-the-making
Champ in-the-making
Hello all,

I'm using alfresco labs3b (126) donwloaded from http://dev.alfresco.com/downloads/nightly/dist/ (the one from 01/10/08) on windows vista sp1 with MySQL db v5.0.67.

I always have the problem when stopping the server but finaly (after a long time, one or two minutes) the console windows closes and I can restart the server without problems.

Here is a part of my "public-services-context.xml" :

<!– LinkValidationService –>
    <!– Read transaction advisor for link validation service. –>
    <bean id="linkValidationServiceReadTxnAdvisor"
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref bean="retryingReadTxnAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                    <value>getHrefManifest</value>
                    <value>getBrokenHrefManifest</value>
                    <value>getHrefDifference</value>
                    <value>getHrefManifestBrokenByNewOrMod</value>
                    <value>getHrefsDependentUponFile</value>
                    <value>getPollInterval</value>
                    <value>isLinkValidationDisabled</value>
            </list>
        </property>
    </bean>

    <!– Write transaction advisor for link validation service. –>
    <bean id="linkValidationServiceWriteTxnAdvisor"
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref bean="retryingWriteTxnAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                    <value>onBootstrap</value>
                    <value>onShutdown</value>
                    <value>setLinkValidationDisabled</value>
                    <value>updateHrefInfo</value>
            </list>
        </property>
    </bean>

    <bean id="LinkValidationService"
          class="org.springframework.aop.framework.ProxyFactoryBean"
          lazy-init="true">
        <property name="proxyInterfaces">
            <list>
                <value>org.alfresco.linkvalidation.LinkValidationService</value>
            </list>
        </property>
        <property name="targetName">
            <value>linkValidationService</value>
        </property>
        <property name="interceptorNames">
            <list>
                <value>linkValidationServiceWriteTxnAdvisor</value>
                <value>linkValidationServiceReadTxnAdvisor</value>
                <value>checkTxnAdvisor</value>
            </list>
        </property>
    </bean>

Hope this help.

Danielle

amit_wmw
Champ in-the-making
Champ in-the-making
Hello Danielle,

I tired, keeping the file configurations (alfresco.bat, alf_stop.bat, public-services-context.xml) exactly same as you have mentioned here and “I am sure that this is not working in windows XP” but “I am not sure about the same on Vista with sp1”. Still server needs to be stopped manually! After which it does not allows to execute program or restart server unless one cleans alf_data directory and recreates DB after dropping.

In between has anyone got any clue on the same? If, then please share.

Thanks and regards
Amit.

mrogers
Star Contributor
Star Contributor
I'm continuing to look into this.   The reason for me posting to this forum was that my instance of Labs3B on XP Service pack 3 does shut down.   Admittedly sometimes with error messages, sometimes with delay but it always shuts down.     And this was backed up by Danielle's posting.  There's clearly a problem somewhere but I can't nail it down.

I've investigated the log4j/Tomcat/Apache portable runtime exception and eliminated it as the cause of this problem.

In the meantime I'm in the middle of implementing a "ShutdownBackstop" feature which will terminate the JVM after a timeout.   This will address raghukumar.c 's problem and all the problems of alfresco failing to shutdown.

I would also like to emphasise that you should not need to resort to dropping the DB.   On windows if shutdown fouls up, kill the java process through the task manager.