Unmarshal JSON warnings
Just noticed these unmarshalJSON warnings/errors by executing
docker logs -f crowdsec
traefik access log config
note, traefik logs log to a seperate file which are not ingested into crowdsec
acquis.yaml
4 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve
© Created By WhyAydan for CrowdSec ❤️
Additional examples:
crowdsec log:
time="2025-08-02T19:52:08+10:00" level=error msg="UnmarshalJSON : invalid character 'c' looking for beginning of value" line="clear/include/Preclear.php\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP/2.0\",\"RequestScheme\":\"https\",\"RetryAttempts\":0,\"RouterName\":\"apollo@file\",\"ServiceAddr\":\"10.0.0.100:8088\",\"ServiceName\":\"apollo@file\",\"ServiceURL\":\"http://10.0.0.100:8088/\",\"StartLocal\":\"2025-08-02T19:52:08.663350014+10:00\",\"TLSCipher\":\"TLS_AES_128_GCM_SHA256\",\"TLSVersion\":\"1.3\",\"entryPointName\":\"https\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2025-08-02T19:52:08+10:00\"}"
matched against this in traefik access log
{"ClientAddr":"100.64.0.8:51904","ClientHost":"100.64.0.8","ClientPort":"51904","ClientUsername":"-","DownstreamContentSize":365,"DownstreamStatus":200,"Duration":89154251,"OriginContentSize":365,"OriginDuration":88998039,"OriginStatus":200,"Overhead":156212,"RequestAddr":"apollo.internal","RequestContentSize":100,"RequestCount":114,"RequestHost":"apollo.internal","RequestMethod":"POST","RequestPath":"/plugins/unassigned.devices.preclear/include/Preclear.php","RequestPort":"-","RequestProtocol":"HTTP/2.0","RequestScheme":"https","RetryAttempts":0,"RouterName":"apollo@file","ServiceAddr":"10.0.0.100:8088","ServiceName":"apollo@file","ServiceURL":"http://10.0.0.100:8088/","StartLocal":"2025-08-02T19:52:08.663350014+10:00","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"https","level":"info","msg":"","time":"2025-08-02T19:52:08+10:00"}
chatgpt is saying that Crowdsec is receiving only a broken fragment of it:
line="clear/include/Preclear.php\",\"RequestPort\":\"-\",...
Which starts mid-string (clear/include/...)
instead of at the beginning ({...})
, and that’s why you get:
UnmarshalJSON : invalid character 'c' looking for beginning of value
Resolving Unmarshal JSON warnings
This has now been resolved. If you think this is a mistake please run
/unresolve
Resolved. Was an issue mounting traefik logs on unraid FUSE rather then directly on cache (which is where crowdsec had the logs mounted)