Unable to connect to the MTA

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
Rama
Posts: 15
Joined: Fri Feb 09, 2018 12:00 pm

Unable to connect to the MTA

Post by Rama »

Hi All,
We have a Zimbra-8.8.8 multi server setup done.
prdmta1.prod.colo & prdmta2.prod.colo are configured round-robin hostname zimbra.prod.colo that serve ldap MMR + MTA active/active + Proxy + memcache. Where prdzmb.prod.colo serves as mailbox server.

The setup is fine for now. In mailbox server we set zimbraSmtpHostname as zimbra.prod.colo(round-robin name). The problem is mailbox server always using first MTA hostname when relaying messages. If that host down for any reason, mailbox server is unable to relay messages and giving error try again: Unable to connect to the MTA for sometime. If we keep retrying sending mails, then mailbox server connects next available MTA.

Can anyone please help us. Does Zimbra recommends round-robin smtp or active & failover smtp. :idea:
User avatar
tonster
Zimbra Employee
Zimbra Employee
Posts: 313
Joined: Fri Feb 21, 2014 10:14 am
Location: Ypsilanti, MI
ZCS/ZD Version: Release 8.7.0_GA_1659.RHEL6_64_2016

Re: Unable to connect to the MTA

Post by tonster »

Rama wrote:Hi All,
We have a Zimbra-8.8.8 multi server setup done.
prdmta1.prod.colo & prdmta2.prod.colo are configured round-robin hostname zimbra.prod.colo that serve ldap MMR + MTA active/active + Proxy + memcache. Where prdzmb.prod.colo serves as mailbox server.

The setup is fine for now. In mailbox server we set zimbraSmtpHostname as zimbra.prod.colo(round-robin name). The problem is mailbox server always using first MTA hostname when relaying messages. If that host down for any reason, mailbox server is unable to relay messages and giving error try again: Unable to connect to the MTA for sometime. If we keep retrying sending mails, then mailbox server connects next available MTA.

Can anyone please help us. Does Zimbra recommends round-robin smtp or active & failover smtp. :idea:
Unfortunately, java is going to lookup that hostname and cache it, so you're never going to get a failover in that scenario (unless it expires from the cache, does a new lookup, and gets the other IP). Regardless, you'll end up in the same situation. What you want to do instead is have multiple zimbraSmtpHostname's assigned so that it will failover to the next one in the list. It'll give you the round-robin you want. The only other thing you could do here is use a proxy or load balancer that will allow you to use a single hostname and do the round-robin for you.
User avatar
vavai
Advanced member
Advanced member
Posts: 174
Joined: Thu Nov 14, 2013 2:41 pm
Location: Indonesia
ZCS/ZD Version: 0
Contact:

Re: Unable to connect to the MTA

Post by vavai »

Hi Rama,

I would prefer to use HAProxy (or any load balancer) with least-connection instead of round-robin. You can define all mta server on haporoxy and it wil serve as mta for your Zimbra instance. HAproxy is quite clever to binding to an active MTA server only, thus preventing inactive mta server being used by Zimbra as your above scenario.
Rama
Posts: 15
Joined: Fri Feb 09, 2018 12:00 pm

Re: Unable to connect to the MTA

Post by Rama »

Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.
User avatar
vavai
Advanced member
Advanced member
Posts: 174
Joined: Thu Nov 14, 2013 2:41 pm
Location: Indonesia
ZCS/ZD Version: 0
Contact:

Re: Unable to connect to the MTA

Post by vavai »

Hi
Rama wrote:Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.
As far as I know, Zimbra proxy using Nginx, not Haproxy. I'm currently using more than 10 MTA server behind HAproxy to provide load balancer with least-conn and have no problem so far. Haproxy itself can be installed on Zimbra server without any interference as long as setting up different port than what was provided by Zimbra. Its port can be used by mailbox server.

I'm sorry, I could not help for less cache time on Java level.
User avatar
tonster
Zimbra Employee
Zimbra Employee
Posts: 313
Joined: Fri Feb 21, 2014 10:14 am
Location: Ypsilanti, MI
ZCS/ZD Version: Release 8.7.0_GA_1659.RHEL6_64_2016

Re: Unable to connect to the MTA

Post by tonster »

Rama wrote:Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.
zimbra uses nginx, not haproxy, and there is no proxying available of the mta stack. There is no option available to java to do what you want here. You'll have to use an option that I specified previously to accomplish this.
Rama
Posts: 15
Joined: Fri Feb 09, 2018 12:00 pm

Re: Unable to connect to the MTA

Post by Rama »

Hi Tonster/Vavai,

Thanks Again. I will explore both HAproxy and failback options and tune it accordingly.
Post Reply