<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"> 
<cacheManagerPeerProviderFactory class= 
"net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory" 
properties="peerDiscovery=manual, 
rmiUrls=//10.129.0.203:40000/UserCache|//10.129.0.203:40000/ReturnCache"/> <cacheManagerPeerListenerFactory 
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" 
properties="hostName=10.129.0.202,port=40000, socketTimeoutMillis=120000"/> <defaultCache 
maxElementsInMemory="10000" 
eternal="false" 
timeToIdleSeconds="120" 
timeToLiveSeconds="120" 
overflowToDisk="true" 
diskSpoolBufferSizeMB="30" 
maxElementsOnDisk="10000000" 
diskPersistent="false" 
diskExpiryThreadIntervalSeconds="120" 
memoryStoreEvictionPolicy="LRU" 
/> 
<cache name="UserCache" 
maxElementsInMemory="1000" 
eternal="false" 
timeToIdleSeconds="100000" 
timeToLiveSeconds="100000" 
overflowToDisk="false"> 
<cacheEventListenerFactory 
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/> 
</cache> 这是ehcache.xml的配置。 
下面是日志信息 

[08-7-8 9:24:02:327 CST] 000000bc ManualRMICach E TRAS0014I: 下列异常已记录 java.rmi.ConnectException: Connection refused to host: 10.129.0.203; nested exception is: 
java.net.ConnectException: Connection refused: connect 
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:585) 
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:203) 
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:189) 
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:329) 
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:89) 
at java.rmi.Naming.lookup(Naming.java:96) 
at net.sf.ehcache.distribution.RMICacheManagerPeerProvider.lookupRemoteCachePeer(RMICacheManagerPeerProvider.java:125) 
at net.sf.ehcache.distribution.ManualRMICacheManagerPeerProvider.listRemoteCachePeers(ManualRMICacheManagerPeerProvider.java:92) 
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.listRemoteCachePeers(RMISynchronousCacheReplicator.java:313) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.flushReplicationQueue(RMIAsynchronousCacheReplicator.java:305) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:122) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$100(RMIAsynchronousCacheReplicator.java:55) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:372) 
Caused by: java.net.ConnectException: Connection refused: connect 
at java.net.PlainSocketImpl.socketConnect(Native Method) 
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:331) 
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:196) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183) 
at java.net.Socket.connect(Socket.java:478) 
at java.net.Socket.connect(Socket.java:428) 
at java.net.Socket.<init>(Socket.java:335) 
at java.net.Socket.<init>(Socket.java:150) 
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) 
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:144) 
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:580) 
... 12 more 
。 
java.rmi.ConnectException: Connection refused to host: 10.129.0.203; nested exception is: 
java.net.ConnectException: Connection refused: connect 
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:585) 
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:203) 
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:189) 
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:329) 
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:89) 
at java.rmi.Naming.lookup(Naming.java:96) 
at net.sf.ehcache.distribution.RMICacheManagerPeerProvider.lookupRemoteCachePeer(RMICacheManagerPeerProvider.java:125) 
at net.sf.ehcache.distribution.ManualRMICacheManagerPeerProvider.listRemoteCachePeers(ManualRMICacheManagerPeerProvider.java:92) 
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.listRemoteCachePeers(RMISynchronousCacheReplicator.java:313) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.flushReplicationQueue(RMIAsynchronousCacheReplicator.java:305) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:122) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$100(RMIAsynchronousCacheReplicator.java:55) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:372) 
Caused by: java.net.ConnectException: Connection refused: connect 
at java.net.PlainSocketImpl.socketConnect(Native Method) 
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:331) 
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:196) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183) 
at java.net.Socket.connect(Socket.java:478) 
at java.net.Socket.connect(Socket.java:428) 
at java.net.Socket.<init>(Socket.java:335) 
at java.net.Socket.<init>(Socket.java:150) 
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) 
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:144) 
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:580) 
... 12 more [08-7-8 9:24:02:337 CST] 000000bc RMIAsynchrono W Exception on flushing of replication queue: Unable to list remote cache peers. Error was Connection refused to host: 10.129.0.203; nested exception is: 
java.net.ConnectException: Connection refused: connect. Continuing... 
[08-7-8 9:24:02:357 CST] 000000bc RMIAsynchrono W TRAS0014I: 下列异常已记录 net.sf.ehcache.CacheException: Unable to list remote cache peers. Error was Connection refused to host: 10.129.0.203; nested exception is: 
java.net.ConnectException: Connection refused: connect 
at net.sf.ehcache.distribution.ManualRMICacheManagerPeerProvider.listRemoteCachePeers(ManualRMICacheManagerPeerProvider.java:108) 
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.listRemoteCachePeers(RMISynchronousCacheReplicator.java:313) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.flushReplicationQueue(RMIAsynchronousCacheReplicator.java:305) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:122) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$100(RMIAsynchronousCacheReplicator.java:55) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:372) 
。 
net.sf.ehcache.CacheException: Unable to list remote cache peers. Error was Connection refused to host: 10.129.0.203; nested exception is: 
java.net.ConnectException: Connection refused: connect 
at net.sf.ehcache.distribution.ManualRMICacheManagerPeerProvider.listRemoteCachePeers(ManualRMICacheManagerPeerProvider.java:108) 
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.listRemoteCachePeers(RMISynchronousCacheReplicator.java:313) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.flushReplicationQueue(RMIAsynchronousCacheReplicator.java:305) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:122) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$100(RMIAsynchronousCacheReplicator.java:55) 
at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:372) 

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【shikonglaike】截止到2008-07-08 09:41:59的历史汇总数据(不包括此帖):
    发帖的总数量:9                        发帖的总分数:120                      每贴平均分数:13                       
    回帖的总数量:11                       得分贴总数量:0                        回帖的得分率:0%                       
    结贴的总数量:6                        结贴的总分数:60                       
    无满意结贴数:2                        无满意结贴分:40                       
    未结的帖子数:3                        未结的总分数:60                       
    结贴的百分比:66.67 %               结分的百分比:50.00 %                  
    无满意结贴率:33.33 %               无满意结分率:66.67 %                  
    楼主加油