[英]InfluxDB 2.0 getting stopped after putting the service in systemd
I have installed Influxdb 2.0 and it was working fine until I put influxd service in systemd.我已经安装了 Influxdb 2.0,它运行良好,直到我将 influxd 服务放入 systemd。 Below is the content of influxdb.service
下面是 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
The problem lies in the user with which influxdb is getting started.问题在于启动 influxdb 的用户。 I was using a dedicated user "influxdb" to start the service.
我使用专用用户“influxdb”来启动服务。 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.使用
journalctl -u influxdb
和influxd -h
,我发现 influxdb 在运行服务的用户的主目录中创建了一个 boltdb。 Since /home/influxdb doesn't exists I was getting the error.由于 /home/influxdb 不存在,我收到了错误消息。
Solution options:解决方案选项:
mkhomedir_helper influxdb
mkhomedir_helper influxdb
为“influxdb”用户创建主页--bolt-path
option--bolt-path
选项提及 boltDB 的显式位置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.