finagle / finagle/featherbed

DNS lookup failures on client creation never return failure

Open
#69 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
138
Forks
25
PR merge metrics
No merged PRs in 30d

Description

scala> import java.net.URL
import java.net.URL
scala> val client = new featherbed.Client(new URL("http://www.wontfindmeindns.com"))
Jul 15, 2017 9:36:07 PM com.twitter.finagle.Init$$anonfun$5 apply$mcV$sp
INFO: Finagle version 6.44.0 (rev=ef94604c6db76959610eeb8fb2bb06810022061f) built at 20170421-125957
client: featherbed.Client = featherbed.Client@40b23107
scala> Jul 15, 2017 9:36:09 PM com.twitter.finagle.DnsResolver$$anonfun$apply$3$$anonfun$apply$5 apply
INFO: Failed to resolve www.wontfindmeindns.com. Error java.net.UnknownHostException: www.wontfindmeindns.com: nodename nor servname provided, or not known
Jul 15, 2017 9:36:09 PM com.twitter.finagle.InetResolver$$anonfun$toAddr$2 apply
INFO: Resolution failed for all hosts in ArraySeq((www.wontfindmeindns.com,80,Map()))
Jul 15, 2017 9:36:09 PM com.twitter.finagle.loadbalancer.LoadBalancerFactory$StackModule$$anonfun$8 apply
INFO: www.wontfindmeindns.com:80: name resolution is negative (local dtab: Dtab())
Jul 15, 2017 9:36:13 PM com.twitter.finagle.DnsResolver$$anonfun$apply$3$$anonfun$apply$5 apply
INFO: Failed to resolve www.wontfindmeindns.com. Error java.net.UnknownHostException: www.wontfindmeindns.com
Jul 15, 2017 9:36:13 PM com.twitter.finagle.InetResolver$$anonfun$toAddr$2 apply
INFO: Resolution failed for all hosts in ArraySeq((www.wontfindmeindns.com,80,Map()))
Jul 15, 2017 9:36:13 PM com.twitter.finagle.loadbalancer.LoadBalancerFactory$StackModule$$anonfun$8 apply
INFO: www.wontfindmeindns.com:80: name resolution is negative (local dtab: Dtab())
Jul 15, 2017 9:36:18 PM com.twitter.finagle.DnsResolver$$anonfun$apply$3$$anonfun$apply$5 apply
INFO: Failed to resolve www.wontfindmeindns.com. Error java.net.UnknownHostException: www.wontfindmeindns.com
Jul 15, 2017 9:36:18 PM com.twitter.finagle.InetResolver$$anonfun$toAddr$2 apply
INFO: Resolution failed for all hosts in ArraySeq((www.wontfindmeindns.com,80,Map()))
Jul 15, 2017 9:36:18 PM com.twitter.finagle.loadbalancer.LoadBalancerFactory$StackModule$$anonfun$8 apply
INFO: www.wontfindmeindns.com:80: name resolution is negative (local dtab: Dtab())
Jul 15, 2017 9:36:23 PM com.twitter.finagle.DnsResolver$$anonfun$apply$3$$anonfun$apply$5 apply
INFO: Failed to resolve www.wontfindmeindns.com. Error java.net.UnknownHostException: www.wontfindmeindns.com: nodename nor servname provided, or not known
// this will go on forever

Even worse: if you then make a request to this client, the Future never completes (with either a success or failure)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce client creation with the nonexistent URL shown in the issue, then make a request and observe that its Future never completes. Trace the client-creation and DNS-resolution path described in the logs; done means an unresolvable host produces a completed failure rather than retrying indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.