Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpClient request exception when host is a url #434

Open
RebornTong opened this issue Jan 12, 2022 · 2 comments
Open

HttpClient request exception when host is a url #434

RebornTong opened this issue Jan 12, 2022 · 2 comments
Labels

Comments

@RebornTong
Copy link

HttpClient client = vertx.createHttpClient(new HttpClientOptions());
client.request(HttpMethod.GET, "www.baidu.com", "").onSucess ....
  • if host is an ip address, sucess, if a url like above ,then fail.
  • exception stack is below :
io.netty.resolver.dns.DnsResolveContext$SearchDomainUnknownHostException: Search domain query failed. Original hostname: 'http://www.baidu.com' failed to resolve 'http://www.baidu.com.intra.net'. Exceeded max queries per resolve 4 
	at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1046) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:999) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:417) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:970) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:417) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:970) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:417) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.onResponse(DnsResolveContext.java:628) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext.access$400(DnsResolveContext.java:65) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsResolveContext$2.operationComplete(DnsResolveContext.java:461) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsQueryContext.trySuccess(DnsQueryContext.java:200) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsQueryContext.finish(DnsQueryContext.java:192) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.resolver.dns.DnsNameResolver$DnsResponseHandler.channelRead(DnsNameResolver.java:1301) [netty-resolver-dns-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:97) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.70.Final.jar:4.1.70.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
@RebornTong RebornTong added the bug label Jan 12, 2022
@vietj
Copy link
Contributor

vietj commented Jan 12, 2022

it looks like your DNS is configured to use search domains with .intra.net

@RebornTong
Copy link
Author

then how to configure a right DNS domain ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants