AnsweredAssumed Answered

Error creating bean with name 'avmRemoteService'

Question asked by bleyton on Apr 6, 2012
Latest reply on Sep 18, 2014 by ranjitsinh.reval
In searching the forum, it seems like this problem has come up many times before, but none of the solutions works for me.  I had Alfresco working properly, then when I made changes to my content model, something broke and I started getting this error.  After trying all of the troubleshooting steps, I gave up.  I wiped out my opt/alfresco folder and started from scratch.  It still gave me this error, until I went back and put

127.0.0.1 alfresco

into the hosts file (alfresco is the server name).  Once I got it working, I installed the beCPG designer addon.  I started building a new model, wasn't able to get it to publish the module, so I tried a re-boot.  After rebooting, the "Error creating bean with name 'avmRemoteService'" error came back again, and I can't figure out how to fix it.

It seems to me that Alfresco is very sensitive to configuration issues, and if you have a problem, the server won't start up properly.  That makes it really difficult to debug.

Anyhow, here is my alfresco.log file.  Any assistance would be greatly appreciated.

09:27:11,184 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:27:11,532 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
09:27:50,217 WARN  [org.alfresco.util.AbstractTriggerBean] Job ehCacheTracerJob is not active/enabled
09:27:52,314 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:27:52,319 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:27:52,437 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:328)
   at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:236)
   at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
   at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
   at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:207)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:310)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:273)
   at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:281)
   at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:229)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
   … 37 more
Caused by: java.net.BindException: Address already in use
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
   at java.net.ServerSocket.bind(ServerSocket.java:336)
   at java.net.ServerSocket.<init>(ServerSocket.java:202)
   at org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory.createServerSocket(HostConfigurableSocketFactory.java:111)
   at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:667)
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:317)
   … 47 more
09:28:35,192 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:28:35,509 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:28:35,519 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:28:35,535 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:28:42,581 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 319 Web Scripts (+0 failed), 329 URLs
09:28:42,581 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
09:28:42,582 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
09:28:44,092 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 8538.089ms)
09:28:44,124 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:28:44,148 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:29:47,186 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:29:47,355 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
09:30:11,275 WARN  [org.alfresco.util.AbstractTriggerBean] Job ehCacheTracerJob is not active/enabled
09:30:13,228 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:30:13,234 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
09:30:13,261 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:328)
   at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:236)
   at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
   at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
   at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:207)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:310)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:273)
   at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:281)
   at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:229)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
   … 37 more
Caused by: java.net.BindException: Address already in use
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
   at java.net.ServerSocket.bind(ServerSocket.java:336)
   at java.net.ServerSocket.<init>(ServerSocket.java:202)
   at org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory.createServerSocket(HostConfigurableSocketFactory.java:111)
   at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:667)
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:317)
   … 47 more
09:30:42,925 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:30:44,558 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:30:44,563 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:30:44,576 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:30:48,866 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 319 Web Scripts (+0 failed), 329 URLs
09:30:48,867 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
09:30:48,867 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
09:30:50,326 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 5731.109ms)
09:30:50,359 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:30:50,387 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js

Outcomes