mikemucc / screenlogic-api

API to control a pentair Screenlogic. Built on top of parnic's screenlogic-node library.
Apache License 2.0
9 stars 2 forks source link

Getting error ECONNREFUSED #24

Closed ivanvach closed 1 year ago

ivanvach commented 1 year ago

Everything was working fine for a long time and now I'm getting the error below as a response to my HTTP PUT command. I did not change anything. I did update/upgrade/reboot of the server at 192.168.1.149:3002 after the problem emerged but it didn't help. I see a bunch of errors in the log of the same machine (attached at the very bottom here).

Same machine serves two Screenlogic/Pentairs both responsive at their respective IP addresses.

Here is the situation

192.168.1.149:3002 PUT doesn't work produces the error below 192.168.1.149:3002 GET does work 192.168.1.149:3001 PUT does work 192.168.1.149:3001 GET does work

Pls help

Thanks, Ivan

PUT http://192.168.1.149:3002/api/circuit/543/1 Error: connect ECONNREFUSED 192.168.1.149:3002 Request Headers User-Agent: PostmanRuntime/7.29.0 Accept: / Host: 192.168.1.149:3002 Accept-Encoding: gzip, deflate, br Connection: keep-alive

Oct 29 21:24:11 raspberrypi rc.local[637]: /usr/lib/node_modules/npm/lib/cli.js:35 Oct 29 21:24:11 raspberrypi rc.local[637]: throw err Oct 29 21:24:11 raspberrypi rc.local[637]: ^ Oct 29 21:24:11 raspberrypi rc.local[637]: TypeError: Class extends value undefined is not a constructor or null Oct 29 21:24:11 raspberrypi rc.local[637]: at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module._compile (node:internal/modules/cjs/loader:1256:14) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module.load (node:internal/modules/cjs/loader:1119:32) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module._load (node:internal/modules/cjs/loader:960:12) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module.require (node:internal/modules/cjs/loader:1143:19) Oct 29 21:24:11 raspberrypi rc.local[637]: at require (node:internal/modules/cjs/helpers:121:18) Oct 29 21:24:11 raspberrypi rc.local[637]: at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module._compile (node:internal/modules/cjs/loader:1256:14) Oct 29 21:24:11 raspberrypi rc.local[637]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) Oct 29 21:24:11 raspberrypi rc.local[637]: Node.js v18.17.1 Oct 29 21:24:11 raspberrypi rc.local[639]: /usr/lib/node_modules/npm/lib/cli.js:35 Oct 29 21:24:11 raspberrypi rc.local[639]: throw err Oct 29 21:24:11 raspberrypi rc.local[639]: ^ Oct 29 21:24:11 raspberrypi rc.local[639]: TypeError: Class extends value undefined is not a constructor or null Oct 29 21:24:11 raspberrypi rc.local[639]: at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module._compile (node:internal/modules/cjs/loader:1256:14) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module.load (node:internal/modules/cjs/loader:1119:32) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module._load (node:internal/modules/cjs/loader:960:12) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module.require (node:internal/modules/cjs/loader:1143:19) Oct 29 21:24:11 raspberrypi rc.local[639]: at require (node:internal/modules/cjs/helpers:121:18) Oct 29 21:24:11 raspberrypi rc.local[639]: at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module._compile (node:internal/modules/cjs/loader:1256:14) Oct 29 21:24:11 raspberrypi rc.local[639]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) Oct 29 21:24:11 raspberrypi rc.local[639]: Node.js v18.17.1

mikemucc commented 1 year ago

I can't replicate this on my dev system, even with Node.js 20. Perhaps you have a bad build? I'd suggest rebuilding your containers.

mikemucc commented 1 year ago

I just pushed a new commit to master with a updated Dockerfile to node 21 and updated dependencies. Seems to work fine on my system.

ivanvach commented 1 year ago

Everything is working now after upgrade to node 21. Thanks.