How to solve "Registry.rebind disallowed" exception when setting ehcache.listener.hostName

domruf September 10, 2021

I'm trying to setup Jira data center (version 8.16.1).

At first it looked fine. I created 2 nodes and I saw them on /plugins/servlet/cluster-monitoring

But I noticed the cluster addresses looked like dd72fc5dbc03:40001, where dd72fc5dbc03 is the docker internal hostname. Since these addresses are not reachable by the other nodes I also got "UnknownHostException: dd72fc5dbc03" error messages in the log output of the other node.

So I added

ehcache.listener.hostName = myrealhostname

to the cluster.properties file. But now I get errors like this

2021-09-10 10:35:11,432+0000 localhost-startStop-1 ERROR [c.a.jira.startup.ComponentContainerLauncher] A fatal error occurred during initialisation. JIRA has been locked.
net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //myserver.mydomain.net:40001/com.atlassian.jira.crowd.embedded.ofbiz.EagerOfBizUserCache.userCache. Initial cause was RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Registry.rebind disallowed; origin /172.19.0.1 is non-local host
at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:539)
at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:159)
...

 And now the Jira node is not even starting anymore.

If I remove ehcache.listener.hostName, Jira is starting again.

2 answers

0 votes
Prashant Sultania
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2022

Hello @domruf 

Welcome to Atlassian Community!!

To fix the issue, edit the cluster.properties file and edit/add the following statement on all the nodes.

ehcache.listener.hostName = localhost
ehcache.listener.port = 40001
ehcache.object.port = 40011


Hope, this will fix your issue.
Let me know in case of any further help.

 

Thanks,
Prashant Sultania

0 votes
domruf September 13, 2021

I have updated to 8.18.2 now.

Here, this problem no longer occurs.

But now I get

2021-09-13 10:28:40,787+0000 localq-reader-18 INFO [c.a.j.c.distribution.localq.LocalQCacheOpReader] [LOCALQ] [VIA-COPY] Checked exception: RecoverableFailure occurred when processing: LocalQCacheOp{cacheName='com.atlassian.jira.plugins.healthcheck.service.HeartBeatService.heartbeat', action=PUT, key=node_myserver.mydomain.net, value == null ? false, replicatePutsViaCopy=true, creationTimeInMillis=1631528905841} from cache replication queue: [queueId=queue_node_myservermydomainnet_8_9f775f718140ee876ac055b8b6c8f977_put, queuePath=/var/atlassian/application-data/jira/localq/queue_node_myservermydomainnet_8_9f775f718140ee876ac055b8b6c8f977_put], failuresCount: 1. Will not retry as this is a cache replicated by value. Removing from queue.
com.atlassian.jira.cluster.distribution.localq.LocalQCacheOpSender$RecoverableFailure: java.rmi.ConnectIOException: Exception creating connection to: 172.20.0.2; nested exception is:
java.net.SocketTimeoutException: connect timed out
...

Suggest an answer

Log in or Sign up to answer