Comments (5)
Quick test shows that the fix works. Thank you for the fix!
I will let you know if this issue arises again
from gnmic.
Thanks for reporting this, I was able to reproduce and it's essentially due to this change (grpc/grpc-go#6834) in grpc-go v1.60.0. (gNMIc v0.34.3 uses grpc-go v1.59.0)
In short, the change in grpc-go v1.60.0 makes the gRPC client use the OS TCP keepalive defaults instead of the Go stdlib ones. Most linux dist use:
tcp_keepalive_time = 7200s
tcp_keepalive_intvl = 75s
tcp_keepalive_probes = 9
While Go stdlib uses 15s
, 15s
and 10
. This results in a broken TCP connection being reset after about 15 + 10 * 15 = 165 seconds
I tested setting the OS TCP keep alive using with the below commands, gNMIc reconnects successfully once the TCP connection is reset and the router is back up.
sysctl -w \
net.ipv4.tcp_keepalive_time=15 \
net.ipv4.tcp_keepalive_intvl=15 \
net.ipv4.tcp_keepalive_probes=10
I will have to think a bit about the best way to fix this, ideally I can enable gRPC keepalives by default providing most gNMI servers out there support it. Or use a custom TCP Dialer to avoid grpc-go creating one with the OS defaults. I will keep you posted.
from gnmic.
Alright thanks for the confirmation. Do you know how could I fix this issue with these sysctl rules for the containerised gNMIc version? Or is just the better solution for the time being to use 0.34 version instead?
from gnmic.
Depends how you are running the container, docker run has a --sysctl
flag, so you can do something like this:
docker run \
--sysctl net.ipv4.tcp_keepalive_time=15 \
--sysctl net.ipv4.tcp_keepalive_intvl=15 \
--sysctl net.ipv4.tcp_keepalive_probes=10 \
-it --rm -p 7890:7890 -v XXXXXX
That typically is not allowed with --net host
, so you might want to run it on its own netns. Or modify the host values if that doesn't impact anything else.
Docker compose has similar options for sysctl.
from gnmic.
v0.36.1 has a default TCP keepalive of 15s, please check it out.
from gnmic.
Related Issues (20)
- gnmic 0.35.1 - failed to create a gRPC client for target XXX: context deadline exceeded HOT 10
- Query about gnmi proto version HOT 4
- Slow changing metrics are not published to prometheus output HOT 2
- JQ filtering inconsistency? HOT 1
- Getting response for single subscription when multiple subscriptions are requested through config file with ONCE mode HOT 6
- Request for Example Configuration for PaloAlto & PAN-OS Environments
- Latest version fails to connect to local Unix socket HOT 1
- K8s Clustering Leader Receives Context Deadline Error on Target HOT 5
- gRPC working fine even if we pass server certificate instead of root CA in --tls-ca parameter. HOT 6
- My Prometheus is unable to scrape any telemetry data from gNMIc although gNMIc is collecting data from the target and exposing it on port 9273. HOT 4
- debug mode outputs password HOT 1
- My Prometheus is unable to scrape any telemetry data from gnmic for BGP operational state although gnmic is collecting data from the target and exposing it on port 9273. HOT 2
- gNMIc generate unknown path item HOT 3
- Event Processor Not Applying Transformation as Expected HOT 6
- Question about deleted paths HOT 5
- GET intermittently failing with TLS13(DeadlineExceeded desc = context deadline exceeded) HOT 2
- .
- Unable to integrate Juniper Routers with gnmic HOT 9
- Broken Connection Event/Alert 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 gnmic.