Context Deadline Exceeded - prometheus

xmlParser picture xmlParser · Apr 13, 2018 · Viewed 25.9k times · Source

I have prometheus configuration with many jobs where i am scraping metrics over http. But I have one job where i need to scrape the metrics over https.

When i access:

https://ip-address:port/metrics

I can see the metrics. The job that I have added in the prometheus.yml configuration is:

- job_name: 'test-jvm-metrics'
    scheme: https
    static_configs:
      - targets: ['ip:port']

When i restart the prometheus I can see error on my target that says:

context deadline exceeded

I have read that maybe the scrape_timeout is the problem, but I have set it to 50 sec and still the same problem.

What can cause this problem and how to fix it? Thank you!

Answer

Bambus picture Bambus · Apr 18, 2018

I had a same problem in the past. In my case the problem was with the certificates and I fixed it with adding:

 tls_config:
      insecure_skip_verify: true

You can try it, maybe it will work.