My Oracle Support Banner

Oracle API Gateway (OAG) Distributed Cache is Using a Random Port Causing Problems When a Firewall is Present (Doc ID 2136092.1)

Last updated on OCTOBER 07, 2022

Applies to:

Oracle API Gateway - Version and later
Information in this document applies to any platform.


On OAG 11.1.2.x-

Using a Oracle API Gateway (OAG) domain with 2 nodes and as a part of configuring high availability is to use distributed cache.
Distributed Cache was configured as per Oracle documentation:

Oracle API Gateway Administrator Guide (
Oracle API Gateway User Guide (

When testing the configuration with the environment firewall disabled, the information replicates successfully between the 2 nodes.
When testing with the firewall enabled, nothing is replicated, and the following exception is seen:

Exception on replication of putNotification. Exception creating connection to: <IP ADDRESS>:<PORT>; nested exception is: No route to host. Continuing...:
java.rmi.ConnectIOException: Exception creating connection to: <IP ADDRESS>:<PORT>; nested exception is: No route to host
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(
at sun.rmi.transport.tcp.TCPChannel.createConnection(
at sun.rmi.transport.tcp.TCPChannel.newConnection(
at sun.rmi.server.UnicastRef.invoke(
at net.sf.ehcache.distribution.RMICachePeer_Stub.put(Unknown Source)
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.replicatePutNotification(
at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.notifyElementUpdated(
at net.sf.ehcache.event.RegisteredEventListeners.notifyListener(
at net.sf.ehcache.event.RegisteredEventListeners.invokeListener(
at net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementUpdated(
at net.sf.ehcache.event.RegisteredEventListeners.notifyElementUpdated(
at net.sf.ehcache.Cache.notifyPutInternalListeners(
at net.sf.ehcache.Cache.putInternal(
at net.sf.ehcache.Cache.put(
at net.sf.ehcache.Cache.put(

After some investigation, it was found that ehcache (OAG Cache) uses RMI to replicate the required information between nodes, and by default RMI communication uses any available port in communication which will be an issue if a firewall is enabled.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.