Netty无法解决DNS名称

发布于 2025-01-22 15:28:30 字数 1320 浏览 3 评论 0原文

我使用Marketo从Java应用程序发送电子邮件,使用WebClient向Marketo API提交REST请求。最近,发送电子邮件已经开始抛出例外,我发现Netty正在丢下以下错误:

Received a mismatching DNS response: DatagramDnsResponse(from: /100.96.1.1:53, to: /0:0:0:0:0:0:0:0:50578, 19016, QUERY(0), NoError(0), RD RA)
        DefaultDnsQuestion(145-jnh-675.mktorest.com. IN A)
        DefaultDnsRawRecord(145-jnh-675.mktorest.com. 91 IN A 4B)
Received a mismatching DNS response: DatagramDnsResponse(from: /100.96.1.1:53, to: /0:0:0:0:0:0:0:0:50578, 24563, QUERY(0), NoError(0), RD RA)
        DefaultDnsQuestion(145-jnh-675.mktorest.com. IN AAAA)
        DefaultDnsRawRecord(mktorest.com. 122 IN SOA 52B)

如果我使用DIG询问DNS名称,我会得到NoError状态,那么Netty为什么要抛出此错误?以下是DIG的输出。

$ dig 145-JNH-675.mktorest.com

; <<>> DiG 9.10.6 <<>> 145-JNH-675.mktorest.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44141
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;145-jnh-675.mktorest.com.  IN  A

;; ANSWER SECTION:
145-jnh-675.mktorest.com. 300   IN  A   199.15.214.159

;; Query time: 96 msec
;; SERVER: 100.96.1.1#53(100.96.1.1)
;; WHEN: Tue Apr 19 17:55:05 EDT 2022
;; MSG SIZE  rcvd: 58

I use Marketo to send emails from my Java application, I submit REST requests to the Marketo API using WebClient. Recently sending emails has started throwing exceptions, and I discovered that Netty is throwing the following error:

Received a mismatching DNS response: DatagramDnsResponse(from: /100.96.1.1:53, to: /0:0:0:0:0:0:0:0:50578, 19016, QUERY(0), NoError(0), RD RA)
        DefaultDnsQuestion(145-jnh-675.mktorest.com. IN A)
        DefaultDnsRawRecord(145-jnh-675.mktorest.com. 91 IN A 4B)
Received a mismatching DNS response: DatagramDnsResponse(from: /100.96.1.1:53, to: /0:0:0:0:0:0:0:0:50578, 24563, QUERY(0), NoError(0), RD RA)
        DefaultDnsQuestion(145-jnh-675.mktorest.com. IN AAAA)
        DefaultDnsRawRecord(mktorest.com. 122 IN SOA 52B)

If I interrogate that DNS name using dig, I get a NOERROR status, so why is Netty throwing this error? The following is the output from dig.

$ dig 145-JNH-675.mktorest.com

; <<>> DiG 9.10.6 <<>> 145-JNH-675.mktorest.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44141
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;145-jnh-675.mktorest.com.  IN  A

;; ANSWER SECTION:
145-jnh-675.mktorest.com. 300   IN  A   199.15.214.159

;; Query time: 96 msec
;; SERVER: 100.96.1.1#53(100.96.1.1)
;; WHEN: Tue Apr 19 17:55:05 EDT 2022
;; MSG SIZE  rcvd: 58

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

药祭#氼 2025-01-29 15:28:30

我能够根据反应堆netty问题来解决这种更改的默认DNS解析器(“ noreferrer”> https: //github.com/reactor/reactor-netty/issues/1431 )。

final var httpClient = HttpClient.create().resolver(DefaultAddressResolverGroup.INSTANCE)
final var webClient = WebClient.builder().clientConnector(ReactorClientHttpConnector(httpClient)).build()

I was able to resolve this changing the default DNS resolver as per a Reactor Netty issue here (https://github.com/reactor/reactor-netty/issues/1431).

final var httpClient = HttpClient.create().resolver(DefaultAddressResolverGroup.INSTANCE)
final var webClient = WebClient.builder().clientConnector(ReactorClientHttpConnector(httpClient)).build()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文