-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
699 established TCP connections from HA to Denon AVR telnet port #119133
Comments
Hey there @ol-iver, @starkillerOG, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) denonavr documentation |
Just to add a little bit of info:
|
I am experiencing this as well, intermittently. Strangely, even when I disable the denonavr integration, the log flood continues until I restart Home Assistant. |
So I'm not alone! :) |
Hi there, I'm now up to 31 concurrent telnet connections to the AVR. |
The upstream library Are you able to manually create the issue by disconnecting the ethernet cable for a minute and then reconnecting it? That would be helpful for debugging the issue. |
I just checked and I had 40 established connections. I tried to manually connect with telnet just to see if the connection is accepted and while I did not get a prompt from the AVR, netstat showed 41 established connections. I stopped HA --> 40 in FIN_WAIT + 3 TIME_WAIT, then all gone after a short while Then, as I was monitoring every second all connections from HA to the AVR and I was preparing to disable the switch port, guess what! A 2nd ESTABLISHED connection appeared from HA to the AVR telnet port! So there were 2, both ESTABLISHED. I waited for about 10-15 minutes to see what happens and they both stayed ESTABLISHED and no new connections appeared. I then disabled the port on the switch and another surprise followed. I expected both established connections to drop but that is not what happened. One of them went to FIN_WAIT1 and then disappeared, while the 2nd one stayed ESTABLISHED! I left the port disabled for a couple of minutes, during which time I saw HA trying to initiate new connections (SYN_SENT) but this one connection remained ESTABLISHED throughout. I just cannot figure out HOW. Then, once I reenabled the switch port HA established a new connection so I was left with 2, both ESTABLISHED. |
Here's the time correlation: Switch port:
HA log:
|
Hmmm, I reckon nobody's interested in looking into this |
Hey Did you try to deactivate the telnet option in the integration settings ? i'm investigating an other problem with Denon AVR and integration related to mute and in looking to find the issue I noticed on 3 AVR I have on one system 2 of them don't have the telnet option activated in the integration and the control works as well as the one that has the telnet option ;) In case it might help to avoid the log issue ;) Vincèn |
There have been leaked TCP transports when telnet connections have been disconnected. I might have fixed it with ol-iver/denonavr#302. |
The problem
Hi there
I recently noticed my HA log file getting pretty large (in the GB range) pretty quickly (in just a couple of days). I'm running HA on a RPi4B so almost a GB of logs written each day is not insignificant for my setup (and this gets amplified because I also run full system backups to a separate btrfs partition every morning at 5am). Right now, out of the 9,244,339 lines the log file accumulated in the last 3.5 days, exactly 9,231,778 of them are from "[denonavr.api]".
The 2 messages from "[denonavr.api]" that I see in the HA log file are:
"Keep alive failed, disconnecting and reconnecting" (130,508 lines)
"Telnet reconnected" (9,101,270 lines)
Each of these lines is repeated many times each second (yes, second).
I happily used the Denon integration for a long time (~4-5 years) with next to no issues however recently my Ethernet switch started glitching (I have an open ticket with the manufacturer for this - it works fine for multiple hours, up to a few days, then, for no clear reason it suddenly drops the Link Aggregation groups and then around 10 minutes later as clockwork everything comes back online without any intervention).
I noticed that the time of the "Keep alive failed, disconnecting and reconnecting" HA log entries align with the time when the Ethernet switch decides to take a 10 minute break, with the "Telnet reconnected" log entries going on for quite a while after the Ethernet switch decides to start working again.
With the switch currently working netstat -napt tells me that one python process has exactly 699 established TCP connections to port 23 of the Denon AVR. I'd say that's a few too many! :)
I appreciate that the initial cause are the Ethernet switch flips, but I wonder if there is anything I could try to reduce the frequency and number of retries and log entries. For my purposes trying to reestablish the TCP connection to the Denon AVR every 5-10 seconds would be perfectly acceptable, I don't need it to retry every few milliseconds. Where can I go in an change the retry interval?
Many thanks!
What version of Home Assistant Core has the issue?
core-2024.1.6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
denonavr
Link to integration documentation on our website
https://www.home-assistant.io/integrations/denonavr
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: