Warning "sqlite without WAL...." and cannot update community blocklist

Hi Team Crowdsec,

I upgraded version from 1.3.8 β†’ 1.4.2. I restart crowdsec and see warning. How can i fix it ?
I new user so i cant attach image to topic :smiling_face_with_tear:

crowdsec[89142]: time=β€œ2022-11-24T23:39:04+07:00” level=warning msg=β€œYou are using sqlite without WAL, this can have a…warning.”
Nov 24 23:39:04 : time=β€œ2022-11-24T23:39:04+07:00” level=warning msg=β€œDeprecation warning: the pid_dir config can be sa…required”
Nov 24 23:39:05 time=β€œ2022-11-24T23:39:05+07:00” level=warning msg=β€œYou are using sqlite without WAL, this can have a…warning.”
Nov 24 23:39:05 time=β€œ2022-11-24T23:39:05+07:00” level=warning msg=β€œDeprecation warning: the pid_dir config can be sa…required”

Crowdsec log
time=β€œ25-11-2022 01:39:26” level=info msg=β€œStarting community-blocklist update”
time=β€œ25-11-2022 01:39:35” level=info msg=β€œcapi/community-blocklist : 0 explicit deletions”
time=β€œ25-11-2022 01:39:35” level=warning msg=β€œsqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist”
time=β€œ25-11-2022 01:39:36” level=info msg=β€œcrowdsecurity/community-blocklist : added 18890 entries, deleted 0 entries (alert:6)”
time=β€œ25-11-2022 01:43:54” level=info msg=β€œcapi metrics: metrics sent successfully”

Alerts dont see update community blocklist

ID β”‚ value β”‚ reason β”‚ country β”‚ as β”‚ decisions β”‚ created_at β”‚
β”œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 5 β”‚ Ip:185.234.75.159 β”‚ crowdsecurity/http-open-proxy β”‚ US β”‚ 7489 HostUS β”‚ ban:1 β”‚ 2022-11-24 17:44:42.761322964 +0000 UTC β”‚
β”‚ 4 β”‚ Ip:103.131.71.127 β”‚ crowdsecurity/http-bad-user-agent β”‚ VN β”‚ 45899 VNPT Corp β”‚ ban:1 β”‚ 2022-11-24 16:49:39.709134511 +0000 UTC β”‚
β”‚ 3 β”‚ Ip:103.131.71.147 β”‚ crowdsecurity/http-bad-user-agent β”‚ VN β”‚ 45899 VNPT Corp β”‚ ban:1 β”‚ 2022-11-24 16:49:30.1803368 +0000 UTC β”‚
β”‚ 2 β”‚ Ip:103.131.71.145 β”‚ crowdsecurity/http-bad-user-agent β”‚ VN β”‚ 45899 VNPT Corp β”‚ ban:1 β”‚ 2022-11-24 16:49:26.169507244 +0000 UTC β”‚
β”‚ 1 β”‚ Ip:103.131.71.160 β”‚ crowdsecurity/http-bad-user-agent β”‚ VN β”‚ 45899 VNPT Corp β”‚ ban:1 β”‚ 2022-11-24 16:49:22.158959268 +0000 UTC β”‚

Hi,

About WAL: you can insert the following line in /etc/crowdsec/config.yaml, section db_config:

use_wal: true

Then restart Crowdsec using systemctl restart crowdsec.

2 Likes

Hi Smu44,

Thanks so much. With your guide, my problem’s gone :laughing:

i have same issue .Thankyou

Hi,
I have the same issue in opnsense, how I can set use_wal:true there.
Thank you

Hi, thankyou.
Ok, but where I do do this?
Sincerely I don’t now how to edit the config.yaml file in my installation i.e opnsense

You should be able to ssh into the machine?

Hi Cyrille37, Hi iiAmLoz, Hi everyone,
I have test the path with the shell of Opnsense, I don’t found any directory named Crowdsec.

Hi Cyrille37, I looked in /etc in opnsense no trace of Crowdsec.

Opnsense is abit different so it should be

/usr/local/etc/crowdsec/

Hi iiAmLoz,
Thanks for your assistance, I have edited the config.yaml in /usr/local/etc/crowdsec/ folder, bat I don’t found use_wal: in the db_config; section, that’s whay I have added it, I have restarted Crwodsec with the GUI, systemctl restart crowdsec don’t work with my consol.
Now it returns :
FATA[10-05-2023 10:51:54] /usr/local/etc/crowdsec/config.yaml: yaml: line 45: did not find expected key

When I try β€œcscli bouncers list” or "cscli decisions list -a " commands

So the yaml should look like

db_config:
  use_wal: true

Please note the indentation matters

Hi iiAmLoz, Hi everyone,

All think is ok, thankyou very much.