AnsweredAssumed Answered

Starting Alfresco at system startup - problems

Question asked by dsandy on Aug 20, 2007
I am running Alfresco Community 2.0 on OS X 10.4.9, with MySQL Server.

I have experienced the following issue when trying to start Alfresco at system startup using Launchd.

1.  Issue the following command ./ start via Launchd
2.  Tomcat starts (:P) http://intranet:8080
3.  Alfresco is not responding (Tomcat error indicating that resource cannot be found.)   :cry:

By looking in the alfresco.log file I get the following errors:

"19:05:00,490 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Initialization of
bean failed; nested exception is Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is jav
a.rmi.AlreadyBoundException: alfresco/jmxrmi] Cannot bind to URL :evil: [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfr
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(
        at org.apache.catalina.core.StandardContext.listenerStart(
        at org.apache.catalina.core.StandardContext.start(
        at org.apache.catalina.core.ContainerBase.addChildInternal(
        at org.apache.catalina.core.ContainerBase.addChild(
        at org.apache.catalina.core.StandardHost.addChild(
        at org.apache.catalina.startup.HostConfig.deployWAR(
        at org.apache.catalina.startup.HostConfig.deployWARs(
        at org.apache.catalina.startup.HostConfig.deployApps(
        at org.apache.catalina.startup.HostConfig.start(
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
        at org.apache.catalina.core.ContainerBase.start(
        at org.apache.catalina.core.StandardHost.start(
        at org.apache.catalina.core.ContainerBase.start(
        at org.apache.catalina.core.StandardEngine.start(
        at org.apache.catalina.core.StandardService.start(
        at org.apache.catalina.core.StandardServer.start(
        at org.apache.catalina.startup.Catalina.start(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.catalina.startup.Bootstrap.start(
        at org.apache.catalina.startup.Bootstrap.main(
Caused by: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
        at com.sun.jndi.rmi.registry.RegistryContext.bind(
        at com.sun.jndi.toolkit.url.GenericURLContext.bind(
        at javax.naming.InitialContext.bind(
        … 35 more
"  and lots more as well.

Basically, if I do not try to start Alfresco up at system startup, but do so manually, this problem does not occur.

Also, if you try to stop Alfresco, or Kill JAVA and then restart Alfresco, the problem still exists.

From looking at the other posts for similar messages, this error would normally occur if another instance of alfresco or other Java APP was listening to RMI port 50500.

I don't have a solution to this other than my system is now working again.  So if anyone knows how to configure Alfresco on OS X to start at system startup, that would be great.