Influxdb fail to startup

Hi,

I have installed on my Raspberry PI 4 a instance of Influxdb.

I followed Installing on a Raspberry Pi and have checked /etc/systemd/system/influxdb.service

 #If you modify this, please also make sure to edit init.sh

[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://docs.influxdata.com/influxdb/
After=network-online.target

[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb
ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS}
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=influxd.service

So the start up looks fine, but it fails.

When I “influxd” manually vis the CLI it starts and runs fine.

Help will be appriciated

Hello @Johan_Scheepers,
I’m not sure, I’m asking around and I’ll get back to you. Thank you. In the meantime, can you use journalctl (specific for the service, journalctl -u influxd ) to see what errors, if any, are being output? Thank you.

If you are running influxd directly, it’s possible some files have been generated that are not accessible by the influxdb service run by systemd. I recommend taking a look at this troubleshooting page.

1 Like

– Logs begin at Mon 2020-10-26 11:15:48 SAST, end at Mon 2020-10-26 11:17:37 SAST. –
Oct 26 11:15:52 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:52 raspberrypi systemd[473]: influxdb.service: Failed to determine user credentials: No such process
Oct 26 11:15:52 raspberrypi systemd[473]: influxdb.service: Failed at step USER spawning /usr/bin/influxd: No such process
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=217/USER
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’.
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 1.
Oct 26 11:15:52 raspberrypi systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:52 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:52 raspberrypi systemd[504]: influxdb.service: Failed to determine user credentials: No such process
Oct 26 11:15:52 raspberrypi systemd[504]: influxdb.service: Failed at step USER spawning /usr/bin/influxd: No such process
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=217/USER
Oct 26 11:15:52 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 2.
Oct 26 11:15:53 raspberrypi systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[521]: influxdb.service: Failed to determine user credentials: No such process
Oct 26 11:15:53 raspberrypi systemd[521]: influxdb.service: Failed at step USER spawning /usr/bin/influxd: No such process
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=217/USER
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 3.
Oct 26 11:15:53 raspberrypi systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[528]: influxdb.service: Failed to determine user credentials: No such process
Oct 26 11:15:53 raspberrypi systemd[528]: influxdb.service: Failed at step USER spawning /usr/bin/influxd: No such process
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=217/USER
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 4.
Oct 26 11:15:53 raspberrypi systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Oct 26 11:15:53 raspberrypi systemd[545]: influxdb.service: Failed to determine user credentials: No such process
Oct 26 11:15:53 raspberrypi systemd[545]: influxdb.service: Failed at step USER spawning /usr/bin/influxd: No such process
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Main process exited, code=exited, status=217/USER
Oct 26 11:15:53 raspberrypi systemd[1]: influxdb.service: Failed with result ‘exit-code’.
Oct 26 11:15:54 raspberrypi systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 26 11:15:54 raspberrypi systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 5.

pi@raspberrypi:~ sudo chown -R influxdb:influxdb /var/lib/influxdb/* chown: invalid user: ‘influxdb:influxdb’ pi@raspberrypi:~

Looks like the influxdb user and group does not exist and will need to be created (this would normally be done automatically when installing the package).

How do you do it after the package were installed?

You’ll need to run this command and replace $DATA_DIR with the path of wherever you want to store the data (usually something like /var/lib/influxdb).

useradd --system -U -M influxdb -s /bin/false -d $DATA_DIR
2 Likes

Hi,

Thank, I have had this project shelved for a while now due to work commitments, this were the trick, working 100% now.

1 Like