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

Blackbox returns 404 for a site that returns 200 #1369

Closed
Ncvejic6545 opened this issue Feb 20, 2025 · 1 comment
Closed

Blackbox returns 404 for a site that returns 200 #1369

Ncvejic6545 opened this issue Feb 20, 2025 · 1 comment

Comments

@Ncvejic6545
Copy link

My probe:

http_response_probe_200:
prober: http
http:
method: GET
valid_status_codes: [200]
tls_config:
insecure_skip_verify: true
preferred_ip_protocol: ip4

it works for most sites, eg.

Logs for the probe:
ts=2025-02-20T18:04:26.73351146Z caller=main.go:320 module=http_response_probe_200 target=https://www.github.com level=info msg="Beginning probe" probe=http timeout_seconds=119.5
ts=2025-02-20T18:04:26.733774648Z caller=http.go:335 module=http_response_probe_200 target=https://www.github.com level=info msg="Resolving target address" ip_protocol=ip4
ts=2025-02-20T18:04:26.773331569Z caller=http.go:335 module=http_response_probe_200 target=https://www.github.com level=info msg="Resolved target address" ip=140.82.121.3
ts=2025-02-20T18:04:26.77367265Z caller=client.go:252 module=http_response_probe_200 target=https://www.github.com level=info msg="Making HTTP request" url=https://140.82.121.3 host=www.github.com
ts=2025-02-20T18:04:26.866252638Z caller=client.go:498 module=http_response_probe_200 target=https://www.github.com level=info msg="Received redirect" location=https://github.com/
ts=2025-02-20T18:04:26.866457225Z caller=client.go:252 module=http_response_probe_200 target=https://www.github.com level=info msg="Making HTTP request" url=https://github.com/ host=
ts=2025-02-20T18:04:26.866863044Z caller=client.go:252 module=http_response_probe_200 target=https://www.github.com level=info msg="Address does not match first address, not sending TLS ServerName" first=140.82.121.3 address=github.com
ts=2025-02-20T18:04:26.951098092Z caller=main.go:130 module=http_response_probe_200 target=https://www.github.com level=info msg="Received HTTP response" status_code=200
ts=2025-02-20T18:04:27.056239261Z caller=main.go:130 module=http_response_probe_200 target=https://www.github.com level=info msg="Response timings for roundtrip" roundtrip=0 start=2025-02-20T18:04:26.774360962Z dnsDone=2025-02-20T18:04:26.774360962Z connectDone=2025-02-20T18:04:26.80254565Z gotConn=2025-02-20T18:04:26.837550812Z responseStart=2025-02-20T18:04:26.865820368Z tlsStart=2025-02-20T18:04:26.802600708Z tlsDone=2025-02-20T18:04:26.8374196Z end=0001-01-01T00:00:00Z
ts=2025-02-20T18:04:27.056521197Z caller=main.go:130 module=http_response_probe_200 target=https://www.github.com level=info msg="Response timings for roundtrip" roundtrip=1 start=2025-02-20T18:04:26.86743017Z dnsDone=2025-02-20T18:04:26.868947531Z connectDone=2025-02-20T18:04:26.895010746Z gotConn=2025-02-20T18:04:26.923689209Z responseStart=2025-02-20T18:04:26.950984067Z tlsStart=2025-02-20T18:04:26.895049955Z tlsDone=2025-02-20T18:04:26.923488183Z end=2025-02-20T18:04:27.056221337Z
ts=2025-02-20T18:04:27.057297688Z caller=main.go:320 module=http_response_probe_200 target=https://www.github.com level=info msg="Probe succeeded" duration_seconds=0.323625625

but when i try one specific site (which is live and returning 200) i get

Logs for the probe:
Logs for the probe:
ts=2025-02-20T18:06:10.250708954Z caller=main.go:320 module=http_response_probe_200 target=https://site.com level=info msg="Beginning probe" probe=http timeout_seconds=119.5
ts=2025-02-20T18:06:10.251019948Z caller=http.go:335 module=http_response_probe_200 target=https://site.com level=info msg="Resolving target address" ip_protocol=ip4
ts=2025-02-20T18:06:10.251967313Z caller=http.go:335 module=http_response_probe_200 target=https://site.com level=info msg="Resolved target address" ip=ip
ts=2025-02-20T18:06:10.252133996Z caller=client.go:252 module=http_response_probe_200 target=https://site.com level=info msg="Making HTTP request" url=https://ip host=site.com
ts=2025-02-20T18:06:10.394846217Z caller=main.go:130 module=http_response_probe_200 target=https://site.com level=info msg="Received HTTP response" status_code=404
ts=2025-02-20T18:06:10.39497243Z caller=main.go:130 module=http_response_probe_200 target=https://site.com level=info msg="Invalid HTTP response status code" status_code=404 valid_status_codes=[200]
ts=2025-02-20T18:06:10.395098909Z caller=main.go:130 module=http_response_probe_200 target=https://site.com level=info msg="Response timings for roundtrip" roundtrip=0 start=2025-02-20T18:06:10.2523079Z dnsDone=2025-02-20T18:06:10.2523079Z connectDone=2025-02-20T18:06:10.282463506Z gotConn=2025-02-20T18:06:10.356217083Z responseStart=2025-02-20T18:06:10.394518368Z tlsStart=2025-02-20T18:06:10.282506262Z tlsDone=2025-02-20T18:06:10.352251091Z end=2025-02-20T18:06:10.395082573Z
ts=2025-02-20T18:06:10.395314118Z caller=main.go:320 module=http_response_probe_200 target=https://site.com level=error msg="Probe failed" duration_seconds=0.144448349

curling the site from the server is returning everything okay

@electron0zero
Copy link
Member

This is probably config issue, please review the config docs and refer to example configs

For questions/help/support please use our community channels. There are more people available to potentially respond to your request and the whole community can benefit from the answers provided.

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

No branches or pull requests

2 participants