influxdb-rails icon indicating copy to clipboard operation
influxdb-rails copied to clipboard

InfluxDB: Failed to contact host

Open kinsomicrote opened this issue 1 year ago • 1 comments

Hello, I'm trying to connect my InfluxDb with my Rails app but I'm faced with this error;

 WARN -- InfluxDB: Failed to contact host xxxxx: #<SocketError: Failed to open TCP connection to xxxx:8086 (getaddrinfo: nodename nor servname provided, or not known)>

I made the changes suggested in this issue: https://github.com/influxdata/influxdb-rails/issues/153

Here is what my config looks like;

config.client.database = "db"
 config.client.hosts = ["host"]
  config.client.port = 8086
  config.client.use_ssl = true

  ## If you've setup user authentication (and activated it in the server
  ## config), you need to configure the credentials here.
  config.client.username = "xxxx"
  config.client.password = "xxx"

I'm able to send a request to influxdb from another container in the same network, and also from my machine using postman. I can see the requests in the container logs for influxdb. But my Rails app keeps giving the same error, locally and on my server. Any hints?

kinsomicrote avatar Sep 20 '23 18:09 kinsomicrote

I'm able to send a request to influxdb from another container in the same network

How do you send the request from another machine? Which version of Influxdb are you using?

ChrisBr avatar Oct 09 '23 14:10 ChrisBr