You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/29 00:42:21 UTC

[GitHub] [trafficserver] ywkaras opened a new issue #7910: DNS lookup on host in remap URL, even if it is not next hop

ywkaras opened a new issue #7910:
URL: https://github.com/apache/trafficserver/issues/7910


   In this Au test:
   https://github.com/ywkaras/trafficserver/blob/next_hop_bad_dns/tests/gold_tests/next_hop/strategies_ch/strategies_ch.test.py
   
   the request will fail if the DNS server does not have an entry for the host "not_used". (That is, if line 118 is removed.)  This harms performance, and causes failure if the host in the upstream request is only known to upstream DNS servers.
   
   Here is the trace output showing the DNS lookup:
   ```
   [May 29 00:17:05.481] [ET_NET 3] DEBUG: <HttpTransact.cc:2654 (CallOSDNSLookup)> (http) [0] [HttpTransact::callos] not_used 
   [May 29 00:17:05.481] [ET_NET 3] DEBUG: <HttpTransact.cc:2668 (CallOSDNSLookup)> (http_trans) Next action SM_ACTION_DNS_LOOKUP; OSDNSLookup
   [May 29 00:17:05.481] [ET_NET 3] DEBUG: <HttpSM.cc:7341 (call_transact_and_set_next_state)> (http) [0] State Transition: SM_ACTION_API_POST_REMAP -> SM_ACTION_DNS_LOOKUP
   [May 29 00:17:05.481] [ET_NET 3] DEBUG: <HttpSM.cc:4239 (do_hostdb_lookup)> (http_seq) [HttpSM::do_hostdb_lookup] Doing DNS Lookup
   [May 29 00:17:05.482] [ET_NET 3] DEBUG: <HostDB.cc:696 (getby)> (hostdb) delaying (force=0) answer for not_used [timeout 0]
   [May 29 00:17:05.495] [ET_NET 3] DEBUG: <HostDB.cc:1576 (do_dns)> (hostdb) DNS not_used
   [May 29 00:17:05.495] [ET_NET 3] DEBUG: <DNS.cc:1308 (getby)> (dns) received query not_used type = 1, timeout = 0
   [May 29 00:17:05.496] [ET_NET 0] DEBUG: <DNS.cc:1271 (mainEvent)> (dns) enqueuing query not_used
   [May 29 00:17:05.496] [ET_NET 0] DEBUG: <DNS.cc:1277 (mainEvent)> (dns) adding first to collapsing queue
   [May 29 00:17:05.496] [ET_NET 0] DEBUG: <DNS.cc:1174 (write_dns_event)> (dns) send query (qtype=1) for not_used to fd 22
   [May 29 00:17:05.496] [ET_NET 0] DEBUG: <DNS.cc:1223 (write_dns_event)> (dns) sent qname = not_used, id = 33094, nameserver = 0
   [May 29 00:17:05.496] [ET_NET 0] DEBUG: <P_DNSProcessor.h:202 (sent_one)> (dns) sent_one: failover_number for resolver 0 is 1
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:896 (recv_dns)> (dns) DNSHandler::recv_dns res = [42]
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:920 (recv_dns)> (dns) received packet size = 42
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:923 (recv_dns)> (dns) round-robin: nameserver 0 DNS response code = 0
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:1592 (dns_process)> (dns) Got 1 DNS records for [not_used]
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:1806 (dns_process)> (dns) received A name = not_used
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:1823 (dns_process)> (dns) received A = 127.0.0.1
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:1844 (dns_process)> (dns) Returning 1 DNS records for [not_used]
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:1411 (dns_result)> (dns) SUCCESS result for not_used = 127.0.0.1 retry 0
   [May 29 00:17:05.500] [ET_NET 0] DEBUG: <DNS.cc:896 (recv_dns)> (dns) DNSHandler::recv_dns res = [-11]
   [May 29 00:17:05.500] [ET_NET 3] DEBUG: <DNS.cc:1500 (postOneEvent)> (dns) called back continuation for not_used
   [May 29 00:17:05.500] [ET_NET 3] DEBUG: <HostDB.cc:1213 (dnsEvent)> (hostdb) allocating 9 bytes for not_used with 0 RR records at [0x7f8b3c03bf80]
   [May 29 00:17:05.500] [ET_NET 3] DEBUG: <HostDB.cc:1018 (lookup_done)> (hostdb) done 127.0.0.1 TTL 300
   [May 29 00:17:05.501] [ET_NET 3] DEBUG: <HttpSM.cc:2686 (main_handler)> (http) [0] [HttpSM::main_handler, EVENT_HOST_DB_LOOKUP/TS_EVENT_HOST_LOOKUP]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] ywkaras commented on issue #7910: DNS lookup on host in remap URL, even if it is not next hop

Posted by GitBox <gi...@apache.org>.
ywkaras commented on issue #7910:
URL: https://github.com/apache/trafficserver/issues/7910#issuecomment-852400213


   False alarm, the DNS lookup can be avoided by setting **proxy.config.http.no_dns_just_forward_to_parent** to 1.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] ywkaras closed issue #7910: DNS lookup on host in remap URL, even if it is not next hop

Posted by GitBox <gi...@apache.org>.
ywkaras closed issue #7910:
URL: https://github.com/apache/trafficserver/issues/7910


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org