Configurable idle timeout for Homer TCP connection
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- networking
Research direction
The payload names no files: start from wherever the --homer / --homer-protocol=tcp options are parsed and from the code that opens and writes the HEP socket, since that is where Write error to Homer ... Broken pipe is emitted. Read how other connection-related options are declared and documented so a new idle-timeout/reconnect option follows the same pattern. Done means the Homer TCP socket is detected as closed (CLOSE_WAIT) and reopened instead of failing the next write, with the option documented and a repro or test for an idle peer close.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe
Hi,
I'm using rtpengine with --homer and --homer-protocol=tcp to send HEP traffic to a local stunnel instance, which then forwards the traffic (over TLS) to a remote Homer server.
From time to time I see the following log line:
[1765850620.856975] ERR: [U62KpxU9D2/bB5blxZxA/1 port 36493]: [core] Write error to Homer at 172.16.1.198:9062: Broken pipe
After some investigation it looks like the remote side (Homer/stunnel) closes the TCP connection when it has been idle for too long. On the rtpengine host, when the remote side closes the connection, netstat shows the socket in CLOSE_WAIT state. The connection stays in CLOSE_WAIT until the next call, and when rtpengine tries to send the next HEP packet over that connection, the write fails with Broken pipe.
My question: is there currently any way to control the idle timeout behavior for the TCP connection from rtpengine to Homer?
If this is not configurable today, would you consider adding such an option or automatic reconnect behavior when the Homer TCP connection has been closed by the peer due to idling?
Environment
- rtpengine version: 12.5
- OS / distro: bullseye
- Dominant language
- Perl
- Stars
- 992
- Forks
- 459
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sipwise/rtpengine
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
HTTP/WS worker threads spin forever in `__websocket_write_done()` (`sched_yield` loop) — 100% CPU with `--listen-http`Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 15/100
sipwise/rtpengine#2197 · 1 comment ·
Maintainers usually reply within 2 days
-
Kernel NULL pointer dereference in target_put() during target deletionPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
sipwise/rtpengine#2190 · 1 comment ·
Maintainers usually reply within 2 days
-
Calls using a third logical interface are silently never written to Redis (breaks keyspace-notification HA)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sipwise/rtpengine#2181 · 4 comments ·
Maintainers usually reply within 2 days
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
sipwise/rtpengine#2162 · 1 comment ·
Maintainers usually reply within 2 days
All issues in sipwise/rtpengine
Similar issues
-
Add .gitattributes so share/skel keeps LF on a Windows git checkoutPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
PerlDancer/Dancer2#1854 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
major/MySQLTuner-perl#1007 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
bioconda/bioconda-recipes#70187 ·
Maintainers usually reply within 2 days