context deadline exceeded

170 views
Skip to first unread message

Rushikesh socha

unread,
Dec 23, 2022, 9:57:41 AM12/23/22
to promethe...@googlegroups.com
Hi, I need your help to resolve "context deadline exceeded" ?. Only one of the specific targets out of many targets I have in prometheus. When I try to fetch metric using curl command there is no issue but target is showing above error. 

Thanks.

Brian Candler

unread,
Dec 23, 2022, 10:10:24 AM12/23/22
to Prometheus Users
There are lots of possible problems or misconfigurations, so we'll need more info.  In particular:

- the exact prometheus error output
- the scrape job configuration
- the curl command you're using
- the response to the curl command (also, try putting "time" in front of the curl command, to measure how long it takes)

Are you running the curl command on the same host or container where prometheus itself is running? If not, then do so.  It could be a network connectivity problem, or firewalling, between prometheus and the target.

If the scrape is not over https, then you may be able to find out more by using tcpdump on the prometheus server:
    tcpdump -i eth0 -nn -s0 -A host x.x.x.x
(replace eth0 with correct interface name, replace x.x.x.x with target IP address)
Reply all
Reply to author
Forward
0 new messages