Reputation: 75
I have installed Influxdb 2.0 and it was working fine until I put influxd service in systemd. Below is the content of influxdb.service
[Unit]
Description=InfluxDB 2.0 service file.
Documentation=https://v2.docs.influxdata.com/v2.0/get-started/
After=network-online.target
[Service]
User=influxdb
Group=influxdb
ExecStart=/usr/local/bin/influxd
Restart=on-failure
[Install]
WantedBy=multi-user.target
Upvotes: 1
Views: 1111
Reputation: 75
The problem lies in the user with which influxdb is getting started. I was using a dedicated user "influxdb" to start the service. The user was created using below command :
# useradd -rs /bin/false influxdb
Using journalctl -u influxdb
and influxd -h
, I found that influxdb creates a boltdb inside home directory of the user from which service has been ran. Since /home/influxdb doesn't exists I was getting the error.
Solution options:
mkhomedir_helper influxdb
--bolt-path
optionUpvotes: 1