Flukso rebooting every 15 minutes on the dot

My Flusko has been working flawlessly for years. Nothing has changed with its configuration, including the network hardware. However, on August 8th the device stopped displaying on the Flukso website. I thought there was a problem with the config. I took a look at it, rebooted it, checked the wires are good, etc. I even disabled the WiFi firewall so that I didn't have to go in and check on it.

I noticed that after all of this tinkering it still wasn't working so I SSH'd in and ran the following on the command-line:

while true; do uptime; sleep 5; done

Every time it hits the end of 14 minutes (19 sleeps on 14 minutes) the device reboots. Does anyone have any idea as to what the cause may be?

For some reason, the device does't start responding to ICMP, or allow SSH, until after it has been up and running for 4 minutes. Does it take this long for the WiFi interface to come on-line? This is one of the original Fluksos made available for US installation.

*EDIT* Here are some specs from the config page:

Chipset: Atheros AR2317
Processor: MIPS 4KEc V6.4

icarus75's picture

This will most likely be due to the 15min cron entry:

  1. root@flukso:~$ crontab -l
  2. 10 * * * * /usr/share/lua/flukso/heartbeat.lua 0
  3. */15 * * * * [ -z "$(ps | grep 'flukso.lu[a]')" ] && reboot

It's a sanity check of the flukso.lua daemon process. So if flukso.lua terminated due to some unexpected error condition, the cron job will trigger a reset.

Can you stop the daemon and check what's being received on the UART:

  1. root@flukso:~$ /etc/init.d/flukso stop
  2. root@flukso:~$ cat /dev/ttyS0

You should also get a Lua error by running flukso.lua from the console now:

  1. root@flukso:~$ lua /usr/share/lua/flukso/flukso.lua

ejittles's picture

# crontab -l
crontab: can't open 'root': No such file or directory

The crontab directory is empty:

/etc/crontabs# ls

Sample of the output from the UART:

pls ec8799b983cbe92ea243ea0aac57e04c:0022466525
pwr ec8799b983cbe92ea243ea0aac57e04c:0000004041
pwr 3d2b9b5ab5e46a30300f112e4631ee1c:0000000000
pls ec8799b983cbe92ea243ea0aac57e04c:0022466526
pwr ec8799b983cbe92ea243ea0aac57e04c:0000004035
pwr 3d2b9b5ab5e46a30300f112e4631ee1c:0000000000
pls ec8799b983cbe92ea243ea0aac57e04c:0022466527
pwr ec8799b983cbe92ea243ea0aac57e04c:0000004032
pwr 3d2b9b5ab5e46a30300f112e4631ee1c:0000000000

Running the lua script showed absolutely no output:

# lua /usr/share/lua/flukso/flukso.lua

Then (after 5+ minutes) it suddenly output:
[ec8799b983cbe92ea243ea0aac57e04c] = (table)
[1344991251] = (number) 22467123
[1344990950] = (number) 22466545
[1344990959] = (number) 22466555
[1344990960] = (number) 22466556
[1344991019] = (number) 22466622
[1344991020] = (number) 22466623
[1344991079] = (number) 22466690
[1344991080] = (number) 22466691
[1344991139] = (number) 22466840
[1344991140] = (number) 22466843
[1344991199] = (number) 22466993
[1344991200] = (number) 22466995

After 7 more minutes:


2 minutes:

[ec8799b983cbe92ea243ea0aac57e04c] = (table)
[1344991853] = (number) 22467841
[1344991798] = (number) 22467822
[1344991800] = (number) 22467823
[1344991553] = (number) 22467585
[1344991559] = (number) 22467592
[1344991560] = (number) 22467593
[1344991619] = (number) 22467660
[1344991620] = (number) 22467661
[1344991679] = (number) 22467728
[1344991680] = (number) 22467729
[1344991739] = (number) 22467798
[1344991740] = (number) 22467799

After 21 minutes it continues to run, and the Flukso website is starting to update. So this makes me wonder, did something happen and I experienced some corruption? There was a bad thunder storm on the 8th. The device is surge protected. I will try and run it through the init script and see if it continues to run without me being attached.

icarus75's picture

1/ The crontab gets cleared when stopping the daemon.
2/ The output from the sensor board (UART) looks good.
3/ The daemon stdout is as expected. Readings are buffered for approx 5mins and then sent in bulk to flukso.net.

All seems to be working just fine.

ejittles's picture

Yes, I see that it is working normally. Thanks for helping me get it back online.

I am somewhat concerned about what will happen the next time the device needs to reboot. When I have some free time to play around with it again, I will reboot it and see if it gets stuck in a boot loop again. If it does, I'll be back here begging for more help.

Thanks again.

ejittles's picture

Another lightning storm rebooted the Flukso and it is running like a champ. I'm not sure what the deal was, but it is back to normal.