connect: connection refused

Hello everyone ! I want to create my own firewall with a raspberry pi 4, and I thought why not use crowdsec ? So I have install it with apt-get (on kali linux my favorite) no problem. But when I want to start it, it display me this :

Job for crowdsec.service failed because the control process exited with error code.
See "systemctl status crowdsec.service" and "journalctl -xeu crowdsec.service" for details.

And when I try to use the cscli :

cscli decisions list                              
FATA[25-02-2022 09:26:46 AM] Unable to list decisions : performing request: Get "": could not get jwt token: Post "": dial tcp connect: connection refused 

Also for add machine :

sudo cscli machines add -a                        
FATA[25-02-2022 09:28:19 AM] unable to create new database client: failed creating schema resources: sql/schema: invalid type "INTEGER" for column "events_count"

Can you help me please ?

This is why it doesn’t work. You need to dig into the logs to see why the CrowdSec agent won’t start. I don’t know it it’s related to Kali Linux. But you should try installing on Raspberry Pi OS instead and see if that makes a difference.