kozmoz / atag-one-api

ATAG ONE API
MIT License
18 stars 3 forks source link

Socket timeout error #27

Closed AndyKeogh closed 6 years ago

AndyKeogh commented 6 years ago

I successfully ran v1.44 of your app a few hundred times yesterday , but then it started to fail with a socket error.

Does your app close down all IP communications so that all sockets are released?

The boiler system is running fine, and I can access the thermostat through the ATAG website. The iPhone app can also access the thermostat through local Wi-Fi. I can successfully ping the thermostat but your app is now raising a socket timeout exception every time I run it. I have rebooted the PC and that has not fixed the issue.

Looks like the problem is at the Atag-one. Is this a known issue?

Andy Ping results and socket error messages below.

Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>ping 192.168.101.68

Pinging 192.168.101.68 with 32 bytes of data: Reply from 192.168.101.68: bytes=32 time=572ms TTL=64 Reply from 192.168.101.68: bytes=32 time=176ms TTL=64 Reply from 192.168.101.68: bytes=32 time=1ms TTL=64 Reply from 192.168.101.68: bytes=32 time=15ms TTL=64

Ping statistics for 192.168.101.68: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

G:\AK\ATAG\Grab>java -jar atag-one_1v44.jar Input Output Error: java.net.SocketTimeoutException: connect timed out java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at org.juurlink.atagone.utils.NetworkUtils.getPostPageContent(NetworkUtils.java:159) at org.juurlink.atagone.AtagOneLocalConnector.executeRequest(AtagOneLocalConnector.java:585) at org.juurlink.atagone.AtagOneLocalConnector.requestAuthorizationFromThermostat(AtagOneLocalConnector.java:541) at org.juurlink.atagone.AtagOneLocalConnector.login(AtagOneLocalConnector.java:163) at org.juurlink.atagone.AtagOneApp.main(AtagOneApp.java:89)

G:\AK\ATAG\Grab>

kozmoz commented 6 years ago

Hi Andy,

No known issues with version 1.44.

Sounds like a Windows firewall setting or maybe some anti-virus software blocks java?

Can you try to disable the Windows firewall and or anti-virus software and try again?

Greetings, Rob Atag One API

On 21 Nov 2017, at 15:47, AndyKeogh notifications@github.com wrote:

I successfully ran v1.44 of your app a few hundred times yesterday , but then it started to fail with a socket error.

Does your app close down all IP communications so that all sockets are released?

The boiler system is running fine, and I can access the thermostat through the ATAG website. The iPhone app can also access the thermostat through local Wi-Fi. I can successfully ping the thermostat but your app is now raising a socket timeout exception every time I run it. I have rebooted the PC and that has not fixed the issue.

Looks like the problem is at the Atag-one. Is this a known issue?

Andy Ping results and socket error messages below.

Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>ping 192.168.101.68

Pinging 192.168.101.68 with 32 bytes of data: Reply from 192.168.101.68: bytes=32 time=572ms TTL=64 Reply from 192.168.101.68: bytes=32 time=176ms TTL=64 Reply from 192.168.101.68: bytes=32 time=1ms TTL=64 Reply from 192.168.101.68: bytes=32 time=15ms TTL=64

Ping statistics for 192.168.101.68: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

G:\AK\ATAG\Grab>java -jar atag-one_1v44.jar Input Output Error: java.net.SocketTimeoutException: connect timed out java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at org.juurlink.atagone.utils.NetworkUtils.getPostPageContent(NetworkUtils.java:159) at org.juurlink.atagone.AtagOneLocalConnector.executeRequest(AtagOneLocalConnector.java:585) at org.juurlink.atagone.AtagOneLocalConnector.requestAuthorizationFromThermostat(AtagOneLocalConnector.java:541) at org.juurlink.atagone.AtagOneLocalConnector.login(AtagOneLocalConnector.java:163) at org.juurlink.atagone.AtagOneApp.main(AtagOneApp.java:89)

G:\AK\ATAG\Grab>

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kozmoz/atag-one-api/issues/27, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2qtN9dP9ppsNWbWKL1qgS_erdLBrO4ks5s4uKOgaJpZM4Ql9Fy.

AndyKeogh commented 6 years ago

Looks like this is an ATAG-one issue. I had already checked out the firewall probability but the network analyser trace showed that the PC was still requesting a dump and it was the Atag-one that was not responding. It also showed a DHCP request from the Atag-one at the time the socket error appeared so it looks like a daemon crashed and it was attempting a recovery.... but did not succeed. I was running your app to investigate why the ATAG system waited an hour before engaging the central heating system despite having reached temperature within 30 minutes. That problem was overcome by powering off the system for 5 minutes. It also cleared the socket error issue as it has now run with 1 minute interrogations for over 49 hours. Sorry for doubting your software but 49 years of software development and troubleshooting suggest one rules out the more obvious questions first :) The dump data does expose some interesting data changes.
Before asking ATAG, are you aware of a document which describes (specifies) the dump data and what all the non obvious parameters mean?

Andy