Is there a reason why you’re using 1.5.2? The latest release is 1.6.1.
Can you provide more details about how you installed InfluxDB? I wasn’t able to reproduce your issue with the latest release.
I installed CentOS 7.5.1804 in a VirtualBox VM and followed the installation instructions for Red Hat & CentOS in the documentation.
$ sudo systemctl start influxdb
$ systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2018-08-26 12:56:23 EDT; 1s ago
Docs: https://docs.influxdata.com/influxdb/
Main PID: 10952 (influxd)
CGroup: /system.slice/influxdb.service
└─10952 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448403Z lvl=info msg="Starting precreation service" log_id=0A9nUd1W000 service=shard-...period=30m
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448415Z lvl=info msg="Starting snapshot service" log_id=0A9nUd1W000 service=snapshot
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448420Z lvl=info msg="Starting continuous query service" log_id=0A9nUd1W000 service=c...us_querier
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448428Z lvl=info msg="Starting HTTP service" log_id=0A9nUd1W000 service=httpd authentication=false
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448432Z lvl=info msg="opened HTTP access log" log_id=0A9nUd1W000 service=httpd path=stderr
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448526Z lvl=info msg="Listening on HTTP" log_id=0A9nUd1W000 service=httpd addr=[::]:8...ttps=false
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.448538Z lvl=info msg="Starting retention policy enforcement service" log_id=0A9nUd1W0...terval=30m
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.451540Z lvl=info msg="Listening for signals" log_id=0A9nUd1W000
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.451884Z lvl=info msg="Storing statistics" log_id=0A9nUd1W000 service=monitor db_insta...terval=10s
Aug 26 12:56:23 localhost.localdomain influxd[10952]: ts=2018-08-26T16:56:23.452022Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0A9nUd1W000
Hint: Some lines were ellipsized, use -l to show in full.
I verified that it was running as the influxdb
user:
$ ps aux | grep influ[x]
influxdb 10952 0.2 0.8 386364 16364 ? Ssl 12:56 0:00 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
and also verified that ports were being opened:
$ ss -lntu
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 127.0.0.1:323 *:*
udp UNCONN 0 0 *:68 *:*
udp UNCONN 0 0 ::1:323 :::*
tcp LISTEN 0 128 *:22 *:*
tcp LISTEN 0 128 127.0.0.1:8088 *:*
tcp LISTEN 0 100 127.0.0.1:25 *:*
tcp LISTEN 0 128 :::8086 :::*
tcp LISTEN 0 128 :::22 :::*
tcp LISTEN 0 100 ::1:25 :::*
I was also able to connect to InfluxDB using the CLI on localhost:
$ influx
Connected to http://localhost:8086 version 1.6.1
InfluxDB shell version: 1.6.1
>
I was not, however, able to connect to InfluxDB from outside of the virtual machine:
$ influx -host 10.0.2.10 -port 8086
Failed to connect to http://10.0.2.10:8086: Get http://10.0.2.10:8086/ping: dial tcp 10.0.2.10:8086: connect: connection refused
Please check your connection settings and ensure 'influxd' is running.
This is because CentOS comes with FirewallD enabled by default. I adding the InfluxDB port to the public
zone:
$ sudo firewall-cmd --zone=public --add-port=8086/tcp
success
and was able to connect from an external machine:
$ influx -host 10.0.2.10 -port 8086
Connected to http://10.0.2.10:8086 version 1.6.1
InfluxDB shell version: v1.6.1
>
Digital Ocean has a great post on FirewallD for CentOS 7 which goes into more detail on the daemon, including how to set up a FirewallD service and permanently adding it to a zone.
If you’re going to expose your InfluxDB instance to the public, you should enable authentication and HTTPS.