Unable to connect to the MTA

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

Unable to connect to the MTA

Postby Rama » Sat Nov 03, 2018 7:57 pm

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: 312
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

Postby tonster » Sat Nov 03, 2018 9:55 pm

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: 154
Joined: Thu Nov 14, 2013 2:41 pm
Location: Indonesia
Contact:

Re: Unable to connect to the MTA

Postby vavai » Sat Nov 03, 2018 10:18 pm

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: 14
Joined: Fri Feb 09, 2018 12:00 pm

Re: Unable to connect to the MTA

Postby Rama » Sun Nov 04, 2018 5:58 am

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: 154
Joined: Thu Nov 14, 2013 2:41 pm
Location: Indonesia
Contact:

Re: Unable to connect to the MTA

Postby vavai » Sun Nov 04, 2018 1:56 pm

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: 312
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

Postby tonster » Sun Nov 04, 2018 5:07 pm

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: 14
Joined: Fri Feb 09, 2018 12:00 pm

Re: Unable to connect to the MTA

Postby Rama » Mon Nov 05, 2018 12:11 pm

Hi Tonster/Vavai,

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

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 9 guests