Failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: xxxx request. IN AAAA returned the error NX_DOMAIN

After I upgraded smack to 4.2.0, I get connectivity issues.

The following addresses failed: 'xxxx:5222' failed because: 

de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for xxxx.    IN  A yielded an error response NX_DOMAIN, '52.90.233.38:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for xxxx. IN  AAAA yielded an error response NX_DOMAIN

The problem occurs when the host is installed in the connection configuration linker.

example:

.setHost(ServiceConstants.CHAT_SERVER)

See https://github.com/igniterealtime/Smack/wiki/Smack-4.2-Readme-and-Upgrade-Guide

This is my last configuration, it worked after the help of Dawood Falahati!

InetAddress inetAddress = InetAddress.getByName(ServiceConstants.CHAT_SERVER);
            XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder()
                    .setXmppDomain(JidCreate.from(ServiceConstants.CHAT_SERVER).asDomainBareJid())
                    .setPort(5222)
                    .setHostAddress(inetAddress)
                    .setDebuggerEnabled(true)
                    .setSendPresence(true)
+6
source share
1 answer

This problem occurs mainly on local networks when the xmpp server is not configured in local DNS. To solve the problem, I explicitly address the xmpp server and use

setHostAddress(InetAddress address)

.

+7

Source: https://habr.com/ru/post/1016207/


All Articles