失败原因:de.measite.minidns.hla.ResolutionUnsuccessfulException:询问xxxx.在AAAA中产生错误响应NX_DOMAIN [英] failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for xxxx. IN AAAA yielded an error response NX_DOMAIN

查看:261
本文介绍了失败原因:de.measite.minidns.hla.ResolutionUnsuccessfulException:询问xxxx.在AAAA中产生错误响应NX_DOMAIN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将smack升级到4.2.0之后,我遇到了连接问题.

After I upgraded smack to 4.2.0 I am getting connection issue.

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 issue happen when host is set in connection configuration builder.

示例:

.setHost(ServiceConstants.CHAT_SERVER)

请参见 https://github.com/igniterealtime/Smack/wiki/Smack-4.2-Readme-and-Upgrade-Guide

这是我的最终配置,在达沃德·法拉哈蒂(Davood Falahati)帮助下有效!

This is my final configuration, it worked after Davood Falahati help !

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)

推荐答案

当未在本地DNS中配置xmpp服务器时,此问题主要发生在本地网络中.要解决该问题,请明确寻址xmpp服务器并使用

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

setHostAddress(InetAddress地址)

此处

这篇关于失败原因:de.measite.minidns.hla.ResolutionUnsuccessfulException:询问xxxx.在AAAA中产生错误响应NX_DOMAIN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆