ehcache port issue

100 views
Skip to first unread message

lakshmi maha

unread,
Oct 15, 2020, 8:13:25 AM10/15/20
to ehcache-users
Hi Team,
WAS Liberty Version: com.ibm.websphere.liberty.v85_8.5.200004.20200401_1714
we have a usecase for Resetting credentials.Its a two step process:
1).User Verification - If user is verified, creating a sessionID and storing userProfile details in cache for next step.
2).Reset credts - checks created session Id and fetches userProfile to reset password.
To acheive this usecase our team tried to implement EHCache solution
We are facing the following error:
Tried below steps:
===============
a)added ehcache.xml under server instance directory
b)FabCaching-0.0.1-SNAPSHOT.jar placed under shared resources
c)added <feature>ejbRemote-3.2</feature> in server.xml and receiving the following error message.
10/13/20 10:31:26:956 GST] 00000cdb com.fab.login.reset.LoginResetResource                       I ################# sessionData : {"casenumber":"CASE-1","phoneNumber":"XXX","sessionId":"OGM4ZDM0YjMtZWI0OS00MzJlLWJhYTEtYjFlODFlMDdjNDZk","statusCode":"200"}
[10/13/20 10:31:27:031 GST] 00000c89 SystemOut                                                    O 10:31:27.030 [Replication Thread] WARN  n.s.e.d.RMIAsynchronousCacheReplicator - Unable to send message to remote peer.  Message was: Connection refused to host: X.X.X.X; nested exception is:
        java.net.ConnectException: Connection refused (Connection refused)
java.rmi.ConnectException: Connection refused to host: X.X.X.; nested exception is:
        java.net.ConnectException: Connection refused (Connection refused)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631) ~[na:1.8.0]
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228) ~[na:1.8.0]
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:214) ~[na:1.8.0]
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:141) ~[na:1.8.0]
        at net.sf.ehcache.distribution.RMICachePeer_Stub.send(Unknown Source) ~[RMICachePeer_Stub.class:2.10.2]
        at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.writeReplicationQueue(RMIAsynchronousCacheReplicator.java:314) [RMIAsynchronousCacheReplicator.class:2.10.2]
        at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:127) [RMIAsynchronousCacheReplicator.class:2.10.2]
        at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$000(RMIAsynchronousCacheReplicator.java:58) [RMIAsynchronousCacheReplicator.class:2.10.2]
        at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:389) [RMIAsynchronousCacheReplicator$ReplicationThread.class:2.10.2]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.Socket.connect(Socket.java:666) ~[na:1.8.0]
        at java.net.Socket.connect(Socket.java:606) ~[na:1.8.0]
        at java.net.Socket.<init>(Socket.java:469) ~[na:1.8.0]
        at java.net.Socket.<init>(Socket.java:239) ~[na:1.8.0]
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:52) ~[na:1.8.0]
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:160) ~[na:1.8.0]
        at net.sf.ehcache.distribution.ConfigurableRMIClientSocketFactory.createSocket(ConfigurableRMIClientSocketFactory.java:70) ~[ConfigurableRMIClientSocketFactory.class:2.10.2]
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:625) ~[na:1.8.0]

James House

unread,
Oct 15, 2020, 10:09:32 AM10/15/20
to ehcache-users
Connection refused is an indicator that either the wrong port number/address is being used, or the service on the other side is not running, or a firewall is blocking the connection.


--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/5144bddc-bdc7-49ff-8118-46c205acf06cn%40googlegroups.com.

lakshmi maha

unread,
Oct 15, 2020, 12:04:06 PM10/15/20
to ehcache-users
Hi John,

Please find the below configuration which we used in ehcache.xml file as per manual configuration.
we have used 40001 which is allowed on the network 
we have followed this doc to configure xml however the port is not listening in the server and getting the above error.
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual, rmiUrls=//hostname:40001/UserProfileCache" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=hostname, port=40001,SocketTimeoutMillis=3000" />

<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=hostname, port=40001,
socketTimeoutMillis=2000"/>
 

kindly help in fixing this issue.(hostname we have used fqdn of server)
Reply all
Reply to author
Forward
0 new messages