InfluxDb issues


#61

That’s a little disingenuous. The logs show that for much of that time, they were unable to connect to WiFi. That they were later able to connect indicates to me that something else was going on during that period, not that the IoTaWatt just decided to stop posting to influx for no apparent reason.

I don’t like like to guess. If you want me to look at the failure on IoTa2, you will have to provide the log for IoTa2.

In general, these problems that you have been having with influx turn out to be problems with the WiFi or the influx system. In the case of IoTa1 here, when the WiFi is apparently restored on 3/13 10:19 after about a 24 hour outage, influxDB is not responding accurately to the last post query. It looks like something may have changed with influx, but I have such little information that I can only speculate.

There are a lot of components in your system. The IoTaWatt are just one. There is also the WiFi and the influx system. When both IoTaWatt stop posting at the same time, that suggests very strongly to me that the problem is in one of the other components. I have a few IoTaWatt here that post to a local influx on a RPi. They work flawlessly day-in and day-out for the past year. There are no other outstanding problem reports with influx.

This is like the old story where a guy is looking for something under a streetlight at night. A passerby asks what he is looking for and where he dropped it. The guy responds that he dropped it across the street. When asked why then is he looking for it here, he answers “because the light is better here”. I think you are looking in the wrong place for this problem.


#62

Thank you for the soon answer.

Excuse me, that was not my intention. I have to be more descriptive.

In order to improve the access point WiFi connection, yesterday we changed the ethernet cable and the port where it is connected to the router. This action must improve the Wifi service.
On the InfluxDB side, I talked with the software guy and he tried to get a log, but he only can get a Linux log. This log has a lot of information just for 2 days (March 14th and 15th) the size is 48.4MegaB.

Two more questions:

  • What means “influxDB: Post Failed: 400” and “influxDB: Post Failed: -11”?

Regards


#63

-4 means unable to connect
-11 means request timed out
These are HTTP communications errors.

400 is a failure code returned by [presumably] influx. Influx documentation only says:

4xx: InfluxDB could not understand the request.

There is a section on logging in the influx documentation.

It talks about how to cause logs to be made and where they will reside on various Linux systems (systemd vs sysvinit). I’m not a Linux or influx expert, so you should seek out help on that with others.

When IoTaWatt logs a 400 error, it first tries to json parse the rest of the response and if successful will append the value of a json object named “error” if found. Apparently that didn’t happen here. To my knowledge there is no exhaustive (or even abbreviated) list of errors and responses possible from influx, so unless I want to just dump whatever it throws at me, its hard to be descriptive beyond the basic code.

The logging documentation talks about being able to create a separate HTTP log, which might be helpful when errors occur.

If you did not change the influx configuration in IoTaWatt, the only thing I can see causing this might be some bogus data (NaN). But the initial last post query failed and it appears to be trying to upload data from July. You should be able to set the “upload history from” date in the configuration to a recent date to avoid that if the last entry query fails.