ylabonte / ioBroker.procon-ip

Adapter for ProCon.IP swimming pool control unit. It is intended for integration with your ioBroker home automation eg. building logic that involves other devices or to be combined with voice assistants (Alexa, Siri, Google) to give water temperature info or switch relays.
MIT License
6 stars 3 forks source link

(2643) Error: read ECONNRESET - Version 0.2 #8

Closed masterflai closed 4 years ago

masterflai commented 4 years ago

The current version 0.2 brings up an error within ioBroker log periodically.

Node.js v10.19.0 NPM 6.13.4

ylabonte commented 4 years ago

Sorry for that horrible response time! Haven't even recognized, there was an issue, that was not created automatically by the ioBroker bot. Thought I was the only one, using/testing the module. I will investigate in that soon!

masterflai commented 4 years ago

Thanks Yannic. If you need further logging information, please tell me.

ylabonte commented 4 years ago

First of all: Thank you for installing and using/testing my controller and last but not least also reporting this issue, too! :1st_place_medal:

It took me a while to re-setup my dev environment. I'm missing my old ide, but the license ran out. Will try VSCode now... Wasted much time on this, before facing the actual issue, which ultimately failed, when I recognized that I haven't access to a procon.ip right now and cannot regain it by my own, without leaving home. For the moment I have to take a nap. After that I'll try to regain access to a procon.ip.

If you have further logging information related to the ECONNRESET event, it might be useful. Could you determine the time span between two such logging events?

masterflai commented 4 years ago

2020-04-26 16_27_27-logs - ioBroker

masterflai commented 4 years ago

Hello Yannic, I can't see a specific periodically error. There are no other logging details on debug, warning or error level. Update interval is set to 3000ms.

Pool Controller runs on firmware 1.7.0.c. This is the last one for this device.

ylabonte commented 4 years ago

Hello masterflai, in the meantime I have regained access to the procon.ip I used for development. But so far I cannot see an error like this. So that won't help anyway...

The only thing, the error reveals about itself is that the remote end (aka. the actual procon.ip pool controller) unexpectedly closed a connection established by the iobroker adapter (procon-ip.0). I'm not clear about the reason for this. But one I could imagine, would be when the procon.ip receives more requests than it can handle. So I would suggest to go to the settings of my iobroker adapter and increase the value of Update-Intervall (ms) - I have it set to 2000 without problems so far 😅, but if yours is even higher, I would still increase it ...just for testing reasons (if the error vanishes, when the refresh interval is just big enough). Maybe also reboot the pool controller to ensure all of its relevant caches and buffers are cleared.

I'll also keep looking for a solution, to handle such kind of connection errors within my code and then give more concrete and less alarming logging information on such events.

BamBam8989 commented 4 years ago

Good morning @ all,

i have installed the adapter today but i get the following Log Message:

procon-ip.0 | 2020-04-29 09:16:05.037 | error | (10811) Error: Request failed with status code 404
-- | -- | -- | --
procon-ip.0 | 2020-04-29 09:16:02.032 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:59.034 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.091 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.020 | info | (10811) UsrcfgCgiService url: /usrcfg.cgi
procon-ip.0 | 2020-04-29 09:15:56.018 | info | (10811) GetStateService url: /GetState.csv
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config updateInterval: 3000
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config username: XXXX
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config basicAuth: true
procon-ip.0 | 2020-04-29 09:15:56.004 | info | (10811) config controllerUrl: xxx.xxx.xxx.xxx
procon-ip.0 | 2020-04-29 09:15:55.970 | info | (10811) starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.procon-ip, node: v10.19.0, js-controller: 3.0.20

any idea??

Thanks a lot Nide regards BamBam89

PS.: I can´t see any folders under objects

masterflai commented 4 years ago

Good morning @ all,

i have installed the adapter today but i get the following Log Message:

procon-ip.0 | 2020-04-29 09:16:05.037 | error | (10811) Error: Request failed with status code 404
-- | -- | -- | --
procon-ip.0 | 2020-04-29 09:16:02.032 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:59.034 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.091 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.020 | info | (10811) UsrcfgCgiService url: /usrcfg.cgi
procon-ip.0 | 2020-04-29 09:15:56.018 | info | (10811) GetStateService url: /GetState.csv
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config updateInterval: 3000
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config username: XXXX
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config basicAuth: true
procon-ip.0 | 2020-04-29 09:15:56.004 | info | (10811) config controllerUrl: xxx.xxx.xxx.xxx
procon-ip.0 | 2020-04-29 09:15:55.970 | info | (10811) starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.procon-ip, node: v10.19.0, js-controller: 3.0.20

any idea??

Thanks a lot Nide regards BamBam89

PS.: I can´t see any folders under objects

Can you access the URL directly via browser? HTTP 404 error normally means, that the url isn't reachable.

You should enter the URL without substructure, so don't use the URL with (/gui/phase2/). Only the IP address. Have you activated (HTTP Basic Auth)?

BamBam8989 commented 4 years ago

Good morning @ all, i have installed the adapter today but i get the following Log Message:

procon-ip.0 | 2020-04-29 09:16:05.037 | error | (10811) Error: Request failed with status code 404
-- | -- | -- | --
procon-ip.0 | 2020-04-29 09:16:02.032 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:59.034 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.091 | error | (10811) Error: Request failed with status code 404
procon-ip.0 | 2020-04-29 09:15:56.020 | info | (10811) UsrcfgCgiService url: /usrcfg.cgi
procon-ip.0 | 2020-04-29 09:15:56.018 | info | (10811) GetStateService url: /GetState.csv
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config updateInterval: 3000
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config username: XXXX
procon-ip.0 | 2020-04-29 09:15:56.005 | info | (10811) config basicAuth: true
procon-ip.0 | 2020-04-29 09:15:56.004 | info | (10811) config controllerUrl: xxx.xxx.xxx.xxx
procon-ip.0 | 2020-04-29 09:15:55.970 | info | (10811) starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.procon-ip, node: v10.19.0, js-controller: 3.0.20

any idea?? Thanks a lot Nide regards BamBam89 PS.: I can´t see any folders under objects

Can you access the URL directly via browser? HTTP 404 error normally means, that the url isn't reachable.

You should enter the URL without substructure, so don't use the URL with (/gui/phase2/). Only the IP address. Have you activated (HTTP Basic Auth)?

Access via URL is possible.

image

image

ylabonte commented 4 years ago

Hi @BamBam8989, please enter a full URL including the "http://" or "https://" (in your case it should be "http://") into "URL der Poolsteuerung", not just the ip address. That should solve your problem. I think I should add some kind of form validation at this point...

Just a hint for the next time: Please take the time and open a new ticket, when you see, that the error message you receive and/or the behavior you notice are different to the one in open tickets. That helps keeping the overview and gives me the option to reference fixed bugs or new features listed in the changelog to the corresponding github issue.

I wish you all a wonderful weekend!

Cheers, Yannic

BamBam8989 commented 4 years ago

Hi @BamBam8989, please enter a full URL including the "http://" or "https://" (in your case it should be "http://") into "URL der Poolsteuerung", not just the ip address. That should solve your problem. I think I should add some kind of form validation at this point...

Just a hint for the next time: Please take the time and open a new ticket, when you see, that the error message you receive and/or the behavior you notice are different to the one in open tickets. That helps keeping the overview and gives me the option to reference fixed bugs or new features listed in the changelog to the corresponding github issue.

I wish you all a wonderful weekend!

Cheers, Yannic

Hi Yannic,

thanks alot for your answer. Sometimes the answer can be so easy....

About your hint. You are absolutly right. I have seen to late that i have wrote in the wrong topic. Maybe somebody can move this problem to a new topic. I think i can´t do it by myself.

Once again, thanks for your help and your work with this adapter. And also a nice weekend for you and your familie.

Nice regards

ylabonte commented 4 years ago

Hi @BamBam8989, I can't move it either. But it's no problem so far. I was just afraid of the imagination, that there could be more users out there with problems related to the network connectivity, that could join this conversation in the future and blow up the single issue. I think I have just seen too many issues of this kind on github in the past. 😅️

Finally I'm happy that I could help you with your issue! And I can use it for an improvement (the form validation) on the adapter with the next release. 😁️

ylabonte commented 4 years ago

I have made a new release (v0.4.0), which should improve the exception handling for http request errors. Form validation was added with the v0.3.1 last week. You may stop the adapter before updating, because from this release on the url, username and password of your ProCon.IP are stored encrypted inside ioBroker's database. But this implies, it cannot work with the configuration made prior to v0.4.0. So you will have to re-set url, username and password for the adapter to work after the update.

@masterflai: I think in your case this update will produce warnings in the log instead of errors. Could you confirm this? Or even better, did you have any success by adjusting (increasing) your Update-Intervall (ms) setting?

masterflai commented 4 years ago

Hello Yannic, I installed the updated version 0.4 without a problem. The URL and the password wasn't changed during the update. The username switched back to "admin", so I reentered the current one and everything works flawless.

Adjusting the period doesn't affect the ECONNRESET issue.

After installing V0.4 it isn't longer an error message. Now it is classified as warning, as you mentioned above. I'm happy with the current solution and it seems, that the issue is caused by my network. Therefore I will close the issue. Thanks for your great work Jannic.

2020-05-11 12_12_43-logs - ioBroker