Influx v2.0 IotaWatt error when starting - resolved

Just set everything up. Influxdb v2 is running on a server along with my webserver and icecast server.

My error

My setup

fixed my setup after noticing others on the forum and get same error

The message says your server is returning 302 permanent redirect. That’s usually caused by the server requiring https. IoTaWatt posts using http. There are two solutions:

  1. Configure your server to accept http.

  2. Setup a HTTPS reverse proxy and add https:// to your URL.

The webserver and icecast servers are SSL not InfluxDB.

iota5

I added the port number after the IP and got a new error

i4

The URI /orgs/7915f0f003d8a01d cannot be used. The IP:port should be sufficient to access the server.

overeasy,

I posted that URL in the browser to show that 10.0.0.13:8086 is not https. I’m not using that in the iotawatt config.

If i use just the ip in iotawatt config I get the 302 error, if I use the ip:port I get the 400 error.

This will require some investigation to try to recreate. If you want to pursue other solutions, you might try setting up the uploader using the default for field-key and removing the ct tag. If that works, I’d have a lot more to go on. If it doesn’t, I know there are users with that exact configuration so it would indicate a problem with your influxDB instance.

My pcap…
Not sure if this helps but it looks like Influx can’t find the organization…so could be on that end for me.

FROM IOTAWATT

host:10.0.0.13:8086
content-type:application/vnd.flux
Authorization:Token J_nPpj3rvEu08UxcPsF7CMYDQZr8IfCtMhCaTKSIPw8oRD2mikdWZS6PhquQaoKN7x_9Oeh6RIGa1hLAFmC0XA==
Content-Length:318

from(bucket: "uwpltd")
  |> range(start: 1629377270, stop: 1629380870)
  |> filter(fn: (r) => r["device"] == "iotawatt" and (r["_measurement"] == "Total_Power"))
  |> last()
  |> map(fn: (r) => ({_measurement: r._measurement, _time: (uint(v:r._time)) / uint(v:1000000000)}))
  |> sort (columns: ["_time"], desc: true)



RESPONSE

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding
X-Platform-Error-Code: invalid
Date: Thu, 19 Aug 2021 13:47:52 GMT
Content-Length: 84

{"code":"invalid","message":"failed to decode request body: organization not found"}

Ok its fixed. InfluxDb was setup correctly. I restarted the iotawatt device and it connected with no error.

Thanks for help

1 Like