SERIOUS ERROR after restarting the service you can loose all

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

SERIOUS ERROR after restarting the service you can loose all

Post by fableman »

I found a rare but serious problem. ( been using 2.1 untilk today,now I moved to 2.2 not sure if its still there)

Problem: When the service restarts it writes to the configuration file and make it corrupt and you loose all settings and nothing works any more. Two times in three month period!

I don't understand why the server startup even need to write to the configuration file! BUT it happens and sometimes it corrupts it!!!

The only fix is to use a backup, if you don't have a backup you need to remove all devices and then reset all devices to factory default and re-include them and redo everything!

Why I noticed this rare bug is that I restart the service everyday at 04:00. (normally people would not do this, but still, every time you reboot your device or service you have a risk that you loose everything)

PLEASE TAKE A LOOK INTO THIS!!!

THIS IS NOT A SD CARD PROBLEM!!!
(sorry for caps, just getting desperate)
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: SERIOUS ERROR after restarting the service you can loose

Post by PoltoS »

First why to restart daily? This means something was wrong? My own system runs monthly without any problems and restarts only when I install new versions to test (right now it is up for 24 days since installation of 2.2.0).

Second, the write happens on stop. On start it should not happen. If it does, we need to investigate this. You can use strace -fe trace=file LD_LIBRARY_PATH=libs:$LD_LIBRARY_PATH ./z-way-server to check what happens.

What files are corrupted exactly? It is quite useless just to scary people without detailed information. Please let's see the root of the problem (if any)
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SERIOUS ERROR after restarting the service you can loose

Post by fableman »

The configuration gets broken and I loose all devices , hard for me as a normal user to see what really happends.

Why is not the configuration is plain text ?
If it was plain text then it would be a lot more easy to find the problem.
And because it's not in plain text I guess a small error will make the configuration useless for the program to use. ?

And I don't understand why you need to write to the configuration when the process stop? A write should be done when configuration change. Could it be the process that create the backup/config that fails at rare times?
(it build a incorrect backup/config that can be read back at start? Guessing cos I don't know exactly how zwave working with the config file.)
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SERIOUS ERROR after restarting the service you can loose

Post by fableman »

And there is nothing wrong with my installation. Why I restart the process every day at 04:00, it's just something I want to do.
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: SERIOUS ERROR after restarting the service you can loose

Post by michap »

I have several installations (about 10 different systems) - some for testing, some in live systems. Not all final versions.
I restart the systems sometimes 5-10 times per day, if testing something - of course not every system :)
But most of them will be restarted min. 5 times in week.

NEVER had a corrupt configuration after restart or reboot, not with final versions, not with rc (release candidate) versions.
The only broken installation had after a backup/restore ... (this is fixed)

So, my question is the same - what file is broken?
Can you attach a broken file and a valid file (as it was before restart) - so that could be checked what happen?

Thank you!
Best regards
Michael
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SERIOUS ERROR after restarting the service you can loose

Post by fableman »

I don't know what file that is broken, just that I loose all configuration and all sensors.
And the only way to get zwave to work with the sensors again is to restore the backup.

Where is the configuration located ?
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: SERIOUS ERROR after restarting the service you can loose

Post by PoltoS »

Please read this: http://razberry.z-wave.me/index.php?id=27
All configs are in /opt/z-way-server/config and /opt/z-way-server/automation/storage.

By the way, ALL of config files ARE text files. Even pretty human readable.
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SERIOUS ERROR after restarting the service you can loose

Post by fableman »

What I now can see is that the program write to two files when the service stop.

1. /opt/z-way-server/config/zddx/faf9d597-DevicesData.xml
and
2. /opt/z-way-server/config/Configuration.xml

But why dose the server needs to write to them when you stop the service? (should only be needed after configurations change?)

I will make a auto backup of them before every restart I make so I then can use DIFF to fine the problem, just that the problem is very rare.
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: SERIOUS ERROR after restarting the service you can loose

Post by PoltoS »

This information is saved to do cold start. When you close MS Word, it writes into file even if you have not added any symbol but just scrolled (to remember cursor position). Pretty same in Z-Way - it saves some internal states.
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SERIOUS ERROR after restarting the service you can loose

Post by fableman »

PoltoS wrote:This information is saved to do cold start. When you close MS Word, it writes into file even if you have not added any symbol but just scrolled (to remember cursor position). Pretty same in Z-Way - it saves some internal states.
ok, just hope i can find what ever it writes wrong at very rare times.
Post Reply