Author Topic: EventWatcher[834] : Startup Lua Failed"  (Read 4323 times)

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
EventWatcher[834] : Startup Lua Failed"
« on: November 16, 2016, 07:29:53 am »
First I tried to install the version that is available in Vera App Store, but I got an error "EventWatcher[834] : Startup Lua Failed""
Then I installed the version that is available in the Alternate UI App Store (version 16.7.6) but it give me the same error.

What should I do to get it working?
The only information that is available in Eventwather (under Control) is the following (everything else is empty):
- Last Reboot
- Last Luup Restart
If I try to go open "Variable and Event log" it give the following error: No handler (http://my_IP/port_3480/data_request?id=lr_ALTUI_Handler&command=home&#)

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #1 on: November 16, 2016, 08:07:53 am »
A copy of the log whilst Vera is starting up should show some useful diagnostics.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #2 on: November 16, 2016, 08:24:29 am »
My primary idea with getting Eventwatcher is to see what is in the logs :)
Can you please tell me how to get what logs that you think can help to understand this issue?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #3 on: November 16, 2016, 08:40:02 am »
My primary idea with getting Eventwatcher is to see what is in the logs :)

EventWatcher doesn't do that... it creates its own logs.

Quote
Can you please tell me how to get what logs that you think can help to understand this issue?

The easiest way is to open a browser to
Code: [Select]
http://VeraIP/cgi-bin/cmh/log.sh?Device=LuaUPnP

and watch whilst Vera starts up after a reload.  After it settles down (maybe some time - the output is buffered) then copy the whole of the page contents (much of it scrolled off screen.)
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #4 on: November 16, 2016, 08:55:19 am »
Is it safe to publish the logs officially?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #5 on: November 16, 2016, 09:13:54 am »
Depends whether you have any plugins or lock etc. with sensitive info.  Otherwise, everything is behind you firewall.  PM the log to me if that helps.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #6 on: November 16, 2016, 11:05:56 am »
PM send.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #7 on: November 16, 2016, 11:48:32 am »
Indeed the logs show an error:
Code: [Select]
50 11/16/16 14:58:18.987 luup_log:838: EventWatcher: defining CLI... <0x772cb520>
50 11/16/16 14:58:18.997 luup_log:838: EventWatcher: Starting Event service... <0x772cb520>
50 11/16/16 14:58:18.998 luup_log:838: EventWatcher: Server listening on port 443 <0x772cb520>
10 11/16/16 14:58:18.998 AlarmManager::AddRelativeAlarm current time 1479304698 delay 10 type 7 <0x772cb520>
10 11/16/16 14:58:18.999 AlarmManager::AddAbsoluteAlarm alarm 0x1928f98 entry 0x1ede370 id 0 type 7 param=0x198d380 entry->when: 1479304708 time: 1479304698 bCancelFirst 0=0 <0x772cb520>
50 11/16/16 14:58:18.999 luup_log:838: EventWatcher: Starting Watch service... <0x772cb520>
01 11/16/16 14:58:19.000 LuaInterface::CallFunction_Startup-1 device 838 function init failed [string "local ABOUT = {..."]:1156: attempt to index local 'c' (a nil value) <0x772cb520>
01 11/16/16 14:58:19.000 LuImplementation::StartLua running startup code for 838 I_EventWatcher.xml failed <0x772cb520>

The good news is that I understand that the condition that it reports would generate an error, the bad news is I simply cannot understand how that might happen.  I've loaded the same version from GitHub onto both an openLuup development machine and one of my VeraLite machines and they both work perfectly.

There is, I suppose, the remote possibility of a download error.  Can I ask that you re-install from the AltAppStore and try again?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #8 on: November 16, 2016, 12:18:06 pm »
First I installed the version located in the Vera App Store (same problem), then I have installed the version in Alternate App Store 8 times. Same problem, have tried to reboot.
Any other idea?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #9 on: November 16, 2016, 01:07:35 pm »
I have updated the version on the AltAppStore to the very latest (it's what I run.) it's v16.11.16.

Please try again from the AltAppStore.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #10 on: November 16, 2016, 01:37:20 pm »
Same problem...

Should I try a manual installation with WinSCP?
In this case, where do I find the latest files and where should i put them?

I used the files from github and put them all in cmh-ludl folder.
Tried again but still the same problem.
« Last Edit: November 16, 2016, 02:22:04 pm by paros »

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #11 on: November 16, 2016, 02:49:20 pm »
I noticed this in the log file: /etc/cmh/persist:

/etc/cmh/wan_failover:
-rw-r--r--    1 root     root            44 Jul 20  2015 check_internet.hosts
df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    8.9M      4.9M      4.0M  55% /
/dev/root                 9.8M      9.8M         0 100% /rom
tmpfs                   124.8M      6.7M    118.1M   5% /tmp
/dev/mtdblock6            8.9M      4.9M      4.0M  55% /overlay
overlayfs:/overlay        8.9M      4.9M      4.0M  55% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock10          50.0M     10.4M     39.6M  21% /storage
/dev/mtdblock10          50.0M     10.4M     39.6M  21% /etc/cmh-firmware
/dev/mtdblock10          50.0M     10.4M     39.6M  21% /etc/cmh-backup
/dev/mtdblock9            9.0M      9.0M         0 100% /mios

What does it mean /dev/root  and /dev/mtdblock9  has no available storage left?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #12 on: November 17, 2016, 12:04:41 pm »
OK, so we sorted all your problems...

- the 0 free memory is standard for Vera's ROM
- the other issue was some uncompressed files from an old (manual?) install

As you asked, here's a plot of the last day's memory (in kilobytes, so 40K = 40 Mbyte), cpu, and uptime for the last month (only latest week showing so far.)  You'll see that my Veras stay up for a good long time without reloads (in fact, in this case, it's just between power outages... we had one today.)

This is for 2x VeraLite with 64 Mbyte and 1x VeraEdge with 128 Mbyte.  I believe your Plus has 256 Mbyte.

20% CPU seems standard for me, but YMMV.

Good luck!
« Last Edit: November 17, 2016, 03:37:15 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #13 on: November 17, 2016, 01:55:58 pm »
Many thanks to akbooer for the fantastic support  :)
What plugin do you use for showing that diagram?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6157
  • Karma: +275/-69
  • "Less is more"
Re: EventWatcher[834] : Startup Lua Failed"
« Reply #14 on: November 17, 2016, 02:53:01 pm »
That's Grafana, running on a Raspberry Pi, plotting data from a DataYours (Graphite) database.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.