• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

When running EHCache in distributed mode the method RMICacheManagerPeerListener.calculateHostAddress() returns IP address 6 on Linux with JDK 1.5.0_10 - which won’t work as the method Naming.rebind called in RMICacheManagerPeerListener.bind() is expecting an IPv4 address

InetAddress.getLocalHost().getHostAddress()

but getLocalHost() returns (as per the JavaDocs) the loopback NIC. This causes the cache to broadcast itself as listening to (in my case) 127.0.1.1:XXX which is inaccessible from other hosts. I’ve created a patch that returns the first IPv4 for NIC 0 (“eth0” in Linux, “en0” in OSX).

The attached file outlines the new code for RMICacheManagerPeerListener.calculateHostAddress(). Feel free to use it as you like. You can reach me at fredrikborgh at yahoo . com if you have any questions. Sourceforge Ticket ID: 1645341 - Opened By: nobody - 26 Jan 2007 14:37 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira