networkservicemesh / fanout

Repository for the coredns fanout plugin used by Network Service Mesh
Apache License 2.0
19 stars 18 forks source link

bug提交:当网络有一段时间无法连接时程序崩溃! #13

Closed snakwu closed 4 years ago

snakwu commented 4 years ago

当网络有几分钟不能连接时,fanout直在使整个coredns崩溃退出!

snakwu commented 4 years ago

还有,当except为空值时程度也无法运行,情况是这样的,我设置了10秒重新读取配置,我做了一个定时更新except列表脚本,这个脚本是先清空except后面的值,再写进,因为有7万多条写的时间需要几分钟,当这时如果刚好重新读取配置except为空时,coredns也停止了!

denis-tingaikin commented 4 years ago

@snakwu can you attach any logs from coredns? NOTE: you can use the plugin log.

snakwu commented 4 years ago

@snakwu can you attach any logs from coredns? NOTE: you can use the plugin log.

log的文件在什么地方

denis-tingaikin commented 4 years ago

Do you use kubernetes?

snakwu commented 4 years ago

Do you use kubernetes?

ubuntu

denis-tingaikin commented 4 years ago

ubuntu

Then you can just use something like this ./coredns -conf={YOUR CONFIG PATH} > coredns.log

snakwu commented 4 years ago

ubuntu

Then you can just use something like this ./coredns -conf={YOUR CONFIG PATH} > coredns.log

我在前三天,每到凌晨3点左右就发现coredns崩溃了,这个现在我以前一直没碰到过,就是加进了fanout后出现,我现在在努力复现这现像,但不能复现,很奇怪

denis-tingaikin commented 4 years ago

@snakwu interesting...

  1. Do you have any console output?
  2. Can you attach your corefile config?
snakwu commented 4 years ago

@snakwu interesting...

  1. Do you have any console output?
  2. Can you attach your corefile config?

日志他合并在system log里面了,等他下次崩溃我再去找日志

下面是我的配置: . {
fanout . 127.0.0.1:5301 127.0.0.1:5302 127.0.0.1:5303 {
except 0-100.com 0-6.com 0-gold.net 00.net 00000wg.com 0000go.com 00042.com }
forward . 127.0.0.1:5304
cache
health
reload 10s
log
}
.:5301 {
bind 127.0.0.1 ::1
forward . tls://8.8.8.8 tls://8.8.4.4 {
tls_servername dns.google
health_check 5s
max_fails 2
expire 90s
}
cache
}
.:5302 {
bind 127.0.0.1 ::1
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername 1dot1dot1dot1.cloudflare-dns.com
health_check 5s
max_fails 2
expire 90s
}
cache
}
.:5303 {
bind 127.0.0.1 ::1
forward . tls://9.9.9.9 tls://149.112.112.112 {
tls_servername dns.quad9.net
health_check 5s
max_fails 2
expire 90s
}
cache
}
.:5304 {
bind 127.0.0.1 ::1
fanout . 202.96.134.33 202.96.128.86 223.5.5.5 119.29.29.29 114.114.114.114
cache
}

denis-tingaikin commented 4 years ago

config looks valid, let's wait for next failure

snakwu commented 4 years ago

config looks valid, let's wait for next failure

ok,thx!

snakwu commented 4 years ago

config looks valid, let's wait for next failure

fanout,并发查询,可不可以做到在几个dns服务器中,取出响应最快的ip,写进结果回应?

denis-tingaikin commented 4 years ago

fanout,并发查询,可不可以做到在几个dns服务器中,取出响应最快的ip,写进结果回应?

not quite understand... Could you say more?

snakwu commented 4 years ago

fanout,并发查询,可不可以做到在几个dns服务器中,取出响应最快的ip,写进结果回应?

not quite understand... Could you say more?

Concurrent queries to get the fastest ip, write query results from multiple servers

denis-tingaikin commented 4 years ago

if I understand correctly then you want to somehow save IP of the faster upstream server and use it by default.

Actually fanout plugin is not just sending parallel queries. It also returns the first positive answer from a set of upstream servers. It means that we can not just save a fast upstream server and use it as a default server because in some cases this server can not know answers for some queries.

snakwu commented 4 years ago

if I understand correctly then you want to somehow save IP of the faster upstream server and use it by default.

Actually fanout plugin is not just sending parallel queries. It also returns the first positive answer from a set of upstream servers. It means that we can not just save a fast upstream server and use it as a default server because in some cases this server can not know answers for some queries.

明白,之前看你有在coredns上面提过,所以我一直在关注fanout,非常好这就是我需要的

snakwu commented 4 years ago

这个问题我先关了,目前发现,不是fanout问题,应该是其它问题引起的