Configuring for IPv4

Revision as of 18:49, 20 December 2011 by Thom (talk | contribs) (Created page with "{{ZC}}{{Article Infobox|{{admin}}|{{ZCS 7.0}}|{{ZCS 6.0}}|{{ZCS 5.0}}||}}=Zimbra Server with IPv4= === Description === For sites using only IPv4, you may find better performanc...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 7.0 Article ZCS 7.0 ZCS 6.0 Article ZCS 6.0 ZCS 5.0 Article ZCS 5.0

Zimbra Server with IPv4


For sites using only IPv4, you may find better performance and simplicity in configuring the environment to use only IPv4, wherever possible. This wiki page provides guidance on forcing applications to use IPv4 when possible.

Many OSs will enable IPv6 by default, even if the environment is only using IPv4. Configuring the OS to disable IPv6 would help to prevent these sorts of problems.

Known Problems

There are some known problems with applications trying to use IPv6, when the environment is really only configured for IPv4.

1. IPv6 changes the way that Round-Robin A-records are used, and instead forces an ordered priority weighting of A-records. This can cause high-availability techniques dependent on round-robin A-records to fail or work incorrectly. If using IPv4/IPv6 dual-stack, then the JVM will use getaddrinfo() instead of gethostbyname(). getaddrinfo() will sort the DNS results in an ordered way, due to RFC 3484 [1]. Some OSs provide /etc/gai.conf configuration options in an attempt to configure record handling.

2. The JVM can be blocked by an infinite loop problem between the JVM and libc when using the IPv6 getaddrinfo() libraries with IPv4 addresses. This issue is discussed in more detail here:

In the JVM, following is what the threads look like. You will see many threads in the thread dump file locked in a state similar to this:

"btpool0-41529" prio=10 tid=0x00002aaac45dd000 nid=0x7db9 in Object.wait() [0x0000000047155000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(
        - locked <0x00000006e385b000> (a java.util.HashMap)

These threads are waiting for the Lookup Table object to be released from another thread that holds it. Here's the thread holding it:

"btpool0-41526" prio=10 tid=0x00002aaac5904800 nid=0x7db6 runnable [0x0000000044c02000]
   java.lang.Thread.State: RUNNABLE
        at Method)

You'll see that's running Inet6AddressImpl.lookupAllHostAddr. Because of a bug between Java and libc, this lookup can enter an infinite loop when a certain race condition occurs. This occurs infrequently, but can cause deadlocks where all threads of one type (such as LMTP threads) or even all JVM threads can end up blocked.

With set to true, Java will not execute this code and the problem should be avoided.


1. Many OSs will configure for IPv6 by default, even if the environment is only using IPv4. Configuring the OS to disable IPv6 addresses altogether can help prevent IPv6 usage in the applications.


Verified Against: ZCS 7.0 Date Created: ZCS 6.0
Article ID: Date Modified: 2011-12-20

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search