こんにちは私は2つのWebアプリケーションがあり、SSOを有効にするためにApache Shiroとehcacheを使用しています。マイehcache.xmlファイルはehcacheを使用しているときにRMI接続の問題
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true"
monitoring="autodetect" dynamicConfig="true" name="cache1">
<diskStore path="java.io.tmpdir/cache2" />
<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" />
<cache name="shiro-activeSessionCache" maxElementsInMemory="600"
eternal="true" overflowToDisk="true" memoryStoreEvictionPolicy="LFU">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
</cache>
<defaultCache maxElementsInMemory="100" eternal="true"
overflowToDisk="true" memoryStoreEvictionPolicy="LFU">
</defaultCache>
</ehcache>
枚この構成である私のrmi.server.hostname = 0.0.0.0の場合、しかし、原因私は
以下のように私のIPにそれを設定する必要があり、いくつかの理由により正常に動作します - その場合= 10.131.210.201
Djava.rmi.server.hostnameそのこの構成は
**java.rmi.ConnectException: Connection refused to host: 10.131.210.201;**
以下
これは、ファイアウォールの問題のようなにおいがします。 RMIアプリケーションは同じマシンで実行されていますか?その場合、以前はループバックインターフェイス(127.0.0.1)で通信していた可能性があります。 –
@JohnBollinger -Djava.rmi.server.hostname = 127.0.0.1それはうまく働いています しかし、問題は私のマシンのIPを与える場合です。 – robin
はい、すべてのアプリケーションが同じマシン上で実行されています – robin