gpt4 book ai didi

android - 失败,因为 : de. measite.minidns.hla.ResolutionUnsuccessfulException : Asking for xxxx. IN AAAA 产生了错误响应 NX_DOMAIN

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:03:10 24 4
gpt4 key购买 nike

在我将 smack 升级到 4.2.0 后,我遇到了连接问题。

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

在连接配置生成器中设置主机时会发生此问题。

例子:

.setHost(ServiceConstants.CHAT_SERVER)

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

这是我的最终配置,在 Davood 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)

最佳答案

该问题主要发生在本地网络中,当本地DNS中没有配置xmpp服务器时。要解决该问题,请显式寻址 xmpp 服务器并使用

setHostAddress(InetAddress 地址)

看我的回答here

关于android - 失败,因为 : de. measite.minidns.hla.ResolutionUnsuccessfulException : Asking for xxxx. IN AAAA 产生了错误响应 NX_DOMAIN,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43160061/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com