# PI zero 1 - failed to connect to localhost, influx 1.8.10

**URL:** <https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885>\
**Category:** InfluxDB 1\
**Tags:** influxdb\
**Created:** [December 27, 2022, 9:06am UTC](https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885 "2022-12-27T09:06:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franck\_Franc](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franck_franc/32/9577_2.png) [@franck\_Franc](https://community.influxdata.com/u/franck_Franc)\
**Post date:** [December 27, 2022, 9:06am UTC](https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885/1 "2022-12-27T09:06:42Z")

</div>

Hi everyone and merry Christmas !

So i had a problem almost a year ago, [related in this post](https://community.influxdata.com/t/influx-1-8-10-pi-zero-v1-a-timeout-was-exceeded/24037).

Basically after a reboot influxdb fail to connect to localhost:

> dietpi@DietPi:~$ influx  
> Failed to connect to [http://localhost:8086](http://localhost:8086): Get [http://localhost:8086/ping:](http://localhost:8086/ping:) dial tcp [::1]:8086: connect: connection refused  
> Please check your connection settings and ensure ‘influxd’ is running.

Influxd is speaking about the 88 port:

> 2022-12-27T08:50:35.642386Z info InfluxDB starting {“log\_id”: “0f0hGTGW000”, “version”: “1.8.10”, “branch”: “1.8”, “commit”: “688e697c51fd”}  
> 2022-12-27T08:50:35.642828Z info Go runtime {“log\_id”: “0f0hGTGW000”, “version”: “go1.13.8”, “maxprocs”: 1}  
> run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use

I see in htop after the boot that influx keep trying to initiate https but it set to false in my conf file.

doing the trick :

> sudo chmod +x /usr/lib/influxdb/scripts/influxd-systemd-start.sh

Serve no purpose. The database will work after 1/4 hour and I don’t know why it doesn’t work right after reboot. Someone have an idea ? The database’s weight is 377ko so I doubt its the probleme during initialisation with cron.

Merry christmas and new year from france !!

---

<div class="post-metadata">

**Author:** ![ufudervo](https://avatars.discourse-cdn.com/v4/letter/u/a587f6/32.png) [@ufudervo](https://community.influxdata.com/u/ufudervo)\
**Post date:** [December 28, 2022, 4:00pm UTC](https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885/2 "2022-12-28T16:00:56Z")

</div>

Hello,  
I’m not shure if I got your problem, I also have a Pi Zero W with InfluxDB and Grafana. When InfluxDB is starting, it reads many files in the database before providing service to Grafana or to the command influx in a shell. It may take many minutes before beeing ready. I can do a stop/start or both together with restart of the DB and then check my syslog with:

```auto
sudo systemctl restart influxdb
tail -f /var/log/syslog

```

There I see many lines from influxd-systemd-start.sh with …msg=“Opened shard”…, …msg=“Opened file”…, …InfluxDB API unavailable after 16 attempts… and finally **InfluxDB started**  
You can also check afterwards the syslog, when InfluxDB is finally running.  
Be patient! If there are many databases, influx has to read files of all of them, and there is a large \_internal database, if you didn’t disable this self monitoring, see [InfluxDB and Raspberry Pi Zero W](https://community.influxdata.com/t/influxdb-and-raspberry-pi-zero-w/27883)

Happy new year!

---

<div class="post-metadata">

**Author:** ![franck\_Franc](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franck_franc/32/9577_2.png) [@franck\_Franc](https://community.influxdata.com/u/franck_Franc)\
**Post date:** [December 28, 2022, 8:43pm UTC](https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885/3 "2022-12-28T20:43:54Z")

</div>

Thanks ! I’ll check that ! The pi is almost always working so I dont have this problem very often. But it’s true that I don’t really need the internal db but I thought it was used by influx itself

You can check what internal db is for by checking [this grafana dashboard](https://grafana.com/grafana/dashboards/421-influxdb-internals/) btw !

---

<div class="post-metadata">

**Author:** ![franck\_Franc](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franck_franc/32/9577_2.png) [@franck\_Franc](https://community.influxdata.com/u/franck_Franc)\
**Post date:** [December 29, 2022, 11:41am UTC](https://community.influxdata.com/t/pi-zero-1-failed-to-connect-to-localhost-influx-1-8-10/27885/4 "2022-12-29T11:41:02Z")

</div>

You were right internal\_db [can be disabled without a problem](https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/measurements-internal/) !

Thanks for the tip. I just tested it and it’s weird how quicker the database is ready when i stop and start the service. My database is larger than the internal one.
