Z-Wave-Me / z-way-issues

This repo is only to host issues for Z-Way.
6 stars 1 forks source link

Random crash/exit of z-way server #135

Closed travellingkiwi closed 3 years ago

travellingkiwi commented 6 years ago

[2017-12-12 08:27:39.684] [D] [zway] SETDATA controller.data.softwareRevisionVersion = "v2.3.6"

After running domoticz for a while, I decided to go back to openHab and using the zWay interface. Over the last 2 weeks I've had 3 crashes/random exit of the z-way server

There's nothing in the logs. They just stop. e.g.

[2017-12-12 06:25:05.876] [D] [zway] RECEIVED: ( 01 04 01 13 01 E8 ) [2017-12-12 06:25:05.877] [D] [zway] SENT ACK [2017-12-12 06:25:05.877] [D] [zway] Delivered to Z-Wave stack [2017-12-12 06:25:05.901] [D] [zway] RECEIVED: ( 01 07 00 13 6D 00 00 02 84 ) [2017-12-12 06:25:05.902] [D] [zway] SENT ACK [2017-12-12 06:25:05.902] [I] [zway] Job 0x13 (SwitchColor State Get): Delivered [2017-12-12 06:25:05.903] [D] [zway] SendData Response with callback 0x6d received: received by recipient [2017-12-12 06:25:05.904] [D] [zway] SETDATA devices.13.data.lastSendInternal = ** [2017-12-12 06:25:05.904] [D] [zway] Job 0x13 (SwitchColor State Get): success [2017-12-12 06:25:05.904] [I] [zway] Waiting for job reply: SwitchColor State Get [2017-12-12 06:25:05.969] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.052] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.106] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.161] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.221] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.233] [D] [zway] RECEIVED: ( 01 0C 00 04 00 12 06 31 05 01 22 00 CF 3B ) [2017-12-12 06:25:06.234] [D] [zway] SENT ACK [2017-12-12 06:25:06.235] [D] [zway] SETDATA devices.18.data.lastReceived = 0 (0x00000000) [2017-12-12 06:25:06.235] [D] [zway] SETDATA devices.18.instances.0.commandClasses.49.data.1.deviceScale = 0 (0x00000000) [2017-12-12 06:25:06.237] [D] [zway] SETDATA devices.18.instances.0.commandClasses.49.data.1.scaleString = "°C" [2017-12-12 06:25:06.237] [D] [zway] SETDATA devices.18.instances.0.commandClasses.49.data.1.val = 20.700001 [2017-12-12 06:25:06.237] [D] [zway] SETDATA devices.18.instances.0.commandClasses.49.data.1 = Empty [2017-12-12 06:25:06.277] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor [2017-12-12 06:25:06.325] [I] [core] openHAB item successully notified BarRGBWFibaro_SwitchColor

It doesn't seem to be related to uptime. Once I was up for several days (Tuesday to Thursday). I was away so missed a couple of days. Restarted on Sunday, and got about 30 minutes... Restarted again last night, it was dead at 06:30 this morning...

Not sure what sort of logs you'd need...

travellingkiwi commented 6 years ago

Could this be another instance of #125 ? Has that issue been fixed yet?

Although my .json files don't seem overly large... Only 1MB at most...

PoltoS commented 6 years ago

Do you have modules using TCP/UDP sockets?

travellingkiwi commented 6 years ago

In z-way? You mean clients? I have openHab2 talking to z-way via the REST interface. And z-way connects out to openHab2 for updates… Is that what you mean?

H

On 13 Dec 2017, at 10:22, Poltorak Serguei notifications@github.com wrote:

Do you have modules using TCP/UDP sockets?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Z-Wave-Me/z-way-issues/issues/135#issuecomment-351348154, or mute the thread https://github.com/notifications/unsubscribe-auth/ARG0qykcJ7GNd6t1a7QC9PZ4EyTITl3Tks5s_6VVgaJpZM4Q_mKY.

syphr42 commented 6 years ago

I'm having a similar issue. I use openHAB and have seen the Z-Way server (seemingly randomly) just exit. I see no errors in the logs and systemd says nothing is wrong, but the process exited. A restart and all is well for a little while until it exits again.

I have the default set of apps with one addition - the openHAB Connector. I recently added a Radio Thermostat CT100 Plus to the network and it seems that the issues are happening more frequently now, but that is just anecdotal.

PoltoS commented 6 years ago

This is the first report of a memory leak crash in Z-Way in combination with openHAB. Looks like something makes Z-Way mad with openHAB connector.

Can one of you guys guide me how to set it up with openHAB (including openHAB minimal installation) so I can try to reproduce it myself.

syphr42 commented 6 years ago

The fastest way to get openHAB up and running is probably with Docker. You can install Docker with the script here which works on RPi as well with Raspbian. To start the openHAB container, use one of the examples here (version 2.2.0 is the latest stable - that's what I'm running).

Here is a quick example:

docker run \
        --name openhab-test \
        --net=host \
        --tty \
        -v /etc/localtime:/etc/localtime:ro \
        -v /etc/timezone:/etc/timezone:ro \
        -it \
        openhab/openhab:2.2.0-armhf-debian

Once the container is running, you can select the "Recommended" setup in the UI (http://localhost:8080) and then choose the "PaperUI". On the left select "Addons" , then select "Bindings" along the top, and scroll to the bottom of the list to find Z-Way. Hit "Install" next to Z-Way to enable the integration.

Next step is to configure the Z-Way binding to tell it where to find the Z-Way server. On the left click Configuration > Things and then click "Add Things" on the right. You should see "Z-Way Binding" appear - click that and then click "Add Manually" at the bottom. Choose "Z-Way Server" and fill out the fields about the openHAB server and Z-Way server (remember the alias you enter for openHAB). Hit the check mark at the top when done.

Now switch over to your Z-Way server and install the openHAB connector from Online Apps. Configure the openHAB connector with same information you entered in openHAB. The aliases should match in both places. Once both sides have been configured, devices added to Z-Way should appear automatically in openHAB under the "Inbox" on the left nav. If you accept the item from the Inbox, you will be able to interact with it from openHAB on the Control screen.

The connector basically observes events in Z-Way and forwards them to openHAB via its REST API. openHAB forwards all changes over to Z-Way via its API.

PoltoS commented 6 years ago

I configured that and kept my plug turning on and off 5 times a second over 8 hours. All that reported to OH on every state change. Still running and no issue found.

PoltoS commented 6 years ago

Let's first confirm the problem is due to Z-Way sending to OH or vise versa.

Please disable all other home automation modules and keep Z-Way pushing to OH events. Then try to make vise versa to see what will lead to a crash.

Please also run Z-Way in a debugger as follows: https://forum.z-wave.me/viewtopic.php?f=3422&t=25592&hilit=gdb&start=10#p71176

PoltoS commented 3 years ago

The problem was fixed. Was due to memory leak in XML handler