Unable to connect to influxDB

I’m unable to connect to the influxDB cloud using web server setup. Below is the message log and webserver setup page screenshot.

2/18/19 00:18:37 influxDB: Restart. Last post 02/16/19 00:00:00
2/18/19 00:18:37 influxDB: started, url:8086=mcfly-d7d6174e.influxcloud.net, db=myDB, interval=10
2/18/19 00:18:37 influxDB: Start posting at 02/16/19 00:00:10
2/18/19 00:20:17 influxDB: Post Failed: 400

Influxclod must have provided some documentation for how connect to their service. If this problem persists, I’ll need that.

But first the basics. Influx HTTP service defaults to port 8086. You have specified port 80 which is typically a HTTP web server. If you simply remove the :80 from your URL, IoTaWatt will use the default port 8086.

So the HTTP code 400 that you are getting is probably from a web server and not influx.

I’m also curious if influxcloud gave you a username and password to access your instance of influx. If so, you will need to add that to the IoTaWatt configuration.

@overeasy the url is cut off in the screenshot but it is in fact
https://mcfly-d7d6174e.influxcloud.net:8086

i have a separate username and password for influx cloud account, influx DB connection, and kapacitor connection. Which one should i enter in the IotaWatt config page?

here is the documentation i was referred to
https://help.influxcloud.net/getting_started/

I would try them in this order:

influxDB connection
influx cloud account
kapacitor connection

@overeasy i’ve been trying to enter different combinations of http server url/username/password/database name, but doesn’t seem to work




I suspect the problem is that HTTPS is enabled in the influxcloud instance. You can check with them to see if that can be turned off. Otherwise, I don’t see what the problem could be.

If you PM your password to me, I can try it from here and look at the actual HTTP 400 error message being returned. Otherwise, I will make a note to add that to the message log in these cases in a future release.

UPDATE: I have put in code to try to interpret and display the influx error codes. It is a challenge because there is no definitive list in their documentation.

I also hand crafted a query to your database. It doesn’t matter that I don’t have the password, didn’t get that far:

So it appears that the current problem is that the database has HTTPS enabled and requires it. IoTaWatt is not able to do that protocol. It’s unfortunate that the choices are HTTPS or basic authorization for plain-text. Digest authorization, while not an encryption protocol, would go a long way toward improving authentication. It probably wouldn’t stand up to a decent hacker, but would seriously hamper mischief makers.

thanks @overeasy,

  1. so IotaWatt uses HTTP digest authorization?
  2. can IotaWatt do basic authorization?
  3. Does this mean that IotaWatt can only work with the open source version of influxdb which can accept http? Not influx cloud?

It uses it on the server side, but could be supported in the client side.

Yes.

It means IoTaWatt will work with influx when it is configured to use HTTP and cannot when configured to require HTTPS. You would need to ask the influx cloud folks if they can or will configure it to use HTTP.