crowdsecurity / cs-cloudflare-bouncer

A CrowdSec Bouncer that syncs the decisions made by CrowdSec with CloudFlare's firewall. Manages multi user, multi account, multi zone setup. Supports IP, Country and AS scoped decisions.
MIT License
50 stars 7 forks source link

Job for crowdsec-cloudflare-bouncer.service failed because the control process exited with error code. #100

Closed nhtahoe closed 2 years ago

nhtahoe commented 2 years ago

I followed the instructions at https://docs.crowdsec.net/docs/bouncers/cloudflare/ for RHEL/Centos/Fedora.

sudo yum install crowdsec-cloudflare-bouncer worked and the bouncer installed just fine

I then ran the commands to setup the bouncer, and everything appeared to work, but it failed when I ran sudo systemctl start crowdsec-cloudflare-bouncer with the following message:

 sudo systemctl start crowdsec-cloudflare-bouncer
Job for crowdsec-cloudflare-bouncer.service failed because the control process exited with error code.
See "systemctl status crowdsec-cloudflare-bouncer.service" and "journalctl -xe" for details.

I ran systemctl status crowdsec-cloudflare-bouncer.service and got the following output:

crowdsec-cloudflare-bouncer.service - CrowdSec bouncer for cloudflare
   Loaded: loaded (/usr/lib/systemd/system/crowdsec-cloudflare-bouncer.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2022-06-07 15:05:12 -01; 10s ago
  Process: 3530558 ExecStart=/usr/bin/crowdsec-cloudflare-bouncer -c /etc/crowdsec//crowdsec-cloudflare-bouncer.yaml (code=exited, status=1/FAILURE)
 Main PID: 3530558 (code=exited, status=1/FAILURE)

Jun 07 15:05:12 example.com systemd[1]: Starting CrowdSec bouncer for cloudflare...
Jun 07 15:05:12 example.com crowdsec-cloudflare-bouncer[3530558]: time="2022-06-07T15:05:12-01:00" level=fatal msg="failed to read /etc/crowdsec//crowdsec-cloudflare-bouncer.yaml :>
Jun 07 15:05:12 example.com systemd[1]: crowdsec-cloudflare-bouncer.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 15:05:12 example.com systemd[1]: crowdsec-cloudflare-bouncer.service: Failed with result 'exit-code'.
Jun 07 15:05:12 example.com systemd[1]: Failed to start CrowdSec bouncer for cloudflare.

Not sure what is going on. Any ideas?

The path to the .yaml file seems problematic with the double forward slash: Process: 3530558 ExecStart=/usr/bin/crowdsec-cloudflare-bouncer -c /etc/crowdsec//crowdsec-cloudflare-bouncer.yaml

sbs2001 commented 2 years ago

@nhtahoe yes this will be fixed in next release via https://github.com/crowdsecurity/cs-cloudflare-bouncer/pull/97

nhtahoe commented 2 years ago

Thanks @sbs2001 - ETA on when the next release will happen?

AlteredCoder commented 2 years ago

Hello, it will be today or tomorrow.

sbs2001 commented 2 years ago

Closing as this has been fixed in >= 0.1.0