[GH-ISSUE #5944] Crowdsec health check result in 403 (failed to authenticate to Central API (CAPI): API error: Forbidden) #11941

Open
opened 2026-08-05 01:31:46 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @bastiPB on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5944

After some time the crowdsec container become status unhealthy. I suspect the healthcheck on crowdsec CAPI will block after some attempts.

docker compose exec crowdsec cscli capi status
Loaded credentials from /etc/crowdsec//online_api_credentials.yaml
Trying to authenticate with username b****************************** on https://api.crowdsec.net/
INFO attempt 1 out of 2
INFO attempt 2 out of 2
INFO max attempts reached for status code 403
Error: cscli capi status: failed to authenticate to Central API (CAPI): API error: Forbidden

healthcheck:
  test: ["CMD", "cscli", "capi", "status"]

https://docs.crowdsec.net/u/troubleshooting/capi_403/

Crowdsec is very clear about this

Central API 403 (Forbidden)
Getting a 403 (Forbidden) from CrowdSec Central API (CAPI) means your Security Engine requests are blocked or your IP is rate limited.
This is commonly caused by misconfiguration and triggers a 1-hour ban from CrowdSec API.

Is there a other way to check health? I currently disabled the healthcheck because it prevents netbird-proxy from startup

It looks also that crowdsec is not running fine if netbrid-crowdsec is blocked from CAPI

time="2026-04-21T15:24:48Z" level=info msg="capi metrics: sending"
time="2026-04-21T15:24:48Z" level=error msg="capi metrics: failed: Post \"https://api.crowdsec.net/v3/metrics/\": API error: Forbidden"
docker exec netbird-crowdsec cscli metrics show acquisition parsers
+--------------------------------------------------------------------------------------------------+
| Acquisition Metrics                                                                              |
+--------+------------+--------------+----------------+------------------------+-------------------+
| Source | Lines read | Lines parsed | Lines unparsed | Lines poured to bucket | Lines whitelisted |
+--------+------------+--------------+----------------+------------------------+-------------------+
+--------+------------+--------------+----------------+------------------------+-------------------+
+------------------------------------+
| Parser Metrics                     |
+---------+------+--------+----------+
| Parsers | Hits | Parsed | Unparsed |
+---------+------+--------+----------+
+---------+------+--------+----------+

Thanks Cheers

Originally created by @bastiPB on GitHub (Apr 21, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5944 After some time the crowdsec container become status unhealthy. I suspect the healthcheck on crowdsec CAPI will block after some attempts. docker compose exec crowdsec cscli capi status Loaded credentials from /etc/crowdsec//online_api_credentials.yaml Trying to authenticate with username b****************************** on https://api.crowdsec.net/ INFO attempt 1 out of 2 INFO attempt 2 out of 2 INFO max attempts reached for status code 403 Error: cscli capi status: failed to authenticate to Central API (CAPI): API error: Forbidden healthcheck: test: ["CMD", "cscli", "capi", "status"] https://docs.crowdsec.net/u/troubleshooting/capi_403/ Crowdsec is very clear about this Central API 403 (Forbidden) Getting a 403 (Forbidden) from CrowdSec Central API (CAPI) means your Security Engine requests are blocked or your IP is rate limited. This is commonly caused by misconfiguration and triggers a 1-hour ban from CrowdSec API. Is there a other way to check health? I currently disabled the healthcheck because it prevents netbird-proxy from startup It looks also that crowdsec is not running fine if netbrid-crowdsec is blocked from CAPI ``` time="2026-04-21T15:24:48Z" level=info msg="capi metrics: sending" time="2026-04-21T15:24:48Z" level=error msg="capi metrics: failed: Post \"https://api.crowdsec.net/v3/metrics/\": API error: Forbidden" ``` ``` docker exec netbird-crowdsec cscli metrics show acquisition parsers +--------------------------------------------------------------------------------------------------+ | Acquisition Metrics | +--------+------------+--------------+----------------+------------------------+-------------------+ | Source | Lines read | Lines parsed | Lines unparsed | Lines poured to bucket | Lines whitelisted | +--------+------------+--------------+----------------+------------------------+-------------------+ +--------+------------+--------------+----------------+------------------------+-------------------+ +------------------------------------+ | Parser Metrics | +---------+------+--------+----------+ | Parsers | Hits | Parsed | Unparsed | +---------+------+--------+----------+ +---------+------+--------+----------+ ``` Thanks Cheers
saavagebueno added the triage-needed label 2026-08-05 01:31:46 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11941