cancel
Showing results for 
Search instead for 
Did you mean: 

Iptables causes Alfresco not to start up

tfrasch
Champ in-the-making
Champ in-the-making
Hey,

I have a problem with Alfresco Community 2.9B Tomcat Bundle on Debian. I get following the error:

23:19:09,503 User:System WARN  [remoting.rmi.RmiServiceExporter] Could not detect RMI registry - creating new one
23:19:09,509 User:System INFO  [quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED shutting down.
23:19:09,509 User:System INFO  [quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED paused.
23:19:09,509 User:System INFO  [quartz.simpl.SimpleThreadPool] There are still 15 worker threads active. See javadoc runInThread(Runnable) for a possible explanation
23:19:09,509 User:System DEBUG [quartz.simpl.SimpleThreadPool] shutdown complete
23:19:09,509 User:System INFO  [quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED shutdown complete.
23:19:09,517 User:System DEBUG [ehcache.store.MemoryStore] org.alfresco.cache.ticketsCache is persistent. Spooling 0 elements to the disk store.
23:19:09,518  DEBUG [ehcache.store.DiskStore] Spool Thread interrupted.
23:19:09,525 User:System DEBUG [ehcache.store.DiskStore] Deleting file org.alfresco.cache.ticketsCache.data
23:19:09,528 User:System ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter' defined in class path resource [alfresco/emailserver/email-service-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: internal error: ObjID already in use
Caused by: java.rmi.server.ExportException: internal error: ObjID already in use
        at sun.rmi.transport.ObjectTable.putTarget(Unknown Source)
        at sun.rmi.transport.Transport.exportObject(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
        at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
        at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
        at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
        at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
        at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
        at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:349)
        at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:325)
        at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:290)
        at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:233)
        at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:197)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
        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(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

My configuration is as follows:

Network (IPs were made anonymous):
iface eth0 inet static
     address 192.168.0.1
     netmask 255.255.255.255
     broadcast 192.168.201.223
     gateway 192.168.201.193
     pointopoint 192.168.201.193

     # * subnet IPs
     up ip addr add 10.0.0.137/29 dev eth0
     up ip addr add 10.0.0.138/29 dev eth0
     up ip addr add 10.0.0.139/29 dev eth0
     up ip addr add 10.0.0.140/29 dev eth0
     up ip addr add 10.0.0.141/29 dev eth0
     up ip addr add 10.0.0.142/29 dev eth0

/etc/hosts
127.0.0.1     localhost.localdomain   localhost
192.168.0.1   sirius.domain.de        sirius
10.0.0.142    alfresco.domain.de      alfresco

The hostname is "sirius". Services like bind, proftpd, apache, mysql & mail are all bound to the Main IP 192.168.0.1.

Alfresco is configured to run on IP 10.0.0.142:
tomcat/conf/server.xml
[…]
<Connector port="8080" address="10.0.0.142" URIEncoding="UTF-8" maxHttpHeaderSize="8192"
[…]

Alfresco is started using jre1.6.0_03 with
JAVA_OPTS='-Xms128m -Xmx512m -server -Djava.rmi.server.hostname=alfresco.domain.de'

I followed the Debian installation guide on wiki.alfresco.com
4 REPLIES 4

tfrasch
Champ in-the-making
Champ in-the-making
I tracked down that error to my firewall. If I shut down iptables everything works. But with iptables running, no chance.

This is my configuration:

Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     0    –  127.0.0.1            127.0.0.1
DROP       0    -f  0.0.0.0/0            0.0.0.0/0
tcpfilter  tcp  –  0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x04 limit: avg 10/sec burst 5
icmpfilter icmp –  0.0.0.0/0            0.0.0.0/0
udpfilter  udp  –  0.0.0.0/0            0.0.0.0/0
tcpfilter  tcp  –  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy DROP)
target     prot opt source               destination
icmpfilter icmp –  0.0.0.0/0            0.0.0.0/0
udpfilter  udp  –  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     0    –  127.0.0.1            127.0.0.1
icmpfilter icmp –  0.0.0.0/0            0.0.0.0/0
udpfilter  udp  –  0.0.0.0/0            0.0.0.0/0
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           state NEW,ESTABLISHED
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0

Chain icmpfilter (3 references)
target     prot opt source               destination
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0

Chain tcpfilter (2 references)
target     prot opt source               destination
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:20
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:21
           tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 state NEW recent: SET name: DEFAULT side: source
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 state NEW recent: UPDATE seconds: 600 hit_count: 4 name: DEFAULT side: source
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:53
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:443
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:25
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:587
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:110
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:995
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:143
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:8080
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:50500
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:135
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:139
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:445
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:1137
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:1139
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:1145
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:1433
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:2967
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:2968
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:5900
DROP       tcp  –  0.0.0.0/0            0.0.0.0/0           tcp dpt:10000
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0           state NEW
DROP       0    –  0.0.0.0/0            0.0.0.0/0

Chain udpfilter (3 references)
target     prot opt source               destination
ACCEPT     udp  –  0.0.0.0/0            0.0.0.0/0           udp dpt:53
ACCEPT     udp  –  0.0.0.0/0            0.0.0.0/0           udp dpt:137
ACCEPT     udp  –  0.0.0.0/0            0.0.0.0/0           udp dpt:138
ACCEPT     udp  –  0.0.0.0/0            0.0.0.0/0           udp dpt:1138
ACCEPT     udp  –  0.0.0.0/0            0.0.0.0/0           udp dpt:50500
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     0    –  0.0.0.0/0            0.0.0.0/0           state NEW
DROP       0    –  0.0.0.0/0            0.0.0.0/0

I configured the RMI service to run on port 50500. I put this into "tomcat/shared/classes/alfresco/extension/custom-remote-services-context.xml"
<beans>

        <bean id="avmRemoteService" class="org.springframework.remoting.rmi.RmiServiceExporter">
          <property name="service">
                  <ref bean="avmRemoteTransport"/>
        </property>
          <property name="serviceInterface">
                  <value>org.alfresco.service.cmr.remote.AVMRemoteTransport</value>
        </property>
          <property name="serviceName">
                  <value>avm</value>
        </property>
          <property name="registryPort">
                <value>${alfresco.rmi.services.port}</value>
          </property>
          <property name="servicePort">
                <value>50500</value>
          </property>
  </bean>

</beans>

Any suggestions?

msporled
Champ in-the-making
Champ in-the-making
Have you made any progress on this?  I'm tracking down issues with alfresco and ports and found that it opens a lot of stuff, mostly hard-wired to listen on localhost or all interfaces.  There doesn't seem to be an easy way to change either of these settings.

You will also find parts of alfresco that open a few random ports on startup, so good luck.

greendevil
Champ in-the-making
Champ in-the-making
I was getting the exact same (port 50500 in use) error when trying to install the labs 3a war file into an existing tomcat 5.5 instance that contained Liferay 5.1. I found that the avm service was also listening on the same port. If I did a full install of the labs 3a, there was no problem.

i.e.  <bean id="avmSyncServiceTransport" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl">
            <value>rmi://localhost:50500/avmsync</value>
        </property>

I changed the rmi entry in alfresco-shared.properties to 40500 and the issue went away. At least it now runs.

syslack
Champ in-the-making
Champ in-the-making
I don't know if it's a good solution, but it worked for me:

iptables -A INPUT -s 127.0.0.1 -j ACCEPT