We have moved at community.getvera.com

Author Topic: UI7 - Vera Restart with Exit Code: 245 - Some Insight  (Read 2956 times)

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
UI7 - Vera Restart with Exit Code: 245 - Some Insight
« on: October 24, 2014, 08:32:16 am »
Every time I tried to change data on my plugin Vera would restart:
   
    2014-10-24 06:24:39 - LuaUPnP Terminated with Exit Code: 245

I found that there was a file called:
   /etc/cmh/user_data.json.lzo.tmp from a couple of days ago.

I deleted it ... after that I was able to change data on Vera.

I really wish MCV would provide more details about this failure mode ... it's so common.




Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: UI7 - Vera Restart with Exit Code: 245 - Some Insight
« Reply #1 on: October 24, 2014, 09:21:37 am »
More Insight ...
It seems that UI5 would try to save the user_data when it would crash/restart.

In UI7 ... it looks like the interval for saving user data has extended ... and when it crashes it does not save the user_data

So you can run for a while thinking changes have been made ... and then Vera restarts,because it does not save the user_data ... you are back to a previous state.

These ARE SERIOUS problems in UI7.

Offline ElGringoCurioso

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +2/-0
Re: UI7 - Vera Restart with Exit Code: 245 - Some Insight
« Reply #2 on: November 02, 2014, 06:00:57 am »
Aren't these UserData files the cause all the (related?) errors in the LuaUpnP.log?

-rw-r--r--    1 root     root          6935 Oct 27 15:53 user_data.json.lzo.tmp
-rw-r--r--    1 root     root          6919 Oct 27 15:45 user_data.json.lzo.1
-rw-r--r--    1 root     root          6920 Oct 27 14:45 user_data.json.lzo.2
-rw-r--r--    1 root     root          6922 Oct 27 14:27 user_data.json.lzo.3
-rw-r--r--    1 root     root          6924 Oct 27 14:09 user_data.json.lzo.4
-rw-r--r--    1 root     root          6911 Oct 27 12:57 user_data.json.lzo.5

Are these user settings files rotated or archived to move out of the way??

As far as:
2014-10-24 06:24:39 - LuaUPnP Terminated with Exit Code: 245
When you look at the log it shows what "signal#" triggered the exit but I don't know all the conditions those "signals" map to.

I don't have another box on Ui5 to compare with and I am still mostly clueless about the whole MCV SW design.
Do we know what the MCV code developement cycle is like... it seems it is only unit tested and never QA'ed before release
Is it worth the time troubleshooting - Any fix in the pipe, the bug database seems fairly static!

Offline ElGringoCurioso

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +2/-0
Re: UI7 - Vera Restart with Exit Code: 245 - Some Insight
« Reply #3 on: November 03, 2014, 03:53:42 pm »
Long story short: I don't know how these User_Data files get rotated because the file rotation seems to concern only these guys:

/tmp/log.Rotate_Logs:
-rw-r--r--    1 root     root           215 Nov  2 15:20 /var/log/cmh/Init-LuaUPnP.log_1.gz
-rw-r--r--    1 root     root          1139 Nov  2 15:20 /var/log/cmh/Init-NetworkMonitor.log_1.gz
-rw-r--r--    1 root     root          3059 Nov  3 03:18 /var/log/cmh/InternetOk.log_1
-rw-r--r--    1 root     root             0 Nov  3 03:20 /var/log/cmh/LuaUPnP.log
-rw-r--r--    1 root     root       2724767 Nov  3 03:20 /var/log/cmh/LuaUPnP.log_1
-rw-r--r--    1 root     root         22400 Nov  3 03:19 /var/log/cmh/MiOSRestApi.log_1
-rw-r--r--    1 root     root             0 Nov  3 03:20 /var/log/cmh/NetworkMonitor.log
-rw-r--r--    1 root     root        415734 Nov  3 03:20 /var/log/cmh/NetworkMonitor.log_1
-rw-r--r--    1 root     root           727 Nov  2 15:20 /var/log/cmh/Provision.log_1.gz
-rw-r--r--    1 root     root          7047 Nov  3 03:19 /var/log/cmh/Report_AP.log_1
-rw-r--r--    1 root     root           530 Nov  2 15:20 /var/log/cmh/RouterMode.log_1.gz
-rw-r--r--    1 root     root           121 Nov  2 15:20 /var/log/cmh/WanFailover.log_1.gz
-rw-r--r--    1 root     root         77890 Nov  3 03:19 /var/log/cmh/cmh-ra.log_1
-rw-r--r--    1 root     root           292 Nov  2 15:20 /var/log/cmh/freshinstall.log_1.gz
-rw-r--r--    1 root     root          1388 Nov  2 15:20 /var/log/cmh/mios_firmware.log_1.gz
-rw-r--r--    1 root     root          2325 Nov  3 03:18 /var/log/cmh/mios_services.log_1
-rw-r--r--    1 root     root           493 Nov  2 15:20 /var/log/cmh/serproxy.log_1.gz
-rw-r--r--    1 root     root            20 Nov  2 15:20 /var/log/cmh/signal.flag.log_1.gz
-rw-r--r--    1 root     root            70 Nov  2 15:20 /var/log/cmh/signal.log_1.gz
-rw-r--r--    1 root     root        205586 Nov  3 03:20 /var/log/cmh/sysinfo.log_1
-rw-r--r--    1 root     root         22230 Nov  2 16:24 /var/log/cmh/upgrade.log_1
---
As their name extension suggest (1..5) "User_Data" seem rotated but by a whole different process than Logs.

Here is the crontab:
*/1 * * * * /usr/bin/Rotate_Logs.sh #Rotate_Logs (<<<<<<<<<<< User_data not involved in that .sh)
24 17 * * * //usr/bin/mios-service-sync_ergy.sh #Sync_Ergy

Based on time stamp activity I don't think it's done by Backup process either...

Good news: today it looks like the code runing has changed with a new approach to trim and loose previous file faster:
-rw-r--r--    1 root     root         15065 Nov  3 11:31 /etc/cmh/user_data.json.lzo <<<<<<<<<<<<<<
-rw-r--r--    1 root     root         15051 Nov  3 11:37 /etc/cmh/user_data.json.lzo.new <<<<<<<<<<<

-rw-r--r--    1 root     root          6919 Oct 27 15:45 /etc/cmh/user_data.json.lzo.1
-rw-r--r--    1 root     root          6920 Oct 27 14:45 /etc/cmh/user_data.json.lzo.2
-rw-r--r--    1 root     root          6922 Oct 27 14:27 /etc/cmh/user_data.json.lzo.3
-rw-r--r--    1 root     root          6924 Oct 27 14:09 /etc/cmh/user_data.json.lzo.4
-rw-r--r--    1 root     root          6911 Oct 27 12:57 /etc/cmh/user_data.json.lzo.5
-rw-r--r--    1 root     root          6935 Oct 27 15:53 /etc/cmh/user_data.json.lzo.tmp

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: UI7 - Vera Restart with Exit Code: 245 - Some Insight
« Reply #4 on: November 07, 2014, 06:37:16 pm »
These are NOT log files and not rotated as part of reducing disk space ...

Each file is a complete snapshot of the Vera State ... There are multiple files in case of corruption ... so you can recover a previous state.
When MCV does a backup this file is saved as well.