Thank you a lot for this analysis. We were hunting for this HTTP related bug never thinking about relation to SSL.
We will run ling term test with HTTPS to hunt it down. Is it with XML parsing or with JSON?
Z-way server goes down spontaneously
-
- Posts: 41
- Joined: 02 Nov 2017 18:49
Re: Z-way server goes down spontaneously
Nice to be helpful. I don't understand your question, but here is what I'm doing
I use value (or https).
Other side I have that zway.php script, which just receives device and state values and takes furher actions on that side.
I use value
Code: Select all
http://myserver.dy.fi/zway/zway.php?device=%DEVICE%&state=%VALUE%
Other side I have that zway.php script, which just receives device and state values and takes furher actions on that side.
Raspi 4(Buster), Zwave Version 4.0.2 (7.28), Raz 7 Pro
Re: Z-way server goes down spontaneously
Can you provide a snipplet of the code running this http request? How do you process the result of this request? What does it return? Or you just do the request without handling the reply (just do the action without feedback from the request)?
-
- Posts: 41
- Joined: 02 Nov 2017 18:49
Re: Z-way server goes down spontaneously
Code running this http request is not my own. As I said before, I used HTTPGet app from appstore.
On my web server php script does not return anything. Actually I don't have to process values at all to get crashes. Like this zway.php:
On my web server php script does not return anything. Actually I don't have to process values at all to get crashes. Like this zway.php:
Code: Select all
<?
$device = $_GET["device"];
$state = $_GET["state"];
?>
Raspi 4(Buster), Zwave Version 4.0.2 (7.28), Raz 7 Pro
Re: Z-way server goes down spontaneously
We will look on the HTTPGet module. May be it uses something that cause the crash
Re: Z-way server goes down spontaneously
I am using 3.0.0 and think I am seeing this exact problem as well.
When performing rather frequent polling (JSON, every 5th seconds) for status updates, things seems to run continuously stable.
However, when enabling the HTTPGet module to allow pushing the status updates to the client, the Z-way server will eventually crash. Most of the time it takes >12 hours, and sometimes it runs for up to 2 days before crashing.
The client side reply to the HTTPGet requests is simply "200 OK" before closing the socket.
The only thing I can see that stands out, is that one of my switches (Qubino ZMNHAD1 h1s5p1) has an integrated energy meter that seems to send rather frequent sensor level data changes.
Did anything come out of the previous bug hunt so far?
When performing rather frequent polling (JSON, every 5th seconds) for status updates, things seems to run continuously stable.
However, when enabling the HTTPGet module to allow pushing the status updates to the client, the Z-way server will eventually crash. Most of the time it takes >12 hours, and sometimes it runs for up to 2 days before crashing.
The client side reply to the HTTPGet requests is simply "200 OK" before closing the socket.
The only thing I can see that stands out, is that one of my switches (Qubino ZMNHAD1 h1s5p1) has an integrated energy meter that seems to send rather frequent sensor level data changes.
Did anything come out of the previous bug hunt so far?
Re: Z-way server goes down spontaneously
We have made many long-term tests with HTTPGet and were not able so far to make it crash. Few things to know:
- is the remote HTTP server you send Get to is on the same Pi or on another machine in your LAN or even far in the internet? (we need to understand delays in the reply)
- do you do async request or sync? I suppose you use HTTP Device, so async.
- what triggers the HTTP request? some rule or is it periodic? If a rule, how often does it triggers and what is the source event: Z-Wave packet or some other action?
- how do you parse the reply of this request?
- is the remote HTTP server you send Get to is on the same Pi or on another machine in your LAN or even far in the internet? (we need to understand delays in the reply)
- do you do async request or sync? I suppose you use HTTP Device, so async.
- what triggers the HTTP request? some rule or is it periodic? If a rule, how often does it triggers and what is the source event: Z-Wave packet or some other action?
- how do you parse the reply of this request?
Re: Z-way server goes down spontaneously
Firstly, many thanks for your reply and apologies for my late reply - it has been a busy week.
Content-length: 6\r\n
Content-type: text/html\r\n
\r\n
200 OK
Let me know if you need me to share some particular log file data, if that is something that might be of help.
Regards,
/J
The remote server is within the LAN but not on the RPiPoltoS wrote: ↑28 Oct 2019 02:10We have made many long-term tests with HTTPGet and were not able so far to make it crash. Few things to know:
- is the remote HTTP server you send Get to is on the same Pi or on another machine in your LAN or even far in the internet? (we need to understand delays in the reply)
No I am not using HTTP device. The request from HTTPGet is handled synchronously in the receiving application.
Since HTTPGet module does not offer any filtering, I suppose any change in z-wave device status or level will be pushed through to the specified URL. I see frequent updates from one particular device (Qubino ZMNHAD1 h1s5p1) which has an energy meter built-in, and this one sends a fair amount of changes - at the very most I would estimate roughly 20 times per minute. It has the default threshold of 10% set for triggering a new status update. There is also a couple of temperature sensors but these generate a lot less frequent updates.
HTTP/1.1 200 OK\r\n
Content-length: 6\r\n
Content-type: text/html\r\n
\r\n
200 OK
Let me know if you need me to share some particular log file data, if that is something that might be of help.
Regards,
/J
Re: Z-way server goes down spontaneously
If you don't use HTTPDevice module, how do you execute the HTTP Get request? Via some piece of code made by yourself? Can you share it?
And you don't parce the reply (I see that the reoky is empty). So it is not due the parsing.
And you don't parce the reply (I see that the reoky is empty). So it is not due the parsing.
-
- Posts: 41
- Joined: 02 Nov 2017 18:49
Re: Z-way server goes down spontaneously
I think that GokMasE surrers exactly same problem as I can produce if i use HTTPS instead of HTTP in HTTPGet App configuration.
Also GokMasE seems to use same app: HTTPGet.
- My HTTP server, whre I send HTTPGet to other machine, is in same lan.
- As GokMasE said, any status change is sent as HTTPGet request In that App there seems no options to do any filtering.
Screen capture: https://drive.google.com/file/d/1rTjebw ... sp=sharing
Also GokMasE seems to use same app: HTTPGet.
- My HTTP server, whre I send HTTPGet to other machine, is in same lan.
- As GokMasE said, any status change is sent as HTTPGet request In that App there seems no options to do any filtering.
Screen capture: https://drive.google.com/file/d/1rTjebw ... sp=sharing
Raspi 4(Buster), Zwave Version 4.0.2 (7.28), Raz 7 Pro