Tomcat cluster fails to start on OS X Lion

August 17th, 2011 | Tags:

In the process of upgrading my dev environment to OS X Lion I discovered that Tomcat failed to start up correctly.

I discovered the following in the log files:

2011-08-15 18:06:24,605 [] INFO  o.a.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/6.0.32
2011-08-15 18:06:24,606 [] INFO  o.a.catalina.ha.tcp.SimpleTcpCluster - Cluster is about to start
2011-08-15 18:06:24,650 [] INFO  o.a.c.tribes.transport.ReceiverBase - Receiver Server Socket bound to:/127.0.0.1:5000
2011-08-15 18:06:24,660 [] INFO  o.a.c.tribes.membership.McastService - Attempting to bind the multicast socket to /228.0.0.4:45564
2011-08-15 18:06:24,668 [] INFO  o.a.c.tribes.membership.McastService - Setting multihome multicast interface to:/127.0.0.1
2011-08-15 18:06:24,669 [] INFO  o.a.c.tribes.membership.McastService - Setting cluster mcast soTimeout to 500
2011-08-15 18:06:24,673 [] INFO  o.a.c.tribes.membership.McastService - Sleeping for 1000 milliseconds to establish cluster membership, start level:4
2011-08-15 18:06:25,675 [] INFO  o.a.c.tribes.membership.McastService - Done sleeping, membership established, start level:4
2011-08-15 18:06:25,681 [] ERROR o.a.catalina.ha.tcp.SimpleTcpCluster - Unable to start cluster.
org.apache.catalina.tribes.ChannelException: java.io.IOException: Can't assign requested address; No faulty members identified.

After some checking of my /etc/hosts file and a couple other things I found a very relevant Tomcat Cluster troubleshooting tip.

I added the following to my catalina.sh file for the JAVA_OPTS variable, and Tomcat started up as usual:

-Djava.net.preferIPv4Stack=true

Turns out it was trying to setup the Tomcat cluster on my IPv6 interface and then I assume trying to access it via the IPv4 interface. Obviously they couldn’t communicate.

I’ve never had to do this on any prior version of OS X, nor any of my Linux machines.

No comments yet.
You must be logged in to post a comment.