Raymond Camden's Blog Rss

ColdFusion 9, Caching, IP_ADD_MEMBERSHIP Error

1

Posted in ColdFusion | Posted on 05-06-2010 | 2,705 views

I ran into a truly weird error today. I was building a very simple test script to load up my cache system with a lot of crap. This was the script I used:

view plain print about
1<cfloop index="x" from="1" to="3000">
2 <cfset id = "cache_#x#">
3 <cfset cached = cacheGet(id)>
4 <cfif isNull(cached)>
5 <cfset value = createUUID() & createUUID() & createUUID() &
6repeatString("foo", 250)
>

7 <cfset cachePut(id, value)>
8 </cfif>
9</cfloop>

Nothing crazy there, right? Well upon running this code I immediately got:

IP_ADD_MEMBERSHIP failed (out of hardware filters?)
net.sf.ehcache.CacheException: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
at
net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider.init(MulticastRMICacheManagerPeerProvider.java:93)
at net.sf.ehcache.CacheManager.init(CacheManager.java:241)
at net.sf.ehcache.CacheManager.(CacheManager.java:221)

I googled - and ran across a few things, but nothing made sense until Brian Kotek pointed out the following URL:

Error on MulticastSocket.joinGroup()

This led to the following Microsoft Tech Note:

How to disable the Media Sensing feature for TCP/IP in Windows

And that did the trick. This "Media Sense" feature (which by the way impacted my Windows machine but not a coworker) was the culprit. As soon as I did the regedit (wow, it's been a long time since I did one of those) and rebooted, everything worked perfectly.

Comments

[Add Comment] [Subscribe to Comments]

For those who run into this and the above link does not work (it worked for me the first time on a laptop, but not on my new Win7 desktop), try this suggestion from Pete Freitag:


You could try removing these lines from the ehcache.xml file:

<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>

<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>

It worked for me.