We have 2 exchange mail server and both are with this same name. There are two A reconds in dns (round robin)
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 email@example.com: Couldn't connect to host, port: mail.domain.com, 995; timeout 50000
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
Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events