Zimbra 8.6 IPv6 - Problem

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

Hello guys,

I'm trying to enable Zimbra 8.6 IPv6 over Centos 6.7 and i'm getting one error over nginx that it cant bind over IPv6, i don't know what can i do now.

Configs:
  • Selinux: Permissive
    Iptable: Cleaned
    Ip6table: Cleaned
    IPv4: xxx.xxx.xxx.xxx/24 (Tested with ping and its working)
    IPV6: xxxx:xxxx:x:xx::e/118 (Tested with ping6 and it working)
The command that i executed:
zmprov ms `zmhostname` zimbraIPMode both ; /opt/zimbra/libexec/zmiptool ; zmcontrol restart
. If i try both or ipv6 it gave me the error:
Starting nginx...nginx: [emerg] bind() to xxx.xxx.xxx.xxx:143 failed (99: Cannot assign requested address)
This is the zmcontrol status:
Host myhost.domain.com
Starting zmconfigd...Done.
Starting mailbox...Done.
Starting memcached...Done.
Starting proxy...Failed.
Starting nginx...nginx: [emerg] bind() to xxx.xxx.xxx.xxx:143 failed (99: Cannot assign requested address)
failed.

Starting amavis...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting opendkim...Done.
Starting cbpolicyd...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
The interesting is that its failing on binding over the ipv4 address, i don't know what to do now, any ideas?

Thanks.
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

Guys, any idea?! :roll:
exolium
Posts: 1
Joined: Fri Jun 03, 2016 10:38 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by exolium »

I have the same problem. When we get a vhost for a domain, zimbra made a dns resolution for the FQDN of the IPv4 :shock: and is used to set the vhost :shock: :shock: instead of the configuration with a generic address and the IP is not directly on the server ...... :evil:

I also looking for a solution but I feel it's going to be easy.
User avatar
maxxer
Outstanding Member
Outstanding Member
Posts: 224
Joined: Fri Oct 04, 2013 2:12 am
Contact:

Re: Zimbra 8.6 IPv6 - Problem

Post by maxxer »

IIRC there are issues with CentOS's nc and IPv6. Sadly I cannot find references right now, but I'm sure there was an issue with the localhost entry in /etc/hosts, at least. I invite you to investigate more on this
User avatar
DualBoot
Elite member
Elite member
Posts: 1326
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
Contact:

Re: Zimbra 8.6 IPv6 - Problem

Post by DualBoot »

You need to disable all IPv6 references :
/etc/hosts
/etc/sysctl.conf

and reboot.
The Guy - DualBoot

PostMaster - WikiMaster - SysAdmin
"Free Your Mind. Think Open Source"
april.org
Zetalliance Member - zetalliance.org
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

DualBoot, there is no reference at all, my /etc/hosts:

Code: Select all

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
My sysctl.conf:

Code: Select all

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
# Tunning Swappiness
vm.swappiness=10
Trying to debug, but no lucky at all. :(
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

Any more ideas?
User avatar
DualBoot
Elite member
Elite member
Posts: 1326
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
Contact:

Re: Zimbra 8.6 IPv6 - Problem

Post by DualBoot »

As root :

Code: Select all

ps aux | grep LISTEN
and check if anything is listening on IPv6.
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

There is nothing listening on that port, but at least if think i found the problem.

The error is happening because he can't bind using the ip address
10.50.15.23
, but the server ip address should be
10.50.15.22
, so searching over nginx config files, everything is binding on the wrong ip address, i don't know if i'm going crazy but how is this working:

Code: Select all

[root@server nginx]# grep -R "10.50.15.23" *
includes/nginx.conf.mail.imap:    #listen                  10.50.15.23:143;
includes/nginx.conf.mail.imap:    listen                  10.50.15.23:143;
includes/nginx.conf.mail.imap:    #listen                  10.50.15.23:143 ipv6only=on;
includes/nginx.conf.mail.pop3s:    #listen              10.50.15.23:995;
includes/nginx.conf.mail.pop3s:    listen            10.50.15.23:995;
includes/nginx.conf.mail.pop3s:    #listen            10.50.15.23:995 ipv6only=on;
includes/nginx.conf.web.http:    #listen            10.50.15.23:80;
includes/nginx.conf.web.http:    listen            10.50.15.23:80;
includes/nginx.conf.web.http:    #listen            10.50.15.23:80 ipv6only=on;
includes/nginx.conf.web.admin:    #listen                    10.50.15.23:9071;
includes/nginx.conf.web.admin:    listen                  10.50.15.23:9071;
includes/nginx.conf.web.admin:    #listen                  10.50.15.23:9071 ipv6only=on;
includes/nginx.conf.web.https:    #listen                  10.50.15.23:443;
includes/nginx.conf.web.https:    listen                  10.50.15.23:443;
includes/nginx.conf.web.https:    #listen                  10.50.15.23:443 ipv6only=on;
includes/nginx.conf.mail.imaps:    #listen              10.50.15.23:993;
includes/nginx.conf.mail.imaps:    listen            10.50.15.23:993;
includes/nginx.conf.mail.imaps:    #listen            10.50.15.23:993 ipv6only=on;
includes/nginx.conf.zmlookup:    zm_lookup_handlers  10.50.15.22:7072/service/extension/nginx-lookup 10.50.15.23:7072/service/extension/nginx-lookup;
includes/nginx.conf.memcache:  servers   10.50.15.23:11211;
includes/nginx.conf.mail.pop3:    #listen                  10.50.15.23:110;
includes/nginx.conf.mail.pop3:    listen                  10.50.15.23:110;
includes/nginx.conf.mail.pop3:    #listen                  10.50.15.23:110 ipv6only=on;
I don't know why it is binding on the wrong ip adress, i've nothing over /etc/hosts and my dns host is correct:

Code: Select all

[root@server nginx]# host server.domain
server.domain has address 10.50.15.22
server.domain has IPv6 address fd00:faca:0:a0::e
What the * is happening? :?

EDIT: Actually is binding on both ip's

Code: Select all

[root@mercurio3 nginx]# grep -R "10.50.15.2" * | egrep -v "#listen"
includes/nginx.conf.mail.imap:    listen                  10.50.15.23:143;
includes/nginx.conf.mail.imap:    listen                  10.50.15.22:143;
includes/nginx.conf.mail.pop3s:    listen            10.50.15.23:995;
includes/nginx.conf.mail.pop3s:    listen            10.50.15.22:995;
includes/nginx.conf.web.http:    listen            10.50.15.23:80;
includes/nginx.conf.web.http:    listen            10.50.15.22:80;
includes/nginx.conf.web.admin:    listen                  10.50.15.23:9071;
includes/nginx.conf.web.admin:    listen                  10.50.15.22:9071;
includes/nginx.conf.web.https:    listen                  10.50.15.23:443;
includes/nginx.conf.web.https:    listen                  10.50.15.22:443;
includes/nginx.conf.mail.imaps:    listen            10.50.15.23:993;
includes/nginx.conf.mail.imaps:    listen            10.50.15.22:993;
includes/nginx.conf.zmlookup:    zm_lookup_handlers  10.50.15.22:7072/service/extension/nginx-lookup 10.50.15.23:7072/service/extension/nginx-lookup;
includes/nginx.conf.memcache:      servers   10.50.15.22:11211;
includes/nginx.conf.memcache:  servers   10.50.15.23:11211;
includes/nginx.conf.mail.pop3:    listen                  10.50.15.23:110;
includes/nginx.conf.mail.pop3:    listen                  10.50.15.22:110;
User avatar
ldiedrich
Posts: 8
Joined: Thu May 12, 2016 12:26 pm

Re: Zimbra 8.6 IPv6 - Problem

Post by ldiedrich »

After some search i got this on the /opt/zimbra/conf/nginx/includes/nginx.conf.mail.imap file:

Code: Select all

# IMAP proxy configuration
# 
server
{
    server_name             webserver2.domain.edu.br; 
    #listen                  [fipv62]:143;
    #listen                  [fipv62]:143;
    listen                  [fipv62]:143 ipv6only=on;

    protocol                imap;
    proxy                   on;
    timeout                 60;
    proxy_timeout           2100;
...
}
server
{
    server_name             webserver1.domain.edu.br; 
    #listen                  [ipv61]:143;
    #listen                  [ipv61]:143;
    listen                  [ipv61]:143 ipv6only=on;

    protocol                imap;
    proxy                   on;
    timeout                 60;
    proxy_timeout           2100;
...
}
So basically whats is happening is this, when i set to use IPv6 using ipv6 or both methods on the webserver1, it prompts me that he can't bind the ipv4 in the webserver2. The same thing happens when i try to alternate the ip mode on the webserver2, it prompts me that it can't bind on the ipv4 from the webserver1.

Any ideas why is this happening?
Post Reply