Influxdb interface down

Hey Bob,

IotAWatt has been working great for almost a year now but just discovered it hasn’t been updating InfluxDb for the last week. I can see via the UI that the interface is “Running” but that the Current & History Log are not up to date. I’ve tried reset/power cycle but no improvement.

Also, the Log suggests that there was a Watchdog Reset about that time and since then the Influxdb interface hasn’t been starting up.

iotawatt.txt (9.7 KB)

Appreciate any pointers to get things back up and running and hoping that the last week of data is still salvageable.

Thanks, Pete

Hi Pete,

Bad news, things are pretty scrambled up. I don’t have enough log to run it back to a probable cause. Your influx feed appears to have stopped on 7/28/2018. Can you check your influx database and verify? That’s more than a month ago, so something was up then. It appears the influx config was edited on 8/25, but did not result in any change in the upload status.

You upgraded to 02_03_13 on August 23, but I can’t see where you came from. It appears you are MINOR auto update, so that would have been 02_03_10. That auto update would have been sometime after 7/2918, so close to the time influx stopped, but later.

There are repeated entries for EmonService: Invalid Configuration. I’d like to see the configuration file. You can PM it to me as it will contain your Emoncms write-key.

As it looks right now, your system isn’t logging. I don’t have enough information to be certain, but I suspect that the file is damaged. There also appears to be damage to the message-log. There are scrambled messages back around 9/4, and probably the subsequent record is not complete. These kinds of problems are usually caused by removal or insertion of the SDcard while the IoTaWatt has power. There are other causes as well, but physical removal is the most common.

Lets not dwell on how it happened. Looking forward, there are two approaches:

  • Try to identify the file(s) damaged and delete them.
  • Reformat the card and start fresh.

The nuclear option isn’t quite as bad as it sounds. I’d have you try to recover your history file and that should be everything through 9/1. Can’t be used to upload, but would service local graphs at 1 minute resolution, which is finer than any standard requests.

It’s probably worth giving the first option a try. The way to delete the current log is with the command:


If the system comes back up with the current and history logs marching on, I can take a look at the config file and see what might be the problem with influx and Emoncms.

If it doesn’t respond to that, I’ll talk you through a reformat.

Thanks for the response and suggestions. Yep, not looking good.

The influx data is solid till 30 August then drops out only to come back for a couple of hours on the 1st September. Only thing I’ve done recently was to recreate the influx database and have it re-populated by the iotawatt. The physical unit hasn’t been touched for months but who knows …

Clicking on the File Manager option (http://iotawatt/edit.htm) resulted in a blank browser screen. Clicking on Graph option (http://iotawatt/graph.htm) brought up the data viewer but no data in the display.

I removed the current log using the html command above but now the device is in a reboot loop.

iotawatt2.txt (9.8 KB)

Unless there is another way into the SD card so I can salvage the config then I guess the nuclear option is the way forward so let me know the process.

Cheers, Pete

Sorry this isn’t working. If I had the device here with the SDcard I might be able to make some sense out of this problem, but that’s not realistic. What you say about currency in your influx data base vs. what IoTaWatt was getting in it’s startup query do not agree. That leads me to believe there is something going on with the configuration. So here’s how to proceed:

You will need a computer, preferably a windows machine, that has the capability to mount the SDcard.

Power down the IoTaWatt.
Open it up and remove the SDcard.
Mount the SDcard on the computer.
Copy the file /iotawatt/histlog.log to your computer. (1 year is about 136mb)
Reformat the SDcard as FAT32.
Restore the file /iotawatt/histlog.log from your computer.
Download and copy these files to the root directory:
config.txt (600 Bytes)
graph.htm (15.1 KB)
edit.htm (24.5 KB)
cnfstyle.css (5.8 KB)
tables.txt (2.1 KB)
graph.js (36.2 KB)
index.htm (93.5 KB)
Replace the SDcard into the IoTaWatt.
Power up the IoTaWatt.

You will need to recreate your configuration. Your history should be available. When you get it running again, before you configure influx or Emoncms, could you post the status screen with the data logs tab expanded and the message log so I can see that everything is OK.


1 Like

Thanks Bob for the detailed instructions.

Have recreated the SD card and things seem to be moving forward and building up the various logs which is promising.

I managed to salvage the old history.log and config.txt and copied those across to a newly formatted/created SD card. I have attached both config.txt and the log. Looks like there is still something wrong with my config as there is a warning about emoncms settings. I have never used emoncms so may be some legacy thing.

config.txt (5.1 KB)
iotawatt3.txt (1.7 KB)

Let me know if you think there is anything more to do otherwise I’ll let the various logs catch-up and see if new data gets posted to influx.

Thanks again, Pete

Yea Pete,
Glad that worked out. The history file should advance to a more recent date, although there will still be a hole.

You’re right about the legacy issue with Emoncms. As one of the original influx users before the major changes, your config still has the older specifications in addition to the active ones. It’s probably harmless, but I have edited out the bad entry if you want to attempt to update it. You have to be careful. The safest way would be to power down, remove the SDcard and replace the config on an external machine, then restart.

If you are game, you can use the file manager to browse to the repaired config (after you download it), then hit upload on the file manager. The config will replace the old one, but this is the dangerous period. When you return to the config app, it will still have the old version loaded, so you need to refresh the app in your browser to force it to load the new config. Then do a restart.

Your choice.

config.txt (4.0 KB)

Thanks for the help. Just uploaded the new config.txt and done a restart. No more config warnings. Many thanks, Pete