﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1837	nginx resolver failed when ipv6 AAAA dns query failed and ipv4 A query success	crasyangel.lhy@…		"nginx.conf
{{{
worker_processes  1;
daemon on;
error_log /home/work/code/gy/jnx/t/servroot/logs/error.log debug;
pid       /home/work/code/gy/jnx/t/servroot/logs/nginx.pid;

http {
    access_log /home/work/code/gy/jnx/t/servroot/logs/access.log;

    server {
        listen          1984;
        resolver 114.114.114.114 ;
        location /t {
           set $backend ""btts.qq.com/getbacksource"";
           proxy_pass http://$backend;
        }
    }
}

events {
    accept_mutex off;
    worker_connections  64;
}
}}}

tcpdump output like

{{{
342 05:15:29.309179 10.100.124.92   114.114.114.114 DNS 73  Standard query 0x5ed7 A btts.qq.com
343 05:15:29.309236 10.100.124.92   114.114.114.114 DNS 73  Standard query 0x4c22 AAAA btts.qq.com
351 05:15:29.332931 114.114.114.114 10.100.124.92   DNS 89  Standard query response 0x5ed7 A btts.qq.com A 183.61.51.41
369 05:15:29.511221 114.114.114.114 10.100.124.92   DNS 73  Standard query response 0x4c22 Server failure AAAA btts.qq.com
}}}

Ipv4 A query succeed first, but resolver would try next, and ipv6 AAAA query failed, then code != 0, it was NGX_RESOLVE_SERVFAIL in this way. And woke callback with ctx->state failed

Should it goto export when rn->naddrs > 0 when ipv6 failed?"	defect	closed	critical	nginx-1.17	nginx-core	1.16.x	invalid	resolver AAAA A ipv6 failed	gcc 4.8.2	Linux 3.10.0_3-0-0-15 #1 SMP Fri Jan 12 18:18:11 CST 2018 x86_64 GNU/Linux	"nginx version: nginx/1.16.1
built by gcc 4.8.2 (GCC)
configure arguments:"
