Open dilshaat opened 3 years ago
Same issue. Following worked for me
sudo mkdir /home/influxdb
sudo chown -R influxdb:influxdb /home/influxdb
Alternatively modifying the useradd command in the installation instructions to following might also work:
sudo useradd -d /home/influxdb -rs /bin/false influxdb
Reference: v1.8 Troubleshooting section
I have the same issue, even when the directory has been created for the systemd user.
My logs are
Jul 23 15:28:12 compute4 systemd[1]: Starting InfluxDB V2 Server...
Jul 23 15:28:23 compute4 influxd[12937]: ts=2021-07-23T13:28:23.485873Z lvl=info msg="Welcome to InfluxDB" log_id=0VWtgYkG000 version=2.0.6 commit=4db98b4c9a build_date=2021-07-23T13:28:12Z
Jul 23 15:28:23 compute4 influxd[12937]: ts=2021-07-23T13:28:23.487839Z lvl=info msg="Resources opened" log_id=0VWtgYkG000 service=bolt path=/var/lib/influxdb/influxd.bolt
Jul 23 15:28:23 compute4 influxd[12937]: ts=2021-07-23T13:28:23.499460Z lvl=info msg="Using data dir" log_id=0VWtgYkG000 service=storage-engine service=store path=/data/influxdb2/engine/data
Jul 23 15:28:23 compute4 influxd[12937]: ts=2021-07-23T13:28:23.499536Z lvl=error msg="Failed to open engine" log_id=0VWtgYkG000 error="mkdir /data/influxdb2: permission denied"
Jul 23 15:28:23 compute4 influxd[12937]: Error: mkdir /data/influxdb2: permission denied
But /data/influxdb2
is owned by the right user.
[root@compute4:~]# ls -lh /data
total 8.0K
drwx------ 2 cassandra cassandra 4.0K Jul 22 2020 cassandra
drwxr-xr-x 3 influxdb influxdb 4.0K Jul 23 15:18 influxdb2
I am trying to install InfluxDB 2.0 and followed the instruction here in
Centos 7
. So, my service files is:/lib/systemd/system/influxdb.service
and its content:And
ls
ing the file:The Influxdb binaries are here:
Systemd service status is:
However, the service is not working and looking the
sudo journalctl | grep influxdb | less
, I found this:It is failing on creation of the folders as per the log above. I ran this:
sudo mkhomedir_helper influxdb
to create the home folder forinfluxdb
and the result of checking permission is this:I cannot figure out where I am missing to give enough permission for the user (created:
sudo useradd -rs /bin/false influxdb
) to run the binary as a service?UPDATE: Audit log added
Help? Thanks