Influxdb 1.8.7 will not start

I am also running 1.8.9-1 and influxdb is not able to start
even with default configuration it does not come up
pi@raspberrypidns:/etc/influxdb $ systemctl status influxdb.service
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: activating (start) since Sat 2021-08-07 10:56:20 CEST; 4s ago
Docs: InfluxDB OSS 2.0 Documentation
Cntrl PID: 17490 (influxd-systemd)
Tasks: 20 (limit: 1891)
CGroup: /system.slice/influxdb.service
├─17490 /bin/bash -e /usr/lib/influxdb/scripts/influxd-systemd-start.sh
├─17491 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
└─17540 sleep 1

Aug 07 10:56:20 raspberrypidns systemd[1]: Starting InfluxDB is an open-source, distributed, time series database…
Aug 07 10:56:20 raspberrypidns influxd-systemd-start.sh[17490]: Merging with configuration at: /etc/influxdb/influxdb.conf
Aug 07 10:56:20 raspberrypidns influxd-systemd-start.sh[17490]: Merging with configuration at: /etc/influxdb/influxdb.conf

– Subject: A start job for unit influxdb.service has failed
– Defined-By: systemd
– Support: Debian -- Support

– A start job for unit influxdb.service has finished with a failure.

I spoke too soon. Service failed this morning and I haven’t looked into it, but I web’d into grafana and see Bad Gateway errors, which means influx is down, again.

Seriously, I may need to migrate to Prometheus or something else

Same problem here. 1.8.9-1
sudo systemctl start influxdb
Job for influxdb.service failed because the control process exited with error code.
See “systemctl status influxdb.service” and “journalctl -xe” for details.

sudo service influxdb status
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; disabled; vendor preset: enabled)
Active: activating (start) since Sat 2021-08-07 14:40:29 CEST; 4s ago
Docs: InfluxDB OSS 2.0 Documentation
Cntrl PID: 27537 (influxd-systemd)
Tasks: 14 (limit: 4915)
CGroup: /system.slice/influxdb.service
├─27537 /bin/bash -e /usr/lib/influxdb/scripts/influxd-systemd-start.sh
├─27538 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
└─27585 sleep 1

Aug 07 14:40:29 raspberrypi4-iob influxd-systemd-start.sh[27537]: ts=2021-08-07T12:40:29.632481Z lvl=info msg="Ope
Aug 07 14:40:29 raspberrypi4-iob influxd-systemd-start.sh[27537]: ts=2021-08-07T12:40:29.634698Z lvl=info msg="Ope
Aug 07 14:40:29 raspberrypi4-iob influxd-systemd-start.sh[27537]: ts=2021-08-07T12:40:29.636942Z lvl=info msg="Ope

Since the apt repos provided only contain the lastest/bad version, it’d be nice to have at lease 4-5 versions. I was able to find the github release page and grab the version I needed v1.8.6 to get back in business.

Hope this helps.

3 Likes

Thanks for this info. I am not an expert. How do I go to downgrade to version 1.8.6 ?
Thanks

I had the same issue just yesterday. It seems they changed something in the startup script in version v1.8.9, the same one we had to +x on version 1.8.7.
Turns out my DB is too big and it takes longer to start than the 10 seconds influxdb expects to take and so the start script aborts the process
Workaround:
Open /usr/lib/influxdb/scripts/influxd-systemd-start.sh
either comment out line 34 (exit 1) – < this is a bad idea in the long run but will allow you to test if it works
or set the sleep command in line 29 to 10 seconds (depending on how long does it take your influx to start, for me 10 cycles (line 25) of 10 seconds was enough)

Cheers!

7 Likes

Bloody hell, @N_C

commenting out “exit 1” made the trick.
Thank you! I had headaches for 2 days

2 Likes

You are a star!
Thank you. This solved the issue for now.

1 Like

Same issue, however when starting from the command line it did a lot more work than normal.
That said, revering to last nights backup, disabling update fron influx until this is sorted.
Two Mondays in a row where what has been one of the most stable products I have ever used, now not fit for purpose.
Please try testing before releasing.

10 seconds - great - that was the solution that helped me !!! :+1:

1 Like

Thanks, downgrading to 1.8.6 helped. Nothing else did. Even version 1.8.9 was not starting.

1 Like

Perfect, thanks for the solution. It solved my issue

I’m new and from the south of France.
I have downgrade my paquet rasbian by command beware
sudo apt install influxdb=1.6.4-1+deb10u1

Influxdb version 1.8.9 on Debian 10 here!
Perfect solution to change line 29. Set the sleep time to 10 seconds. It kept me busy for a week now. This was since my upgrade from 1.8.6.

Thanks

1 Like

Hope this wil resolved in a future version. Not nice to search the internet for a solution this new and hard to find.

Thank you. Your answer should be bumped up on search engines.
I set the sleep command to 10 seconds and the issue is gone.
Before finding your suggestion, I was puzzled that influxdb could be started manually but not with the script.

1 Like

This not the solution, what happens if the influxdb startup activity take 11 seconds.
The script should check that the service is up.

man systemd

As a raspberry pi user I have had the same issues. What worries me is the potential for self inflicted corruptions when investigating and trying to resolve these random and seemingly inexplicable problems. It makes one unwilling to update a working system too. I have I think resolved things now with the fixes above, but I remain nervous.
Paul

Just done an install on a brand new Debian11 (Bullseye) and got the same old issue of non starting
Tried all the hints here, not starting

Ran the
chmod +x /usr/lib/influxdb/scripts/influxd-systemd-start.sh
script and got this
/usr/lib/influxdb/scripts/influxd-systemd-start.sh: line 30: curl: command not found

curl is not installed on a base debian.

I am sure someone is going to say RTFM, its on page x, line y :slight_smile:

apt install curl
fixed it.

doing
chmod -x /usr/lib/influxdb/scripts/influxd-systemd-start.sh
chmod o+x /usr/lib/influxdb/scripts/influxd-systemd-start.sh

and it still worked, even over a reboot.

The proper way is to add dependencies to your package and install them prior to your own software.

Hi, the reason is not the sleep 1, its just fixes it. The real reason is, that the while loop is checking the first result over and over again, as the result variable is not updated after the first try (as it is out of the loop and only run once).

So to fix it, the curl command needs to be re-executed, otherwise the script will check the first result over and over again, until max attempts is reached, even if the webservice is already reachable.

On Github is a new Version of the Script, which maybe fixes that, but be aware that this one does things differently so you should only grep the parts you need. influxdb/influxd-systemd-start.sh at 8e5a0705a3c14c69ab681268c4d7aecd98204434 · influxdata/influxdb · GitHub