user10453830
user10453830

Reputation: 51

Failed to connect to http://localhost:8086, Please check your connection settings and ensure 'influxd' is running

Searched online but I don't see the solution. I have influx installed: InfluxDB shell version: v1.6.2. But it throws me this error:

Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp [::1]:8086: connect: connection refused Please check your connection settings and ensure 'influxd' is running.

Upvotes: 5

Views: 26993

Answers (6)

Yassine Zakhama
Yassine Zakhama

Reputation: 56

Try checking the size of your InfluxDB data folder influxdb-data. If it's too large, InfluxDB may hang or malfunction when handling a large amount of data.

If the size of the InfluxDB data folder gets bigger, it might lead to a decrease in performance. This may lead to the InfluxDB software to stop operating normally, or to slower queries and data being stacked in it.

Upvotes: 0

if : bind-address = "10.0.0.32:8086"

use $> influx -host 10.0.0.32 Connected to http://10.2.3.102:8086 version 1.8.10 InfluxDB shell version: 1.8.10

Upvotes: 0

Ammad
Ammad

Reputation: 4235

First check and see if the influxdb instance is running or not. If it is already running you might need to kill the process by issuing command,

ps -ef |grep influxdb

influxdb  5781     1 99 18:15 pts/0    00:00:22 /usr/bin/influxd -pidfile /var/run/influxdb/influxd.pid -config /etc/influxdb/influxdb.conf

pkill -f influxdb
 

Once the process is killed, there are chances that port is still in used, which can be verified by issuing command shown below.

sudo netstat -tulpn | grep LISTEN |grep influx

root@db1:/usr/bin# sudo netstat -tulpn | grep LISTEN |grep influx
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      28558/influxd   
tcp6       0      0 :::8086                 :::*                    LISTEN      28558/influxd   
root@db1:/usr/bin# 

In the above example, kill the process 28558 by issuing command pkill -9 28558

Once the port is released, cd to /etc/init.d directory and run the below mention service.

root@jvision-db1:/etc/init.d# influx

DB instance should come back and can be verified by the ps -ef |grep influxdb command.

Also, cd to /usr/bin directory and issue below mention command to verify InfluxDB is also available.

root@db1:~# cd /usr/bin
root@db1:/usr/bin# ./influx
Connected to http://localhost:8086 version 1.7.9
InfluxDB shell version: 1.7.9
>

Upvotes: 1

drone4ya z
drone4ya z

Reputation: 1

I was facing the same challenge when I upgraded influxdb to 1.8.9, so I had to downgrade back to 1.8.5.

https://vibhubithar.medium.com/workaround-latest-version-of-influxdb-not-starting-on-raspberry-pi-buster-a8b5afa84fce

sudo apt update 
sudo apt upgrade -y  
wget https://s3.amazonaws.com/dl.influxdata.com/influxdb/releases/influxdb_1.8.5_armhf.deb
sudo systemctl unmask influxdb.service 
sudo systemctl start influxdb
sudo systemctl enable influxdb.service

Upvotes: 0

Genki
Genki

Reputation: 3195

In my case on a Mac, I had to run influxd -config /usr/local/etc/influxdb.conf first before running influx.

Upvotes: 0

Katy Farmer
Katy Farmer

Reputation: 171

Just a couple things to check: make sure the the service is running (use the service manager on your OS or the influxd command to check). Another test you can do is to use the actual machine IP address http://:8086 instead of localhost. It could be access is restricted (iptables).

If none of that works, I would check out the discussion on this GitHub issue.

Upvotes: 4

Related Questions