Failed to bind to json

Hi all, I noticed this message being spammed in my docker logs....
crowdsec | 2025-09-29T13:30:02.980877960Z time="2025-09-29T15:30:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T13:45:02.987422639Z time="2025-09-29T15:45:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:00:02.994870485Z time="2025-09-29T16:00:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:15:03.005988061Z time="2025-09-29T16:15:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:30:03.015941612Z time="2025-09-29T16:30:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:45:03.023907445Z time="2025-09-29T16:45:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T15:00:03.031093964Z time="2025-09-29T17:00:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T13:30:02.980877960Z time="2025-09-29T15:30:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T13:45:02.987422639Z time="2025-09-29T15:45:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:00:02.994870485Z time="2025-09-29T16:00:02+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:15:03.005988061Z time="2025-09-29T16:15:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:30:03.015941612Z time="2025-09-29T16:30:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T14:45:03.023907445Z time="2025-09-29T16:45:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
crowdsec | 2025-09-29T15:00:03.031093964Z time="2025-09-29T17:00:03+02:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.metrics.items of type []*models.MetricsDetailItem" func=UsageMetrics
I honestly have no clue where to start....
25 Replies
CrowdSec
CrowdSec4d ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
PintjesBier
PintjesBierOP4d ago
The error is sent in the 'main server' docker. It's a distributed setup, and the only bouncers I have active at the moment of errors are Openresty.
iiamloz
iiamloz4d ago
So you have a central LAPI that openresty is talking too?
PintjesBier
PintjesBierOP4d ago
correct Sorry, my head is all over the place rn. Can't compose a decent sentence
iiamloz
iiamloz4d ago
can you check the api logs? ohh wait your inside a container it should be the same stdout
PintjesBier
PintjesBierOP4d ago
When filtering on 'error' these are the only lines I see in the last 5000 logs Anything else I should look for?
iiamloz
iiamloz4d ago
can you grep for "500" status code?
PintjesBier
PintjesBierOP4d ago
Can't find any
iiamloz
iiamloz4d ago
which openresty / remediation version are you on? looking at the code we return 400 status code not 500
PintjesBier
PintjesBierOP4d ago
Latest normally, lemme check crowdsec-openresty-bouncer v1.1.1
PintjesBier
PintjesBierOP4d ago
192.168.202.4 & 192.168.202.5 are my openresty nodes
iiamloz
iiamloz4d ago
So we have a little bit of a dilema, we need to enable debug logs on openresty but to do so would need a restart and then the metrics its currently trying to push will be lost so will most likely resolve itself.
PintjesBier
PintjesBierOP4d ago
So you think a restart of the openrest node should fix the issue? 'Cause that server has been restarted sometimes in the last couple of days
iiamloz
iiamloz4d ago
Yeah it should, unless the metrics are completely broken but the same system is within nginx and I have it running / havent encountered this.
PintjesBier
PintjesBierOP3d ago
I'll fully reboot both servers and follow it up... After rebooting the issue is back
blotus
blotus3d ago
Can you add debug at the end of your error_log directive and restart openresty ? This will make the bouncer output debug logs, including the payload sent to LAPI for the metrics (it will spam quite a bit when a request is checked tho)
PintjesBier
PintjesBierOP3d ago
Like so right? In the openresty/nginx config:
# Openresty log files
error_log "/var/log/nginx/error.log" debug;
access_log "/var/log/nginx/access.log";
# Openresty log files
error_log "/var/log/nginx/error.log" debug;
access_log "/var/log/nginx/access.log";
blotus
blotus3d ago
yes
PintjesBier
PintjesBierOP3d ago
Okay, I'm monitoring. Will wait for a new alert to trigger I suppose?
blotus
blotus3d ago
Yes, the bouncer pushes its metrics every 15 minutes
blotus
blotus3d ago
and did you see the error in crowdsec logs at the same time ?
PintjesBier
PintjesBierOP3d ago
nope
PintjesBier
PintjesBierOP3d ago
All errors filtered out
PintjesBier
PintjesBierOP19h ago
Any thoughts?

Did you find this page helpful?