influxdb: 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.
Steps to reproduce: List the minimal actions needed to reproduce the behavior.
- sudo systemctl start influxdb
- sudo systemctl status influxdb ● influxdb.service - InfluxDB is an open-source, distributed, time series database Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-10-05 15:31:29 EDT; 6s ago Docs: https://docs.influxdata.com/influxdb/ Main PID: 5408 (influxd) Tasks: 10 (limit: 2077) Memory: 7.7M CGroup: /system.slice/influxdb.service └─5408 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
- influx 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.
Expected behavior: I expected influx to be up and running on 8086
Actual behavior:
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.
Environment info:
- System info: Linux 4.19.66-v7+ armv7l (raspberrypi 3b+)
- InfluxDB version: InfluxDB v1.7.8 (git: 1.7 ff383cdc0420217e3460dabe17db54f8557d95b6)
- Other relevant environment details: Container runtime, disk info, etc
Config: Copy any non-default config values here or attach the full config as a gist or file.
Logs: Oct 05 15:06:56 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=1/FAILURE Oct 05 15:06:56 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’. Oct 05 15:06:57 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart. Oct 05 15:06:57 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 30. Oct 05 15:06:57 raspberrypi systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database. Oct 05 15:06:57 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database. Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.443188Z lvl=info msg=“InfluxDB starting” log_id=0IJKwL_l000 version=1.7.8 branch=1.7 commit=ff383cdc0420217e3460dabe17db54f8557d95b6 Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.443418Z lvl=info msg=“Go runtime” log_id=0IJKwL_l000 version=go1.11 maxprocs=4 Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.558931Z lvl=info msg=“Using data dir” log_id=0IJKwL_l000 service=store path=/var/lib/influxdb/data Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559116Z lvl=info msg=“Compaction settings” log_id=0IJKwL_l000 service=store max_concurrent_compactions=2 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648 Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559194Z lvl=info msg=“Open store (start)” log_id=0IJKwL_l000 service=store trace_id=0IJKwM1l000 op_name=tsdb_open op_event=start Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559403Z lvl=info msg=“Open store (end)” log_id=0IJKwL_l000 service=store trace_id=0IJKwM1l000 op_name=tsdb_open op_event=end op_elapsed=0.223ms Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559803Z lvl=info msg=“Opened service” log_id=0IJKwL_l000 service=subscriber Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559844Z lvl=info msg=“Starting monitor service” log_id=0IJKwL_l000 service=monitor Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559881Z lvl=info msg=“Registered diagnostics client” log_id=0IJKwL_l000 service=monitor name=build Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559912Z lvl=info msg=“Registered diagnostics client” log_id=0IJKwL_l000 service=monitor name=runtime Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559957Z lvl=info msg=“Registered diagnostics client” log_id=0IJKwL_l000 service=monitor name=network Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.559986Z lvl=info msg=“Registered diagnostics client” log_id=0IJKwL_l000 service=monitor name=system Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560068Z lvl=info msg=“Starting precreation service” log_id=0IJKwL_l000 service=shard-precreation check_interval=10m advance_period=30m Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560105Z lvl=info msg=“Starting snapshot service” log_id=0IJKwL_l000 service=snapshot Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560141Z lvl=info msg=“Starting continuous query service” log_id=0IJKwL_l000 service=continuous_querier Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560189Z lvl=info msg=“Starting HTTP service” log_id=0IJKwL_l000 service=httpd authentication=false Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560219Z lvl=info msg=“opened HTTP access log” log_id=0IJKwL_l000 service=httpd path=stderr Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560671Z lvl=info msg=“Listening on HTTP” log_id=0IJKwL_l000 service=httpd addr=[::]:8086 https=false Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560754Z lvl=info msg=“Starting retention policy enforcement service” log_id=0IJKwL_l000 service=retention check_interval=30m Oct 05 15:07:03 raspberrypi influxd[2239]: ts=2019-10-05T19:07:03.560797Z lvl=info msg=“Starting collectd service” log_id=0IJKwL_l000 service=collectd Oct 05 15:07:03 raspberrypi influxd[2239]: run: open server: open service: Stat(): stat /usr/share/collectd: no such file or directory Performance: Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.
# Commands should be run when the bug is actively.
# Note: This command will run for at least 30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=true"
curl -o vars.txt "http://localhost:8086/debug/vars"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz`, `vars.txt`, and `iostat.txt` output files.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=true"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8086: Connection refused
curl -o vars.txt "http://localhost:8086/debug/vars"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8086: Connection refused
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
I’ve had this issue after a crash after which the WAL files appeared to be corrupt. Stopping influx, removing the /var/lib/influxdb/wal directory and restarting influx fixed it for me.
The following helped me:
chmod +x /usr/lib/influxdb/scripts/influxd-systemd-start.shand after that, restart influxd.
I’ve had this problem on and off for sometime, and I fix it (temporarily) by erasing my influxdb.conf file and reinstalling influxd. My data is also retained. This isn’t a complete fix because you will probably run into the problem later but I hope it helps someone.
If anyone else runs into this issue, I was able to resolve it by creating the following directory:
/usr/share/collectd