Comments (8)
Hi @sonarypt,
Well, this one is a bit tricky. In order to reproduce:
starting tcpinging a host, say example.com:
tcping example.com 443 -r 2
then disconnect your internet access π and watch the behavior. You will see that the retry resolve takes a few seconds to timeout and we are not adding those seconds to the total downtime.
Let me know if you need more info.
from tcping.
Uhm, I tried your scenario on my machine (Arch Linux - amd64 - go1.18.4). Previously using wifi, I disconnected my internet access by command nmcli radio wifi off
. I also add line into printRetryingToResolve()
that print out total down time to the terminal. Eventually, retrying to resolve
does not take any extra second to timeout. Everything seems to be smooth.
from tcping.
yea, I also tried again and I don't see any hiccups like before. Now I wonder how it had occurred. Because it was the reason to open a ticket for it.
Let's try some more and if it does not occur again, we can close this for now.
from tcping.
@pouriyajamshidi
I can see the event happening with the procedure that pouriya mentioned (tcping example.com 443 -r 2 and wifi on/off).
from tcping.
@pouriyajamshidi
Perhaps the problem may not occur depending on when you turn on.
The way tcping is designed, if you don't turn it on just before the retry runs, it will continue to use the previous IP address.
Since the old IP is still available (the example.com IP address remains the same), I don't think the problem will occur.
Sorry for the multiple widths, but I'll put up a timed screenshot of when the problem occurs.
retrying to resolve example.com
time for retrying to resolve 809ms
func retryResolve(tcpStats *stats) {
if tcpStats.ongoingUnsuccessfulPkts > *tcpStats.retryHostnameResolveAfter {
connStart := getSystemTime()
tcpStats.printRetryingToResolve()
tcpStats.ip = resolveHostname(tcpStats)
tcpStats.ongoingUnsuccessfulPkts = 0
tcpStats.retriedHostnameResolves += 1
connEnd := time.Since(connStart)
rtt := connEnd.Milliseconds()
colorLightYellow("time for retrying to resolve %dms\n", rtt)
}
}
I guess that this event occurs several times over a long period of time, eventually resulting in a few seconds difference.
I can't take the time to get to the solution successfully, but if you need help again, please call me!
from tcping.
After virtualized a webserver for demo, by adding local domain to /etc/hosts
, turning on/off the webserver, I still cannot simulate any situation when that function takes 4~5 seconds to timeout. Could you give more information for that scenario?
from tcping.
@t-ohtaki do you know a situation which this can be triggered?
from tcping.
Thanks a lot @icemint0828. Helpful as always.
I hope this clears the issue @sonarypt
from tcping.
Related Issues (20)
- README Translation - Chinese
- add TTL in output please HOT 3
- Please add "count" and "interval" option HOT 3
- Add tcping to winget
- output interface HOT 13
- v2.0.0 is not listed on Go module proxy due to missing /v2 suffix in the "module" path HOT 8
- fix database user input flag HOT 8
- Database closure before the appropriate time. HOT 2
- Include db.go in the Makefile HOT 10
- refactor the processUserInput function HOT 8
- reduce RTT floating point precision when storing them into the database HOT 3
- Add Prometheus exporter HOT 12
- Assess replacing current sqlite package HOT 6
- re-add the static Linux binary
- wrong downtime calculation when timeout is set to under a second
- Significant size increase HOT 4
- break build section of Makefile into smaller chunks
- One failed probe prints `No response received for 0 seconds` HOT 4
- Add BSD support
- fix CI warnings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcping.