Start influxdb service in centos 7

Hi everyone, I just installed influxdb 1.2.2 on centos 7. the server can lauch influxdb with command influxd but I couldn’t start service influxdb.service .This is the status result:

Redirecting to /bin/systemctl status influxd.service
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2017-05-17 17:39:18 ICT; 16min ago
Docs: https://docs.influxdata.com/influxdb/
Process: 2138 ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS} (code=exited, status=1/FAILURE)
Main PID: 2138 (code=exited, status=1/FAILURE)

May 17 17:39:17 : Unit influxdb.service entered failed state.
May 17 17:39:17 influxdb.service failed.
May 17 17:39:18 ]: influxdb.service holdoff time over, scheduling restart.
May 17 17:39:18 :start request repeated too quickly for influxdb.service
May 17 17:39:18 : Failed to start InfluxDB is an open-source, distributed, time series database.
May 17 17:39:18 : Unit influxdb.service entered failed state.
May 17 17:39:18 : influxdb.service failed.

Thanks and regards

1 Like

@Nguyen_Phu_Cuong are you seeing any errors in the influxdb logs? You can check them with journalctl -u influxdb

@jackzampolin Thank you.This is the output I got when run journalctl -u influxdb after start the service

May 18 09:00:09 : influxdb.service: main process exited, code=exited, status=1/FAILURE
May 18 09:00:09 : Unit influxdb.service entered failed state.
May 18 09:00:09 : influxdb.service failed.
May 18 09:00:09 : influxdb.service holdoff time over, scheduling restart.
May 18 09:00:09 : start request repeated too quickly for influxdb.service
May 18 09:00:09 : Failed to start InfluxDB is an open-source, distributed, time series database.
May 18 09:00:09 : Unit influxdb.service entered failed state.
May 18 09:00:09 : influxdb.service failed.

And here is the status when I run influxdb manually with influxd (it seems to be working fine). I can access influx cli but cannot access the web with port 8086 (I have already disabled the firewall)

[I] 2017-05-18T02:02:20Z InfluxDB starting, version 1.2.2, branch master, commit 1bcf3ae74c6b9c4897dab68d513d056277eb24f7
[I] 2017-05-18T02:02:20Z Go version go1.7.4, GOMAXPROCS set to 4
[I] 2017-05-18T02:02:20Z Using configuration at: /etc/influxdb/influxdb.conf
[I] 2017-05-18T02:02:20Z Using data dir: /var/lib/influxdb/data service=store
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/test/autogen/2/000000001-000000001.tsm (#0) opened in 126.638µs engine=tsm1 service=filestore
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00001.wal, size 15753 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/test/autogen/2/_00007.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/3/_00001.wal, size 31503 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/test/autogen/2 database index loaded in 1.584628ms service=shard
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/test/autogen/2 opened in 3.087501ms service=store
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00002.wal, size 92001 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/3/_00002.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/_internal/monitor/3 database index loaded in 1.603275ms service=shard
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/_internal/monitor/3 opened in 11.1319ms service=store
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00003.wal, size 547074 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00004.wal, size 34498 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00005.wal, size 277671 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00006.wal, size 164423 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z reading file /var/lib/influxdb/wal/_internal/monitor/1/_00008.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/_internal/monitor/1 database index loaded in 768.839µs service=shard
[I] 2017-05-18T02:02:20Z /var/lib/influxdb/data/_internal/monitor/1 opened in 149.626689ms service=store
[I] 2017-05-18T02:02:20Z opened service service=subscriber
[I] 2017-05-18T02:02:20Z Starting monitor system service=monitor
[I] 2017-05-18T02:02:20Z ‘build’ registered for diagnostics monitoring service=monitor
[I] 2017-05-18T02:02:20Z ‘runtime’ registered for diagnostics monitoring service=monitor
[I] 2017-05-18T02:02:20Z ‘network’ registered for diagnostics monitoring service=monitor
[I] 2017-05-18T02:02:20Z ‘system’ registered for diagnostics monitoring service=monitor
[I] 2017-05-18T02:02:20Z Starting precreation service with check interval of 10m0s, advance period of 30m0s service=shard-precreation
[I] 2017-05-18T02:02:20Z Starting snapshot service service=snapshot
[I] 2017-05-18T02:02:20Z Starting continuous query service service=continuous_querier
[I] 2017-05-18T02:02:20Z Starting HTTP service service=httpd
[I] 2017-05-18T02:02:20Z Authentication enabled:false service=httpd
[I] 2017-05-18T02:02:20Z Listening on HTTP:[::]:8086 service=httpd
[I] 2017-05-18T02:02:20Z Starting retention policy enforcement service with check interval of 30m0s service=retention
[I] 2017-05-18T02:02:20Z Storing statistics in database ‘_internal’ retention policy ‘monitor’, at interval 10s service=monitor
[I] 2017-05-18T02:02:20Z Sending usage statistics to usage.influxdata.com
[I] 2017-05-18T02:02:20Z Listening for signals

Thanks

Hi, I have already fixed the issue
Here is another log I got in /var/log/messages:

ay 17 17:57:27 influxd: [I] 2017-05-17T10:57:27Z Using configuration at: /etc/influxdb/influxdb.conf
May 17 17:57:27 influxd: [I] 2017-05-17T10:57:27Z Using data dir: /var/lib/influxdb/data service=store
May 17 17:57:27 influxd: run: open server: open tsdb store: open /var/lib/influxdb/data/_internal: permission denied
May 17 17:57:27 systemd: influxdb.service: main process exited, code=exited, status=1/FAILURE
May 17 17:57:27 systemd: Unit influxdb.service entered failed state.
May 17 17:57:27 systemd: influxdb.service failed.
May 17 17:57:27 systemd: influxdb.service holdoff time over, scheduling restart.
May 17 17:57:27 systemd: Started InfluxDB is an open-source, distributed, time series database.
May 17 17:57:27 systemd: Starting InfluxDB is an open-source, distributed, time series database…

Looks like there is something wrong with this
May 17 17:57:27 influxd: run: open server: open tsdb store: open /var/lib/influxdb/data/_internal: permission denied*

I changed the owner of this dir to influxdb and it works fine now.

Thanks

1 Like