Hello , i need your help . I’ve installed influxdb and grafana in openhabian on rpi3.
Works fine but … I can’t run influxdb as service.
When i connect to my host with ssh and type influx to acces the cli , i’ve this:
_> Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused_
_> Please check your connection settings and ensure 'influxd' is running._
If i type influxd the server starts but if i close the shell it stops and everything is lost.
_> [07:15:06] openhabian@openHABianPi:~$ influxd_
_> 8888888 .d888 888 8888888b. 888888b._
_> 888 d88P" 888 888 "Y88b 888 "88b_
_> 888 888 888 888 888 888 .88P_
_> 888 88888b. 888888 888 888 888 888 888 888 888 8888888K._
_> 888 888 "88b 888 888 888 888 Y8bd8P' 888 888 888 "Y88b_
_> 888 888 888 888 888 888 888 X88K 888 888 888 888_
_> 888 888 888 888 888 Y88b 888 .d8""8b. 888 .d88P 888 d88P_
_> 8888888 888 888 888 888 "Y88888 888 888 8888888P" 8888888P"_
_> [I] 2017-03-06T06:15:39Z InfluxDB starting, version 1.2.0, branch master, commit b7bb7e8359642b6e071735b50ae41f5eb343fd42_
_> [I] 2017-03-06T06:15:39Z Go version go1.7.4, GOMAXPROCS set to 4_
_> [I] 2017-03-06T06:15:39Z no configuration provided, using default settings_
_> [I] 2017-03-06T06:15:39Z Using data dir: /home/openhabian/.influxdb/data service=store_
_> [I] 2017-03-06T06:15:39Z reading file /home/openhabian/.influxdb/wal/_internal/monitor/1/_00001.wal, size 61182 engine=tsm1 service=cacheloader_
_> [I] 2017-03-06T06:15:39Z reading file /home/openhabian/.influxdb/wal/_internal/monitor/1/_00002.wal, size 795477 engine=tsm1 service=cacheloader_
_> [I] 2017-03-06T06:15:40Z reading file /home/openhabian/.influxdb/wal/_internal/monitor/1/_00003.wal, size 405410 engine=tsm1 service=cacheloader_
_> [I] 2017-03-06T06:15:41Z reading file /home/openhabian/.influxdb/wal/_internal/monitor/1/_00004.wal, size 0 engine=tsm1 service=cacheloader_
_> [I] 2017-03-06T06:15:41Z /home/openhabian/.influxdb/data/_internal/monitor/1 database index loaded in 5.533469ms service=shard_
_> [I] 2017-03-06T06:15:41Z /home/openhabian/.influxdb/data/_internal/monitor/1 opened in 1.757146167s service=store_
_> [I] 2017-03-06T06:15:41Z opened service service=subscriber_
_> [I] 2017-03-06T06:15:41Z Starting monitor system service=monitor_
_> [I] 2017-03-06T06:15:41Z 'build' registered for diagnostics monitoring service=monitor_
_> [I] 2017-03-06T06:15:41Z 'runtime' registered for diagnostics monitoring service=monitor_
_> [I] 2017-03-06T06:15:41Z 'network' registered for diagnostics monitoring service=monitor_
_> [I] 2017-03-06T06:15:41Z 'system' registered for diagnostics monitoring service=monitor_
_> [I] 2017-03-06T06:15:41Z Starting precreation service with check interval of 10m0s, advance period of 30m0s service=shard-precreation_
_> [I] 2017-03-06T06:15:41Z Starting snapshot service service=snapshot_
_> [I] 2017-03-06T06:15:41Z Starting continuous query service service=continuous_querier_
_> [I] 2017-03-06T06:15:41Z Starting HTTP service service=httpd_
_> [I] 2017-03-06T06:15:41Z Authentication enabled:false service=httpd_
_> [I] 2017-03-06T06:15:41Z Listening on HTTP:[::]:8086 service=httpd_
_> [I] 2017-03-06T06:15:41Z Storing statistics in database '_internal' retention policy 'monitor', at interval 10s service=monitor_
_> [I] 2017-03-06T06:15:41Z Starting retention policy enforcement service with check interval of 30m0s service=retention_
_> [I] 2017-03-06T06:15:41Z Listening for signals_
_> [I] 2017-03-06T06:15:41Z Sending usage statistics to usage.influxdata.com_
_> ^C[I] 2017-03-06T06:15:49Z Signal received, initializing clean shutdown..._
_> [I] 2017-03-06T06:15:49Z Waiting for clean shutdown..._
_> [I] 2017-03-06T06:15:49Z shutting down monitor system service=monitor_
_> [I] 2017-03-06T06:15:49Z Precreation service terminating service=shard-precreation_
_> [I] 2017-03-06T06:15:49Z snapshot listener closed service=snapshot_
_> [I] 2017-03-06T06:15:49Z continuous query service terminating service=continuous_querier_
_> [I] 2017-03-06T06:15:49Z retention policy enforcement terminating service=retention_
_> [I] 2017-03-06T06:15:49Z closed service service=subscriber_
_> [I] 2017-03-06T06:15:49Z server shutdown completed_
I’ve tried to start it with systemctl but seems to me the same problem:
[07:15:49] openhabian@openHABianPi:~$ sudo systemctl start influxd
[sudo] password for openhabian:
[07:17:07] openhabian@openHABianPi:~$ systemctl start influxd
Failed to start influxd.service: Access denied
[07:17:13] openhabian@openHABianPi:~$ sudo systemctl start influxd
[07:17:23] openhabian@openHABianPi:~$ influx
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure 'influxd' is running.
The service status tell me this:
[07:17:39] openhabian@openHABianPi:~$ sudo service influxd status
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled)
Active: failed (Result: start-limit) since Mon 2017-03-06 07:17:24 CET; 56s ago
Docs: https://docs.influxdata.com/influxdb/
Process: 20225 ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS} (code=exited, status=1/FAILURE)
Main PID: 20225 (code=exited, status=1/FAILURE)
Mar 06 07:17:24 openHABianPi influxd[20225]: [I] 2017-03-06T06:17:24Z Influx...2
Mar 06 07:17:24 openHABianPi influxd[20225]: [I] 2017-03-06T06:17:24Z Go ver...4
Mar 06 07:17:24 openHABianPi influxd[20225]: [I] 2017-03-06T06:17:24Z Using ...f
Mar 06 07:17:24 openHABianPi influxd[20225]: run: parse config: open /etc/in...y
Mar 06 07:17:24 openHABianPi systemd[1]: influxdb.service holdoff time over,....
Mar 06 07:17:24 openHABianPi systemd[1]: Stopping InfluxDB is an open-source....
Mar 06 07:17:24 openHABianPi systemd[1]: Starting InfluxDB is an open-source....
Mar 06 07:17:24 openHABianPi systemd[1]: influxdb.service start request repe....
Mar 06 07:17:24 openHABianPi systemd[1]: Failed to start InfluxDB is an open....
Mar 06 07:17:24 openHABianPi systemd[1]: Unit influxdb.service entered faile....
Hint: Some lines were ellipsized, use -l to show in full.
and
[07:21:35] openhabian@openHABianPi:/etc/influxdb$ ps -ef|grep influx
openhab+ 20417 19848 0 07:22 pts/0 00:00:00 grep --color=auto influx
Please help . Thanks.