cancel
Showing results for 
Search instead for 
Did you mean: 

Improper Shutdown Issues

bentleyhg
Champ in-the-making
Champ in-the-making
Hi there Alfresco Community,

I have a question regarding an improper shutdown of Alfresco. I'm experiencing an issue after an improper shutdown that prevents me from accessing the Alfresco Web Client (I get an error 404 message when trying to connect).

The only solution I've found is to go to "C:\Alfresco\extras\databases\mysql" and then run the db_remove and db_setup bat files there. Obviously this isn't much of a solution because removing the database can cause lots of precious data to be lost. Luckily I've only run into this problem in a test environment, but our company has clients running Alfresco and I worry about the consequences that could arise if they were ever to shut down Alfresco improperly through accident or ignorance.

Any suggestions of a better method for handling this situation would be awesome!

Thanks
7 REPLIES 7

loftux
Star Contributor
Star Contributor
Its kind of unclear what the actual error is. After a shutdown you would expect to get a 404, or no answer at all  Smiley Happy
So it maybe is an improper shutdown, can you see any java process still around?
What does the alfresco.log say?
What happens when you try to restart? Anything in the alfresco.log then?
That makes it an error starting if so.

In any case, you should never need to mess with the db for shutdown/startup issues.
And give us the details on your environment, what database, os, app-server and alfresco version.

Peter Löfgren

bentleyhg
Champ in-the-making
Champ in-the-making
The error is more that after an improper shutdown, when I try to restart, I get errors and issues and can't access the web client. (That's when I get the 404 Error).

I know it seems kind of odd that the db_remove/setup is "fixing" the issue but so far that's the only way I've been able to rectify this issue.



Haha, sorry, I never know which are the crucial details to list.

I'm running version 2.1, in Windows XP. I'm using Tomcat and MySql

Here's a couple of Errors that caught my eye:

SEVERE: Error ListenerStart

SEVERE: context [/alfresco] startup failed due to previous errors

Here's a part of the log that I think is pertinent.

12:43:36,941 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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
12:43:36,941 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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
12:43:36,957 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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

Thanks

loftux
Star Contributor
Star Contributor
Looks like your db and data directory is out of sync. Since there is no important data in your db if I am correct, rebuild your db, but also delete the alf_data directory.
Then make sure that you use an absolute path to your data directory in custom-repository.properties (dir.root)

bentleyhg
Champ in-the-making
Champ in-the-making
Thanks so much for the help!  Smiley Very Happy

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

Also make sure that your Alfresco process has completely finished before you restart the server - if you have an improper shutdown there is a chance that the process won't actually terminate cleanly and you will have to terminate it manually.

Steve

bentleyhg
Champ in-the-making
Champ in-the-making
make sure that you use an absolute path to your data directory in custom-repository.properties (dir.root)

Hey Loftux, this might come across as a stupid question, but how can I find out where my data directory is?

The problem is coming back now and occurs even after a proper shutdown. When I try and start Alfresco again I get the error:

SEVERE: Error ListenerStart

SEVERE: context [/alfresco] startup failed due to previous errors

I'm pretty sure that it's not a lingering process that's causing the error because I've tried restarting the computer and even running a system Restore O_o.

loftux
Star Contributor
Star Contributor
Hey Loftux, this might come across as a stupid question, but how can I find out where my data directory is?

You can find the file custom-repository.properties in /tomcat/shared/classes/alfresco/extension.
In there you will find the commented our dir.root, just give that a absolute path. If not it is relative to your startup.
http://wiki.alfresco.com/wiki/Technical_Tips#Externalising_a_Configuration_2

But if you haven't moved things around, the relative path shouldn't be a problem.
Still the same error with the missing webscripts space? And that after you started fresh with new db and data directory. Then maybe your Alfresco install directory is missing something, it maybe comes up once, but it doesn't bootstrap properly and create the webscripts directory. Have you seen the space Data Dictionary/Web Scripts?