Error: java.rmi.UnknownHostException: Unknown host in Jira Datacenter or Server.
Summary
The following errors are observed in the logs :
2021-05-18 11:25:38,636+0200 localq-reader-8 ERROR [c.a.j.c.distribution.localq.LocalQCacheOpReader] [LOCALQ] [VIA-INVALIDATION] Abandoning sending: LocalQCacheOp{cacheName='78f333c9.0000000.bigpicture.LinkRepositoryCache', action=REMOVE, key=6416, value == null ? true, replicatePutsViaCopy=false, creationTimeInMillis=1621301646539} from cache replication queue: [queueId=queue_jira_node2_8_d1d61d3611ef690ebedc4dac0eaa3444, queuePath=/data/jira/localq/queue_jira_node2_8_d1d61d3611ef690ebedc4dac0eaa3444], failuresCount: 10/10. Removing from queue. Error: java.rmi.UnknownHostException: Unknown host: jira-hostname.com; nested exception is:
java.net.UnknownHostException: jira-hostname.com
com.atlassian.jira.cluster.distribution.localq.LocalQCacheOpSender$UnrecoverableFailure: java.rmi.UnknownHostException: Unknown host: jira-hostname.com; nested exception is:
java.net.UnknownHostException: jira-hostname.com
at com.atlassian.jira.cluster.distribution.localq.rmi.LocalQCacheOpRMISender.send(LocalQCacheOpRMISender.java:90)
at com.atlassian.jira.cluster.distribution.localq.LocalQCacheOpReader.run(LocalQCacheOpReader.java:96)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.rmi.UnknownHostException: Unknown host: jira-hostname.com; nested exception is:
java.net.UnknownHostException: jira-hostname.com
This error can cause multiple issues such as :
- One node not being able to stop https://confluence.atlassian.com/jirakb/jira-7-6-x-only-one-node-will-start-in-cluster-956699096.html
- Cluster replication errors
Environment
- Mulit-node cluster JIRA Data Center
Diagnosis
Check the clusternode table to verify if a hostname is used instead of IP address in the IP column
select * from clusternode;
Cause
- The nodes are having problems with DNS resolution
Solution
Use IP address instead of hostname for node communication
- Stop one node
Edit the cluster.properties file to add this line :
ehcache.listener.hostName=XX.XX.XX.XX
Replace XX.XX.XX.XX with the Ip-address of the current node & ensure there are no additional whitespaces after the IP address.
- Save the cluster.properties file and start that node.
- Then repeat the steps above for the other nodes.
Check the clusternode if the changes have been updated as well :
select * from clusternode;