cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco does not shutdown properly

simon
Champ in-the-making
Champ in-the-making
Alfresco,

We stop / backup / start Alfresco on a daily base on 4 different servers running 2.1 Community, Enterprise 1.4.1 and Enterprise 1.4.3 all on Red Hat Enterprise Linux 4 and "sometimes" Alfresco refuses to shutdown the way it should. We run Alfresco with Tomcat as available on the Alfresco website, no portal integration or other fancy stuff.

This problem is not new (had this with previous Alfresco versions as well) and it's not always consistant. When it happens Alfresco stops (web client not available anymore) and the shutdown output seems normal BUT the process is still running.

If this happens and I ran the 'alfresco.sh stop' command I tried to run the same command again which tells:
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
It's the same error as if you would run the 'alfresco.sh stop' 2x without delay.

Has anyone seen this behavior or any idea when this could happen? First I thought it had something to do with the shutdown while Alfresco was syncing with LDAP but this doesn't seem the problem. Maybe when someone is uploading a document or keeping a CIFS connection open? I have no idea…

Any hints or hooks could help, thanks!
13 REPLIES 13

compumedics
Champ in-the-making
Champ in-the-making
Well ,

I could not get upgrade to from version 2.0 to 2.1. I tried for 1 whole day many ways.

I fresh install, but fresh install is failed stright after I removed "test" files that by default created by the system.

WebFront displays me ***********

HTTP Status 404 - /alfresco/faces/jsp/dashboards/container.jsp

type Status report

message /alfresco/faces/jsp/dashboards/container.jsp

description The requested resource (/alfresco/faces/jsp/dashboards/container.jsp) is not available.
Apache Tomcat/5.5.23
******************************


Log shows : ********************

00:40:55,325 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Linux
   command:    convert /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_5207.gif  /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_5208.png
   succeeded:  false
   exit code:  1
   out:
   err:        java.io.IOException: convert: not found
00:40:58,660 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
00:41:00,395 WARN  [org.alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
00:41:03,737 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
00:41:05,637 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
00:41:07,081 WARN  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco 'dir.root' property is set to a relative path './alf_data'.  'dir.root' should be overridden to point to a specific folder.
00:41:07,081 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ./alf_data
00:41:07,480 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
00:41:07,801 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
00:41:08,311 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.5.0_11-b03; maximum heap size 493.063MB
00:41:08,312 WARN  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 493.063MB is less than recommended 512MB
00:41:08,312 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (484) schema 64 - Installed version 2.1.0 (484) schema 64
00:41:10,071 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.web.scripts.WebScriptException: Web Script Store workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts must exist; it was not found
        at org.alfresco.web.scripts.RepoStore$1$1.execute(RepoStore.java:218)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
        at org.alfresco.web.scripts.RepoStore$1.doWork(RepoStore.java:205)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260)
        at org.alfresco.web.scripts.RepoStore.init(RepoStore.java:201)
        at org.alfresco.web.scripts.RepoStore$ProcessorLifecycle.onBootstrap(RepoStore.java:187)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.alfresco.web.scripts.RepoStore.onApplicationEvent(RepoStore.java:176)
        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:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        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.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
00:41:10,074 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.alfresco.web.scripts.WebScriptException: Web Script Store workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts must exist; it was not found
        at org.alfresco.web.scripts.RepoStore$1$1.execute(RepoStore.java:218)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
        at org.alfresco.web.scripts.RepoStore$1.doWork(RepoStore.java:205)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260)
        at org.alfresco.web.scripts.RepoStore.init(RepoStore.java:201)
        at org.alfresco.web.scripts.RepoStore$ProcessorLifecycle.onBootstrap(RepoStore.java:187)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.alfresco.web.scripts.RepoStore.onApplicationEvent(RepoStore.java:176)
        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:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        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.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
00:41:10,077 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.web.scripts.WebScriptException: Web Script Store workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts must exist; it was not found
        at org.alfresco.web.scripts.RepoStore$1$1.execute(RepoStore.java:218)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
        at org.alfresco.web.scripts.RepoStore$1.doWork(RepoStore.java:205)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260)
        at org.alfresco.web.scripts.RepoStore.init(RepoStore.java:201)
        at org.alfresco.web.scripts.RepoStore$ProcessorLifecycle.onBootstrap(RepoStore.java:187)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.alfresco.web.scripts.RepoStore.onApplicationEvent(RepoStore.java:176)
        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:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        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.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
******************************

And it is not shutting down.
CIFS is up , but not authenicating.

compumedics
Champ in-the-making
Champ in-the-making
I had to go back to 2.0

But we are waiting for a working software built

simon
Champ in-the-making
Champ in-the-making
We installed Alfresco 2.1 Enterprise last week and stoped / started it +- 10 times by now, not a single instance stoped without killing it. The alfresco.sh scripts stops the Alfresco system but the process is still there.

andy
Champ on-the-rise
Champ on-the-rise
Hi

There was a non deamon timer thread holding shutdown up at one point - this has been fixed. Can you use jps and jstack to find out what threads are still active?

Andy

simon
Champ in-the-making
Champ in-the-making
Andy,

Sorry for the enourmous output that follows but this is the jstack trace from my Alfresco PID when I ran ./alfresco.sh stop. So, Alfresco stopped but Tomact is still running (I waited a few minutes before I ran the stack trace).

Does this ring a bell?

Thank you!
Attaching to process ID 22313, please wait…
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_06-b05
Thread 22313: (state = BLOCKED)


Thread 22419: (state = BLOCKED)
Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
   at … more needles lines

andy
Champ on-the-rise
Champ on-the-rise
Hi

It just says jstack is not working for that OS and JVM


Andy

tschiller
Champ in-the-making
Champ in-the-making
I am also not able to get alfresco server to shut down properly, but I think it is a different issue. This is what the screen says:

CompilerOracle: exclude org/apache/lucene/index/IndexReader$1 doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeDeletions
Nov 2, 2007 10:11:27 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 2, 2007 10:11:27 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2967 ms
Nov 2, 2007 10:11:28 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 2, 2007 10:11:28 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Nov 2, 2007 10:11:28 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 2, 2007 10:11:31 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
10:12:35,119 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
10:12:47,968 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.HSQLDialect.
10:12:48,017 INFO  [domain.schema.SchemaBootstrap] Alfresco is using the HSQL default database. Please only use this while evaluating Alfresco, it is NOT recommended for production or deployment!
10:12:48,839 INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
10:13:06,647 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
10:13:11,203 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …

10:13:11,283 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
10:13:17,312 WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
10:13:17,612 INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_02-b06; maximum heap size 506.313MB
10:13:18,313 INFO  [service.descriptor.DescriptorService] Alfresco license: Enterprise Network granted to Trial User liimited to 30 days expiring Fri Nov 30 00:0
0:00 CST 2007 (28 days remaining)
10:13:18,313 INFO  [service.descriptor.DescriptorService] Alfresco started (Enterprise Network): Current version 2.1.0 (112) schema 73 - Installed version 2.1.0 (112) schema 73
Nov 2, 2007 10:13:33 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 2, 2007 10:13:33 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Nov 2, 2007 10:13:33 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 125776 ms

<this is where I tried to shut it down>

Nov 2, 2007 10:21:30 AM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Nov 2, 2007 10:21:31 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Exception in thread "HSQLDB Timer @7a3a30" java.lang.NullPointerException
        at org.hsqldb.lib.HsqlTimer.nextTask(Unknown Source)
        at org.hsqldb.lib.HsqlTimer$TaskRunner.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)
Nov 2, 2007 10:21:39 AM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080


And then it just sits there forever! I usually just end up killing the process manually in Task Manager. I haven't changed anything from the standard out-of-the-box Enterprise trial install.

Any ideas?

kevinr
Star Contributor
Star Contributor
We have found the issue and fixed it for the next Enterprise release.

Kevin

steve
Champ in-the-making
Champ in-the-making
Hi,

The problem was is that it's waiting for OO to shutdown, so if it doesn't then Tomcat doesn't.
If you shut OO down you should find that the Tomcat process does complete it's shutdown.

We've added a timeout to this process to stop this happening.

Steve