Dear Support
We have 2 exchange mail server and both are with this same name. There are two A reconds in dns (round robin)
eg:
nslookup mail.domain.com
Name: mail.domain.com
Address: 192.168.1.41
Name: mail.domain.com
Address: 192.168.1.42
They answer in a different order - one time 192.168.1.41 and second time 192.168.1.42 and so on
When we have maintenance of exchange mail server nr1 (192.168.1.41) then only one exchange server answers 192.168.1.42
Outgoing mail server on our jira is configured to talk with mail.domain.com
When exchange mail server nr1 is down jira loses connetion with mail server but it shouldn't because exchange server nr2 192.168.1.42 is still running and answer.
Do you know how to fix this problem in jira?
I send some logs:
ERROR [] Caesium-1-1 ServiceRunner Messaging Error when MailPullerWorker pulls emails from helpdesk@domain.com: Couldn't connect to host, port: mail.domain.com, 995; timeout 50000
Best regards
Marta
This is a Java problem, not a Jira or even Tomcat (the application server that runs Jira) one.
The java virtual machine caches DNS results by default. So when your Jira is trying to connect to mail.domain.com, it is not looking the name up on every connection, it's been given the cached result by Java. Your round-robin dns lookup is fine for spreading the load on the mail server around, but it is not load-balancing, and is going to let down any remote process that caches DNS.
You can disable the caching in Java - see https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html - but bear in mind this will make the Jira service do a name lookup on every single remote call it makes to anything, you may find it slows done some activities
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.