mapero / node-red-contrib-apcaccess

Node-RED nodes to request status and events from an APC UPS Daemon NIS running on the network.
MIT License
1 stars 2 forks source link

Continuous disconnection and reconnection #1

Open cerebrate opened 7 years ago

cerebrate commented 7 years ago

While I'm using the apcaccess node successfully against my apcupsd installation (when connected), even when not accessed it disconnects from and reconnects to the apcupsd on a more or less continuous basis. Logs as follows:

May 17 12:31:13 ariadne Node-RED[1929]: 17 May 12:31:13 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:31:12 ariadne Node-RED[1929]: 17 May 12:31:12 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:30:56 ariadne Node-RED[1929]: 17 May 12:30:56 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:30:55 ariadne Node-RED[1929]: 17 May 12:30:55 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:30:31 ariadne Node-RED[1929]: 17 May 12:30:31 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:30:29 ariadne Node-RED[1929]: 17 May 12:30:29 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:30:13 ariadne Node-RED[1929]: 17 May 12:30:13 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:30:12 ariadne Node-RED[1929]: 17 May 12:30:12 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:29:56 ariadne Node-RED[1929]: 17 May 12:29:56 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:29:55 ariadne Node-RED[1929]: 17 May 12:29:55 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:29:30 ariadne Node-RED[1929]: 17 May 12:29:30 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:29:28 ariadne Node-RED[1929]: 17 May 12:29:28 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:29:13 ariadne Node-RED[1929]: 17 May 12:29:13 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:29:11 ariadne Node-RED[1929]: 17 May 12:29:11 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.
May 17 12:28:56 ariadne Node-RED[1929]: 17 May 12:28:56 - [info] [apcconfig:office UPS] Connected to calmirie.arkane-systems.lan:3551
May 17 12:28:54 ariadne Node-RED[1929]: 17 May 12:28:54 - [warn] [apcconfig:office UPS] Disconnected. Tries to reconnect in 1.5 seconds.

I haven't seen this with any other tools accessing the apcupsd instance. Any thoughts?

mapero commented 7 years ago

Hi,

I saw this once but was not able to find out the reason for it. The disconnect is triggered by the apcupsd daemon, even if no data is send.

Redeploying the node helped for me.

I'll try to find out the reason.

alexsahka commented 6 years ago

Same here: Connected to localhost:3551 Disconnected. Tries to reconnect in 1.5 seconds. Any solution?

rmey commented 6 years ago

I have the same issue since I upgraded the apcupsd to 3.14.14-0.3

hyteoo commented 6 years ago

I have the same issue. After deployment I get the response (statusJson in my case) but after 15 seconds, the APC node throws an error "Disconnected. Tries to reconnect in 1.5 seconds." which repeats every 30 seconds. Biggest problem is that after this, any statusJson request gets ignored and no more data is retrieved from the APC NIS server, basically rendering the component useless...

Using latest version of node-red, nodejs and apcaccess

jdiderik commented 5 years ago

same here... not sure what is going on exactly.

Running: Ubuntu x64, kernel 4.15.0-36-generic apcupsd 3.14.14 node-red 0.19.5

stevenhowes commented 5 years ago

If you make sure you send a request every 10 seconds or so it never times out.

bwims commented 4 years ago

I note this isn't closed, so can I suggest making the disconnection message optional? It really just clogs up the debug log. Could the disconnect message appear on a 2nd output for those who want it?

spineytoad commented 3 years ago

I am having the same issue, is there a work around for this?

alexsahka commented 3 years ago

Using the node-red-contrib-nut-ups https://flows.nodered.org/node/node-red-contrib-nut-ups

Working great no problems.

Dud3z commented 2 years ago

Same here... @mapero

Dud3z commented 2 years ago

Just in case somebody needs a alternative... i built a flow to get the data from console if your UPS is connected locally: https://flows.nodered.org/flow/fc403e2cd768cc1d8cbe58e99f941eed

jakubkasparek commented 2 years ago

Same issue here :( msg : string[48] "Disconnected. Tries to reconnect in 1.5 seconds."

alexbn71 commented 2 years ago

same issue here on an unRAID system

alexbn71 commented 2 years ago

If you make sure you send a request every 10 seconds or so it never times out.

useful suggestion, it works