Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not write to any InfluxDB server in cluster #3389

Closed
daniel-alonso-sanchez opened this issue Oct 26, 2017 · 8 comments
Closed
Labels
discussion Topics for discussion

Comments

@daniel-alonso-sanchez
Copy link

daniel-alonso-sanchez commented Oct 26, 2017

Bug report

Hi. First of all, thanks a lot for your support and the tool!
I've a problem with latest telegraf versions (1.4.2 and 1.4.3), tryining to write into influxdb (1.3.6).
I've tested also with a previous version (telegraf 1.2.1) in windows and linux machines and it works perfectly

Relevant telegraf.conf:

[agent]

  interval = "10s"

  round_interval = true


  metric_buffer_limit = 1000

  flush_buffer_when_full = true


  collection_jitter = "0s"


  flush_interval = "10s"

  flush_jitter = "0s"
[[outputs.influxdb]]

  urls = ["http://10.19.24.123:8086"] 

  database = "telegraf" # required

  precision = "s"


  timeout = "5s"

System info:

  • Suse Linux 12
  • Windows 8

Telegraf 1.4.3 and 1.4.2

Steps to reproduce:

  1. Start a clean installation of influxdb
  2. Configure and start telegraf

Expected behavior:

Metrics stored into influxdb

Actual behavior:

2017-10-26T11:52:10Z E! InfluxDB Output Error: Response Error: Status Code [403]
, expected [204], [<nil>]
2017-10-26T11:52:10Z E! Error writing to output [influxdb]: Could not write to a
ny InfluxDB server in cluster

Additional info:

[Include gist of relevant config, logs, etc.]

There's a corporate proxy, but everything works with telegraf 1.2.1

Use case:

POC in order to show to managers and OPS team the advantages of gathering metrics and alerting using the stack (chronograf, telegraf , kapacitor)

Thanks again!

@danielnelson
Copy link
Contributor

403 Forbidden usually indicates that the user does not have write permissions to the database, but in this case I think this may be coming from the proxy. Normally a permission error from InfluxDB has an error message like:

E! InfluxDB Output Error: Response Error: Status Code [403], expected [204], ["howdy" user is not authorized to write to database "telegraf"]

@danielnelson danielnelson added the discussion Topics for discussion label Oct 26, 2017
@daniel-alonso-sanchez
Copy link
Author

You're porobably right. Because also, there's no log entry un influxdb about the problem... But i cannot understand why everything works with 1.2.1, using same config files...

I'm gonna try sniffing net packsges...

@daniel-alonso-sanchez
Copy link
Author

Confirmed. It's the annoying corporate proxy. It's funny because it's the first company that limits also connections among internal machines...

Is there a way of setting a NO_PROXY exception in source machine (telegraf machine)?

Thanks a lot and sorry for the inconvenience.

@daniel-alonso-sanchez
Copy link
Author

Looks like there is other people asking for something similar: #1588

Closing this ticket. Thanks again!

@danielnelson
Copy link
Contributor

That makes sense, we only added support for the proxy environment variables recently.

It sounds like maybe we need a way to disable this on a per plugin basis in the config, but in the meantime you can add NO_PROXY="*" in /etc/default/telegraf.

@daniel-alonso-sanchez
Copy link
Author

Hi again! That's exactly what i've done and works like a charm! Thanx a lot!!

@senjirui
Copy link

Telegraf (version 1.3.5) I met the same problem. I have done like this ==>add NO_PROXY="*" in /etc/default/telegraf . But,it does not fix it

@danielnelson
Copy link
Contributor

@senjirui We only added proxy envvar support in 1.4.2, so I think you must have a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Topics for discussion
Projects
None yet
Development

No branches or pull requests

3 participants