How to connect to InfluxDB server(not local)

I was given the name of the cluster node to connect to. I was told to target it as my influxDB server but I am not sure how. Do I need to change some settings in the config file? if so, where?

so I changed the bind-address = “xxxx:8086” and now influxd is listening to that address. How do I make my CLI listen to that address?

Can you clarify what your bind address is? It should likely be something like ":8086" or "0.0.0.0:8086". After that’s been done, you need to find the IP address of the machine. That’s likely not something I will be easily able to help with as that highly depends on your routing.

From the CLI, you just do influx -host <ip>.

1 Like

I was able to connect with influxD and CLI. However, I tried to connect again and it shows me this msg: “run: open server: open service: listen tcp 172.xx.xx.xx:8086: bind: The requested address is not valid in its context.”

here is the entire output:
[I] 2017-09-29T14:06:53Z InfluxDB starting, version 1.3.5, branch HEAD, commit 9d9001036d3585cf21925c13a57881bc6c8dcc7e
[I] 2017-09-29T14:06:53Z Go version go1.8.3, GOMAXPROCS set to 8
[I] 2017-09-29T14:06:53Z Using configuration at: influxdb.conf
[I] 2017-09-29T14:06:54Z Using data dir: InfluxDBTest/var/lib/influxdb/data service=store
[I] 2017-09-29T14:06:54Z Not loading. Not a database directory. service=store name=meta.db
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\46\000000001-000000001.tsm (#0) opened in 999.3”s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\45\000000001-000000001.tsm (#0) opened in 1.0011ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\RedisDiagnostic\autogen\46_00013.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\RedisDiagnostic\autogen\45_00013.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\47\000000001-000000001.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\RedisDiagnostic\autogen\47_00012.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\52\000000003-000000002.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\54\000000004-000000002.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\autogen\52_00010.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\4_weeks\57_00001.wal, size 72691 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\48\000000001-000000001.tsm (#0) opened in 997.9”s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\autogen\54_00011.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\RedisDiagnostic\autogen\48_00012.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\52 opened in 15.0011ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\53\000000004-000000002.tsm (#0) opened in 1.001ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\45 opened in 19.0023ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\46 opened in 19.0023ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\48 opened in 19.0023ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\29\000000005-000000002.tsm (#0) opened in 998.6”s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\29_00026.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\autogen\53_00011.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\54 opened in 18.0012ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\RedisDiagnostic\autogen\47 opened in 19.0023ms service=store
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\4_weeks\57_00002.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\55\000000004-000000002.tsm (#0) opened in 1.0025ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal\Test\autogen\55_00011.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\53 opened in 29.0008ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\40\000000005-000000003.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\autogen\55 opened in 17.9998ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data\Test\4_weeks\57 opened in 34.0031ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\51\000000002-000000002.tsm (#0) opened in 2.9945ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\1\000000001-000000001.tsm (#0) opened in 1.0025ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\10\000000004-000000002.tsm (#0) opened in 992.6”s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\40_00028.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\29 opened in 26.0035ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\7\000000002-000000002.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\6\000000002-000000002.tsm (#0) opened in 0s engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\51_00015.wal, size 10503852 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\1_00020.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\10_00026.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\8\000000003-000000002.tsm (#0) opened in 1.0152ms engine=tsm1 service=filestore
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\7_00023.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\8_00025.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\6_00022.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\1 opened in 43.0058ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\7 opened in 25.9905ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\40 opened in 38.0057ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\6 opened in 27.9962ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\8 opened in 23.9968ms service=store
[I] 2017-09-29T14:06:54Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\10 opened in 47.0063ms service=store
[I] 2017-09-29T14:06:54Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\51_00016.wal, size 7366652 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:55Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\51_00017.wal, size 6992977 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:55Z reading file InfluxDBTest\var\lib\influxdb\wal_internal\monitor\51_00018.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-29T14:06:56Z InfluxDBTest\var\lib\influxdb\data_internal\monitor\51 opened in 1.968187s service=store
[I] 2017-09-29T14:06:56Z opened service service=subscriber
[I] 2017-09-29T14:06:56Z Starting monitor system service=monitor
[I] 2017-09-29T14:06:56Z ‘build’ registered for diagnostics monitoring service=monitor
[I] 2017-09-29T14:06:56Z ‘runtime’ registered for diagnostics monitoring service=monitor
[I] 2017-09-29T14:06:56Z ‘network’ registered for diagnostics monitoring service=monitor
[I] 2017-09-29T14:06:56Z ‘system’ registered for diagnostics monitoring service=monitor
[I] 2017-09-29T14:06:56Z Starting precreation service with check interval of 10m0s, advance period of 30m0s service=shard-precreation
[I] 2017-09-29T14:06:56Z Starting snapshot service service=snapshot
[I] 2017-09-29T14:06:56Z Starting continuous query service service=continuous_querier
[I] 2017-09-29T14:06:56Z Starting HTTP service service=httpd
[I] 2017-09-29T14:06:56Z Authentication enabled:false service=httpd
[I] 2017-09-29T14:06:56Z Storing statistics in database ‘_internal’ retention policy ‘monitor’, at interval 10s service=monitor

The 172.*.*.* address doesn’t belong there. In the server configuration for the bind address, the only values you should use are 0.0.0.0:8086, :8086, or 127.0.0.1:8086. You can use a different port for all of them, but the rest should be one of those three. The first two will allow your server to access connections from other computers (which is what you want) while the last will restrict the listener to only connections from the current host. The last one is useful if you want to put a load balancer like nginx in front of it since it would allow nginx running on the same machine to connect, but wouldn’t allow external connections to the influxd process itself.

The easiest way is just to keep the bind-address as the default value of :8086.

There are also two bind addresses that exist. There’s one at the top of the file in no section that defaults to :8088 and there’s one in the http section that defaults to :8086.

In general, you likely do not need to change the defaults for any of the bind addresses unless you have a specific need like the load balancer example I gave earlier.