HTTP enable Influxdb failed

Hi guys, I followed the tutorial of the influx documentation to enable HTTP (Enable HTTPS with InfluxDB | InfluxDB OSS 1.8 Documentation) I used a self signed certificate but in the end when I run this command:

influx -ssl -unsafeSsl -host <domain_name>.com

I get this error:

Failed to connect to https://<domain_name>.com:8086: Get https://<domain_name>.com:8086/ping: dial tcp: lookup <domain_name>.com on 172.16.0.1:53: no such host

Please check your connection settings and ensure 'influxd' is running.

(I changed <domain_name> to my domain). I can’t get what I did wrong, does someone has an advice? The influxdb is installed and running on a raspberry pi 3b+. Thanks in advance

You don’t want a domain name there, you need a host name.

For example, if your domain is example.com and your InfluxDB servre’s name is
data.example.com, you need to use https://data.example.com:8086 as the URL.

If that still gives you the same error, then you need to check DNS, not Influx,
because the error is telling you that your specified hostname cannot be
resolved by your DNS server at 172.16.0.1

Antony.

mmh I’m really new here and in IoT so I didn’t get what you mean. If my influxdb is running on my raspberry pi how do I find the host name?

Can you tell a little more about your setup?
I assume a home network?
I assume your router has the ip address 172.16.0.1 and assigns an ip address 172.16.0.??? with DHCP to your raspberry. By default, any Raspberry Pi that uses Raspbian, the official OS, has raspberrypi as its hostname. Unless you change it.

What is the ip address of your raspberry?
What does the router says about the hostname of your raspberry?
On which machine did you run your influx.... command?

Exactly, home network with ip address 172.16.0.???
I changed the host name to raspi-hyperink
I’m running influx command from my mac’s terminal through ssh

I’m not sure you’re on the right track.
What is your goal?

Have you registered a public domain?
What happens when you ping this domain?
Have you set up port forwarding in your router?

1 Like

No, I didn’t registered a public domain. I thought I could work locally using only the raspberry.
Are there other ways to query the database?
There’s a way to query the influx database from node-red without http request?

Yes of course you can.
But you don’t necessarily need https.
In any case, I would not start with it.
I would start with http first.
Is your InfluxDB configured and does it work with http?
If all this works, then continue with https - if it is necessary at all.

In Node-Red, as far as I know, you can also simply enter the IP address of your local InfluxDB instance, e.g. 172.16.0.???:8086
Of course replace ??? with the right ip address in your home network.

Well as I mentioned I followed this tutorial (Enable HTTPS with InfluxDB | InfluxDB OSS 1.8 Documentation) but I’m not sure it’s the right way and it doesn’t work

Yes, you can do it that way.
But you have to know what you are doing.
A typo somewhere and nothing works.
If you only work in your local home network I would leave out https for now.
First get a simple setup working and then increase the complexity.

Therefore the question again:
Is your InfluxDB configured and is it basically working?

1 Like

Ok got it! But where do I find the tutorial for http? I really don’t know how to enable http

You don’t have to enable http, it is already there. Just use it.