Coder Social home page Coder Social logo

无法获取新域名的 about smartdns HOT 18 CLOSED

scruel avatar scruel commented on July 24, 2024
无法获取新域名的

from smartdns.

Comments (18)

PikuZheng avatar PikuZheng commented on July 24, 2024

猜测是无记录被缓存。超过缓存ttl后应该能正常

from smartdns.

pymumu avatar pymumu commented on July 24, 2024

用最新版本代码看看。

from smartdns.

scruel avatar scruel commented on July 24, 2024

@pymumu 容器用的已经是 latest 标签了

from smartdns.

pymumu avatar pymumu commented on July 24, 2024
;; AUTHORITY SECTION:
test5m1.scruel.com.     1484    IN      SOA     carol.ns.cloudflare.com. dns.cloudflare.com. 2344105775 10000 2400 604800 1800

从这个结果看,SOA就是1.1.1.1返回的,你dig查询的和smartdns查询是不是走了不同网络?

from smartdns.

scruel avatar scruel commented on July 24, 2024

@pymumu 走的是同一网络

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024
localhost:~# kdig +tls test5m1.scruel.com @1.1.1.1
;; TLS session (TLS1.3)-(ECDHE-X25519)-(ECDSA-SECP256R1-SHA256)-(AES-256-GCM)
;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 45309
;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 1

;; EDNS PSEUDOSECTION:
;; Version: 0; flags: ; UDP size: 1232 B; ext-rcode: NOERROR
;; PADDING: 357 B

;; QUESTION SECTION:
;; test5m1.scruel.com.          IN      A

;; AUTHORITY SECTION:
scruel.com.             1800    IN      SOA     carol.ns.cloudflare.com. dns.cloudflare.com. 2344109697 10000 2400 604800 1800

;; Received 468 B
;; Time 2024-06-18 10:52:20 CST
;; From 1.1.1.1@853(TLS) in 350.7 ms

有结果才是错的吧(运营商污染?

from smartdns.

scruel avatar scruel commented on July 24, 2024

@PikuZheng 这是我当时测试时创建的记录,现在已经删掉了,可以用自己的域名测试。

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024

昂 那应该就是我说的 SOA时产生了缓存 直到过期后重新查询才能有结果。腾讯云说“解析在全球生效时间是0 - 72小时”

from smartdns.

scruel avatar scruel commented on July 24, 2024

昂 那应该就是我说的 SOA时产生了缓存 直到过期后重新查询才能有结果。腾讯云说“解析在全球生效时间是0 - 72小时”

不像是 cdn 的问题,我是 cf 的 cdn 直接 dig @1.1.1.1 是能拿到新建的结果的

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024

昂 那应该就是我说的 SOA时产生了缓存 直到过期后重新查询才能有结果。腾讯云说“解析在全球生效时间是0 - 72小时”

不像是 cdn 的问题,我是 cf 的 cdn 直接 dig @1.1.1.1 是能拿到新建的结果的

唉呀!从时间线上来看。你在18:33通过smartdns查询了这个域名,此时这个域名还不存在,1.1.1.1返回soa并且被smartdns缓存了。18:39用dig直接查询,域名存在且有正确结果。但此时通过smartdns查询,smartdns的缓存里是soa,就直接返回soa。重启后再查询是18:43,要么缓存过期了,要么没设持久缓存文件而导致缓存清空了。此时smartdns需要重新向1.1.1.1查询,域名存在且有正确结果

from smartdns.

scruel avatar scruel commented on July 24, 2024

你在18:33通过smartdns查询了这个域名,此时这个域名还不存在,1.1.1.1返回soa并且被smartdns缓存了。18:39用dig直接查询,域名存在且有正确结果。

反了,18:39:13 是直接向 1.1.1.1 查询,域名已存在,而后 18:39:19 才向本地 smartdns 发起查询,只要 smartdns 做得是同样的查询,应该结果一致才对,这个域名是新建的,之前也没有存在过,不应该存在缓存。

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024

18:39向smartdns查询时,smartdns不会也不应该向上游发起查询。

from smartdns.

scruel avatar scruel commented on July 24, 2024

18:39向smartdns查询时,smartdns不会也不应该向上游发起查询。

为啥,域名是新的,以前都不存在,不向上游查,难不成能自己造出结果么,没太明白

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024

上面说了,你在18:33通过smartdns查询了这个域名,此时这个域名还不存在,1.1.1.1返回soa并且被smartdns缓存了。这个SOA就是结果。
NXDOMAIN、SOA、CNAME之类的都是DNS记录,会被缓存。缓存里有,就不会向上游发起查询。

from smartdns.

scruel avatar scruel commented on July 24, 2024

反了,18:39:13 是直接向 1.1.1.1 查询,域名已存在,而后 18:39:19 才向本地 smartdns 发起查询,只要 smartdns 做得是同样的查询,应该结果一致才对,这个域名是新建的,之前也没有存在过,不应该存在缓存。
1.1.1.1返回soa并且被smartdns缓存了

13 秒就已经存在于 1.1.1.1 了,19 秒向本地 smartdns 查询的时候,为啥还能不存在?dig @1.1.1.1 可不走 smartdns 啊,完全没关系的。19 秒才是第一次用 smartdns 做查询,此时缓存也不可能存在,要想得到结果,肯定只能向上游 1.1.1.1 发起查询。

from smartdns.

PikuZheng avatar PikuZheng commented on July 24, 2024

13 秒就已经存在于 1.1.1.1 了,19 秒向本地 smartdns 查询的时候,为啥还能不存在?dig @1.1.1.1 可不走 smartdns 啊,完全没关系的。19 秒才是第一次用 smartdns 做查询,此时缓存也不可能存在,要想得到结果,肯定只能向上游 1.1.1.1 发起查询。

那你上面日志怎么来得 没理解为啥你一直纠结18:39的事却无视18:33的事

from smartdns.

scruel avatar scruel commented on July 24, 2024

那你上面日志怎么来得 没理解为啥你一直纠结18:39的事却无视18:33的事

哦你说日志啊,一直以为你说的是命令运行结果。但记得测试 smartdns 之前(33 之前),1.1.1.1 就已经能正确返回结果了,晚点再重新跑一边

from smartdns.

scruel avatar scruel commented on July 24, 2024

未能复现问题

from smartdns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.