RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1449814 - nslookup and dig return SERVFAIL error for FQDN after multiple queries
Summary: nslookup and dig return SERVFAIL error for FQDN after multiple queries
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bind
Version: 6.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Petr Menšík
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1461138 1470637
TreeView+ depends on / blocked
 
Reported: 2017-05-10 19:07 UTC by SHAURYA
Modified: 2020-12-14 08:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1470637 (view as bug list)
Environment:
Last Closed: 2017-10-27 14:48:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Keep origin on new TCP connection patch (1.13 KB, patch)
2017-07-12 17:50 UTC, Petr Menšík
no flags Details | Diff

Description SHAURYA 2017-05-10 19:07:21 UTC
Description of problem:

From the captured tcpdump  output below, nslookup initiated the query with the correct FQDN.  It resent the correct FQDN for 3 times.  It decided to drop the domain name on the fourth try.  My question is now why nslookup dropped the domain name after not receiving responses from DNS servers?  Is it a feature and working as designed or is it a bug?  

  16:00:59.995106 IP fdsuv06672.fda.gov.50776 > frs26.fda.gov.domain: 64591+ A? fdsuv06673.fda.gov. (36)
16:01:05.995589 IP fdsuv06672.fda.gov.50776 > frs26.fda.gov.domain: 64591+ A? fdsuv06673.fda.gov. (36)
16:01:11.996147 IP fdsuv06672.fda.gov.50776 > frs26.fda.gov.domain: 64591+ A? fdsuv06673.fda.gov. (36)
16:01:17.997399 IP fdsuv06672.fda.gov.60646 > frs26.fda.gov.domain: 32532+ A? fdsuv06673. (28)
16:01:17.998119 IP frs26.fda.gov.domain > fdsuv06672.fda.gov.60646: 32532 ServFail 0/0/0 (28)
16:01:23.158342 IP fdsuv06672.fda.gov.55490 > frs26.fda.gov.domain: 40253+ A? fdsuv06673.fda.gov. (36)
16:01:23.159069 IP frs26.fda.gov.domain > fdsuv06672.fda.gov.55490: 40253* 1/0/0 A 10.175.170.99 (52)


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

Limit the firewall for maximum nslookup and dig requests.

Actual results:



Expected results:


Additional info:

Comment 2 Petr Menšík 2017-05-17 17:27:04 UTC
Hello SHAURYA.

If target server is unreachable, named will retry more servers if it can. If there is no more servers, it will retry the same again. You can configure a bit longer timeout by option resolver-query-timeout. But it can be only between 10 and 30 seconds. In nslookup it can be changed by set timeout=30.

It is a feature. SERVFAIL is returned when resource is temporarily unavailable. It means resolver was unable to fetch positive nor negative response.

In given tcpdump, client asked 3 times for an address. Server was trying to fetch answer but failed, after timeout returning back servfail to fdsuv06672.fda.gov. If response to queries made by frs26.fda.gov server returned later, server will cache it and respond with positive answer on following queries.

Please do not assign high priority in bugs, where you are not sure if they are bugs at all.

If there is anything wrong with the server, log output of server is required. I would require logs from the server to tell you more. Even more details would be logged by OPTIONS="-d 5" in /etc/sysconfig/named for example.

Can I close this bug?

Comment 7 Petr Menšík 2017-07-12 17:48:11 UTC
Yes, I think there is a bug in dig. And it it not yet fixed even in the latest bind beta. It does happen only in dig +tcp mode.

Easiest way to reproduce it is to use iptables to drop incoming acknowledges.

# iptables -I INPUT -p udp --sport domain -j DROP
# iptables -I INPUT -p tcp --sport domain --tcp-flags ACK,SYN ACK -j DROP

There is hidden -d option of dig that will help very much. It will print debug messages to stderr about what it does use as origin.

dig -d +retry=4 +tcp +domain=example foo

where /etc/resolv.conf would contain

nameserver 127.0.0.1
search example

The first connection will query foo expanded by domain example. After it timeouts, it will try a new connection. New connection is created without the search list however, so only bare name used on following retries. UDP searches are not modified, because they do not use requeue_lookup call (logs "making new TCP request").

Finally I found a place to fix it. Reported as [ISC-Bugs #45547]

Comment 8 Petr Menšík 2017-07-12 17:50:00 UTC
Created attachment 1297140 [details]
Keep origin on new TCP connection patch

Comment 11 Red Hat Bugzilla Rules Engine 2017-10-27 14:48:25 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Comment 12 Tomáš Hozza 2017-10-27 14:51:06 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:
http://redhat.com/rhel/lifecycle

This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com


Note You need to log in before you can comment on or make changes to this bug.