Comments (4)
from haproxy_exporter.
from haproxy_exporter.
@grobie unless the program binding to the port sets SO_REUSEPORT, if it terminates abnormally and is restarted, it will not be able to re-bind to the port until TIME_WAIT (several minutes) passes. https://hea-www.harvard.edu/~fine/Tech/addrinuse.html
I think you need to pass SO_REUSEPORT or SO_REUSEADDR.
@pecameron it is possible that SO_REUSEADDR is set by default: https://golang.org/src/net/sockopt_linux.go
from haproxy_exporter.
@pecameron I can't comment on your environment, I don't have any experience with openshift. That the lsof output shows a running haproxy_exporter process with a PID and a socket in LISTEN state indicates there was indeed already a process instance running.
@knobunc SO_REUSEPORT was added to allow multiple processes simultaneously binding to the same port. With only a single process being used by haproxy_exporter, it doesn't make sense setting it here. SO_REUSEADDR has always been set by Go on listening sockets, it would indeed be a huge issue otherwise.
Side note, if your server really still uses a TIME_WAIT timeout of "minutes" as you say (2m is the default on Linux IIRC), I highly recommend adjusting tcp_fin_timeout. Fortunately we moved past the times were TCP packets routing takes several tens of seconds. Especially on load balancers where HAProxy acts as TCP client I've seen many systems running into port exhaustion systems otherwise.
I'm not really sure what to do here, I can't reproduce any issues with trailing connections in TIME_WAIT status and restarting haproxy_exporter. The lsof output at the beginning of your bug report looks a lot more suspicious tbh. If you have any actual indications or steps to show there is indeed an issue with haproxy_exporter, I'm happy to investigate.
from haproxy_exporter.
Related Issues (20)
- Error when using docker-compose HOT 1
- Cutting a new release HOT 4
- Haproxy stats page report inaccurate data. HOT 3
- not read stats in haproxy for monitoring HOT 1
- haproxy.scrape-uri parameter format HOT 1
- Can't scrape HAProxy: Requested canceled while waiting for connection. HOT 1
- Metric for frontend status HOT 2
- haproxy_backend_http_responses_total per API? HOT 1
- Multiple remote haproxy HOT 2
- http_responses_total missing exported_service label HOT 1
- crashes on http.ListenAndServe (during accepting new connections) HOT 2
- only one pid's metrics return by exporter HOT 6
- Discard golang / process metrics HOT 4
- dockerhub images have wrong os/architecture tags HOT 2
- The README file in Docker Hub uses the wrong command "-haproxy.scrape-uri" HOT 1
- --help
- haproxy_exporter.exe commited to repo HOT 1
- ts=2022-01-17T08:59:49.183Z caller=haproxy_exporter.go:421 level=error msg="Unexpected error while reading CSV" err="unexpected EOF" HOT 1
- dial tcp 127.0.0.1:8181: connect: connection refused HOT 3
- metric description HOT 1
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 haproxy_exporter.