title: Context Deadline Exceeded - prometheus
body: <p>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.</p>
  <p>When I access:</p>
  <p><a href="https://ip-address:port/metrics" rel="noreferrer">https://ip-address:port/metrics</a></p>
  <p>I can see the metrics.
  The job that I have added in the prometheus.yml configuration is:</p>
  <pre><code>- job_name: 'test-jvm-metrics'
      scheme: https
      static_configs:
        - targets: ['ip:port']
  </code></pre>
  <p>When I restart the Prometheus I can see an error on my target that says:</p>
  <blockquote>
  <p>context deadline exceeded</p>
  </blockquote>
  <p>I have read that maybe the <code>scrape_timeout</code> is the problem, but I have set it to 50 sec and still the same problem.</p>
  <p>What can cause this problem and how to fix it?
  Thank you!</p>