Crowdsec

Started by phantomsfbw, May 11, 2022, 03:36:35 AM

Previous topic - Next topic
May 19, 2022, 02:44:23 PM #15 Last Edit: May 19, 2022, 03:07:22 PM by mmetc
Quote from: phantomsfbw on May 17, 2022, 02:05:54 AM
No joy in my attempt at a 3rd installation.  I removed all three packages; Made sure the Aliases have been deleted from the Firewall.  Then reinstalled in the files in the order specified.  Checked the blocks in the setting tab to get it started.  In the Overview there is a Red X in the Crowdsec service and a Green Check Mark in the Bouncer service. 

I don't get it.  It worked fine before this last update....

Hi, I'm the author of the plugin.

You can tail /var/log/crowdsec/crowdsec.log to see why the service dies.

If you don't switch to the development repository, which I guess is your case, the old version should still work, even if you upgraded the binaries to 1.3.3 or 1.3.4. The plugin itself will be updated when it hits the "community" repository.

If you want to use the version in the -devel repository, you can:

- activate the development repository in Firmware -> Settings (nb this updates way more than crowdsec)
- remove the three packages if you have installed them by hand (os-crowdsec, crowdsec, crowdsec-firewall-bouncer). It is better to remove them by hand to avoid any conflict or version mismatch and allow them to be removed at once when you eventually remove the plugin. Otherwise the plugin is removed and the binaries are not.
- Install os-crowdsec-devel 0.2.

It worked for me but if a service is down after the upgrade, I'd like to know more from the log files. No manual intervention to the system/configuration files is necessary.

mmetc, I went and removed the three crowdsec files then moved over to the developer settings.  Reinstalled  Crowdsec using the 0.2 plugin and same problem.  Overview shows a Red X in the Service Status and a Green Checkmark in the Firewall Bouncer.  Pulled the crowdsec.log and attached are the contents:

As an aside, moving to the Opnsense developer trashed Zenarmor with a fatal error concerning Phalcon not found so beware anyone taking this route.



Quote from: phantomsfbw on May 20, 2022, 01:16:56 AM
mmetc, I went and removed the three crowdsec files then moved over to the developer settings.  Reinstalled  Crowdsec using the 0.2 plugin and same problem.  Overview shows a Red X in the Service Status and a Green Checkmark in the Firewall Bouncer.  Pulled the crowdsec.log and attached are the contents:

It seems like your sqlite database was manually removed ( /var/db/crowdsec/data/crowdsec.db ) without removing /usr/local/etc/crowdsec at the same time.  So it looks for an agent, referenced in the configuration, that does not exist in the db.

You can remove the packages, remove these directories as well, and reinstall. Or see what "cscli machines list" says and fix the configuration

Quote
As an aside, moving to the Opnsense developer trashed Zenarmor with a fatal error concerning Phalcon not found so beware anyone taking this route.

Of course.

Quote from: RamSense on May 13, 2022, 08:07:31 AM
thnx! pkg install os-crowdsec-devel
and all is ok running os-crowdsec-devel-0.2

This solved for me the problem !