Ehcache Problem Shoot
Today, I login my VPN account to test my application. I met a problem. The log statements are as follows:
10:18:46,475 ERROR [MulticastRMICacheManagerPeerProvider] Error starting heartbeat. Error was: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
java.net.SocketException: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
at java.net.PlainDatagramSocketImpl.join(Native Method)
at java.net.PlainDatagramSocketImpl.join(Unknown Source)
at java.net.MulticastSocket.joinGroup(Unknown Source)
at net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatReceiver.init(MulticastKeepaliveHeartbeatReceiver.java:78)
at net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider.init(MulticastRMICacheManagerPeerProvider.java:89)
at net.sf.ehcache.CacheManager.init(CacheManager.java:228)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:160)
at net.sf.ehcache.CacheManager.create(CacheManager.java:419)
at net.tss.app.utils.Utility.<clinit>(Utility.java:121)
at net.tss.vendors._1800flowers.statemachine.F1800OrderUtility.<clinit>(F1800OrderUtility.java:65)
at net.tss.vendors._1800flowers.statemachine.F1800PayPalOrderProcessor.<init>(F1800PayPalOrderProcessor.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.tss.app.statemachine.StateMachineFactory.makeObject(StateMachineFactory.java:28)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1179)
at net.tss.app.statemachine.StateMachineFactory.getInstance(StateMachineFactory.java:95)
at net.tss.vendors._1800flowers.statemachine.F1800PayPalOrderProcessorTest.testGetPayPalToken(F1800PayPalOrderProcessorTest.java:39)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
I used to use jgroup to do multicast ehcache. I think the problem is there. Because I do not need jgroup and others in my application. So I just simply comments the configuration in ehcache.xml:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
Everything is fine after that.
Today, I login my VPN account to test my application. I met a problem. The log statements are as follows:
10:18:46,475 ERROR [MulticastRMICacheManagerPeerProvider] Error starting heartbeat. Error was: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
java.net.SocketException: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
at java.net.PlainDatagramSocketImpl.join(Native Method)
at java.net.PlainDatagramSocketImpl.join(Unknown Source)
at java.net.MulticastSocket.joinGroup(Unknown Source)
at net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatReceiver.init(MulticastKeepaliveHeartbeatReceiver.java:78)
at net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider.init(MulticastRMICacheManagerPeerProvider.java:89)
at net.sf.ehcache.CacheManager.init(CacheManager.java:228)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:160)
at net.sf.ehcache.CacheManager.create(CacheManager.java:419)
at net.tss.app.utils.Utility.<clinit>(Utility.java:121)
at net.tss.vendors._1800flowers.statemachine.F1800OrderUtility.<clinit>(F1800OrderUtility.java:65)
at net.tss.vendors._1800flowers.statemachine.F1800PayPalOrderProcessor.<init>(F1800PayPalOrderProcessor.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.tss.app.statemachine.StateMachineFactory.makeObject(StateMachineFactory.java:28)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1179)
at net.tss.app.statemachine.StateMachineFactory.getInstance(StateMachineFactory.java:95)
at net.tss.vendors._1800flowers.statemachine.F1800PayPalOrderProcessorTest.testGetPayPalToken(F1800PayPalOrderProcessorTest.java:39)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
I used to use jgroup to do multicast ehcache. I think the problem is there. Because I do not need jgroup and others in my application. So I just simply comments the configuration in ehcache.xml:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
Everything is fine after that.