Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB API unavailable after X attempts... #23639

Closed
thoduh opened this issue Aug 17, 2022 · 13 comments
Closed

InfluxDB API unavailable after X attempts... #23639

thoduh opened this issue Aug 17, 2022 · 13 comments

Comments

@thoduh
Copy link

thoduh commented Aug 17, 2022

Suddenly InfluxDB 1.8.10 does not run anymore :-(

Everything I have found here so far has unfortunately not helped.
What can I do?

Bildschirm­foto 2022-08-18 um 17 37 25

@thoduh thoduh changed the title Please check your connection settings and ensure 'influxd' is running. InfluxDB API unavailable after 4 attempts... Aug 18, 2022
@thoduh thoduh changed the title InfluxDB API unavailable after 4 attempts... InfluxDB API unavailable after X attempts... Aug 18, 2022
@thoduh
Copy link
Author

thoduh commented Aug 19, 2022

After I have changed the influxd-systemd-start.sh to old Version 1.8.7, no "InfluxDB API unavailable after X attempts..." more.
But port 8086 still causes problems.
I don't understand it, shortly after starting Influxdb 8086 is there, then suddenly not anymore.
Can no one help me further?
Bildschirm­foto 2022-08-19 um 16 15 48
Bildschirm­foto 2022-08-19 um 16 25 00

@thoduh thoduh closed this as completed Aug 28, 2022
@tarundixitravi
Copy link

Hi same issue,

Did able to solve it ?

@thoduh
Copy link
Author

thoduh commented Sep 4, 2022

Upgrade to Version 2.4…

@nocturno66
Copy link

Hi, I am in the same situation.
Is the upgrade the solution?

Thanks

@thoduh
Copy link
Author

thoduh commented Oct 5, 2022

Yes, so it worked for me 😉

@nocturno66
Copy link

Ok, thanks. I will try

@ahpnils
Copy link

ahpnils commented Oct 7, 2022

I recently came across the same issue, following a simple reboot of an InfluxDB instance I manage. This is a fairly large instance I think, our influx data directory is about 150GB. It turned out our instance needed more than 24 minutes to start. With a workmate, we noticed that even with those "InfluxDB API unavailable after X attempts" lines, we could see database files still being loaded. We also saw that after a loooong time, either the service started, either systemd killed it.

We ended up overriding some systemd settings, especially a timeout value :

$ cat /etc/systemd/system/influxdb.service.d/override.conf
[Service]
TimeoutStartSec=45m

Our file contains more than that, but this is the only setting that matters in this case. And a previous colleague had set this up with 15 minutes. After this override file creation or update, don't forget to run systemctl daemon-reload as root or with sudo for changes to be applied.

Hope this helps !

@AnnaWojciechowska
Copy link

In some cases it can be avialble RAM. I had a machine with 2 GB and when I added data suddenly influx needed 2.5 and it would just fail to restart, got timeout errors, but actually adding memory helped - works now, but consumes 2.5 GB - I run old 1.8 influxd, hopefully newer versions are less memory greedy

@masterbzchief
Copy link

I am running influxdb and storing mqtt data from a node-red flow. I've tried commenting out the Type=forked, ran daemon-reload and it did not fix this issue. What did work, was going in /etc/systemd/system and ensuring that the node-red service start after influxdb (After=influxdb.service).

@averter
Copy link

averter commented Dec 11, 2023

I recently came across the same issue, following a simple reboot of an InfluxDB instance I manage. This is a fairly large instance I think, our influx data directory is about 150GB. It turned out our instance needed more than 24 minutes to start. With a workmate, we noticed that even with those "InfluxDB API unavailable after X attempts" lines, we could see database files still being loaded. We also saw that after a loooong time, either the service started, either systemd killed it.

We ended up overriding some systemd settings, especially a timeout value :

$ cat /etc/systemd/system/influxdb.service.d/override.conf
[Service]
TimeoutStartSec=45m

Our file contains more than that, but this is the only setting that matters in this case. And a previous colleague had set this up with 15 minutes. After this override file creation or update, don't forget to run systemctl daemon-reload as root or with sudo for changes to be applied.

Hope this helps !

Thank you very much for this helpful tip. For my RPI3 I had to add that line in a different file using sudo nano /etc/systemd/system/influxd.service and then sudo systemctl status influxdb after the sudo systemctl daemon-reload. Worked like a charm.

@melroy89
Copy link

For anybody, including my self. I enabled socket file in InfluxDB and this require that the service has access to /var/run/influxdb.

Every time I update influxdb, I need to add the following 2 lines again to the influxdb.service under Ubuntu server:

[Service]
....

RuntimeDirectory=influxdb
RuntimeDirectoryMode=0755

@SEGELBERT
Copy link

For anybody, including my self. I enabled socket file in InfluxDB and this require that the service has access to /var/run/influxdb.

Every time I update influxdb, I need to add the following 2 lines again to the influxdb.service under Ubuntu server:

[Service]
....

RuntimeDirectory=influxdb
RuntimeDirectoryMode=0755

Good hint, i did the following changes:

RuntimeDirectory=/var/lib/influxdb
RuntimeDirectoryMode=0755

@melroy89
Copy link

melroy89 commented Nov 29, 2024

For anybody, including my self. I enabled socket file in InfluxDB and this require that the service has access to /var/run/influxdb.
Every time I update influxdb, I need to add the following 2 lines again to the influxdb.service under Ubuntu server:

[Service]
....

RuntimeDirectory=influxdb
RuntimeDirectoryMode=0755

Good hint, i did the following changes:

RuntimeDirectory=/var/lib/influxdb
RuntimeDirectoryMode=0755

That is not how RuntimeDirectory should be used.

Also the reason I created this issue is. Just changing this service is not really persistent. After each influxdb update, the file is overwritten and often put back to their defaults. Causing my instance to fail to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants