Closed g00g1 closed 1 year ago
@g00g1: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
It seems it crashed because CrowdSec the service isn't running where the explain was run.
It seems it crashed because CrowdSec the service isn't running where the explain was run.
It is running on that machine. When I run in inside default netns, it warns that binding to 127.0.0.1:6060 failed
But it got a connection refused from LAPI?
time="25-05-2023 14:01:20" level=error msg="error while performing request: dial tcp 127.0.0.1:8080: connect:
@LaurenceJJones, this is what I see when running without netns with running crowdsec daemon:
```console
admin@flopster /var/log $ sudo cscli explain --crowdsec /usr/local/bin/crowdsec -f /var/log/mail.log --type syslog
Password:
WARN[25-05-2023 14:17:43] log file contains 54923 lines. This may take lot of resources.
time="25-05-2023 14:17:43" level=info msg="single file mode : log_media=stdout daemonize=false"
time="25-05-2023 14:17:43" level=info msg="Enabled feature flags:
Okay I will have to find some time to replicate. Sorry to point this out Gentoo is not officially supported by us so we cannot guarantee any version of CrowdSec operates on it cause we have no tests to validate this.
Hello @g00g1,
I think I found the cause of this issue.
While we are working on a fix, you can workaround this by setting parser_routines
to 1 in your config and restarting crowdsec (note this will slow down a bit the parsing, which might or might not be acceptable in your case)
I thought @buixor had already pushed a fix for this? With the mutex locks?
What happened?
cscli crashed while running explain mode
What did you expect to happen?
cscli do not crash
How can we reproduce it (as minimally and precisely as possible)?
Details
```console admin@flopster /var/log $ sudo ip netns exec crowdsec-test cscli explain -f /var/log/mail.log --type syslog WARN[25-05-2023 14:01:19] log file contains 54885 lines. This may take lot of resources. time="25-05-2023 14:01:19" level=info msg="single file mode : log_media=stdout daemonize=false" time="25-05-2023 14:01:19" level=info msg="Enabled feature flags:"
time="25-05-2023 14:01:19" level=info msg="Crowdsec v1.5.1-linux-eddb994c0b48d77b34a3f22b719dc5716670d2ae"
time="25-05-2023 14:01:19" level=warning msg="MaxOpenConns is 0, defaulting to 100"
time="25-05-2023 14:01:19" level=info msg="Loading prometheus collectors"
time="25-05-2023 14:01:19" level=warning msg="Exprhelpers loaded without database client."
time="25-05-2023 14:01:19" level=info msg="Loading grok library /etc/crowdsec/patterns"
time="25-05-2023 14:01:20" level=info msg="Loading enrich plugins"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'GeoIpCity'"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'GeoIpASN'"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'IpToRange'"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'reverse_dns'"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'ParseDate'"
time="25-05-2023 14:01:20" level=info msg="Successfully registered enricher 'UnmarshalJSON'"
time="25-05-2023 14:01:20" level=info msg="Loading parsers from 14 files"
time="25-05-2023 14:01:20" level=info msg="Loaded 2 parser nodes" file=/etc/crowdsec/parsers/s00-raw/syslog-logs.yaml stage=s00-raw
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/dovecot-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/endlessh-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/nginx-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/postfix-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/postscreen-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/sshd-logs.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/zz-g00g1-dovecot.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s01-parse/zz-g00g1-nginx.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 3 parser nodes" file=/etc/crowdsec/parsers/s01-parse/zz-g00g1-postfix.yaml stage=s01-parse
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s02-enrich/dateparse-enrich.yaml stage=s02-enrich
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s02-enrich/geoip-enrich.yaml stage=s02-enrich
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s02-enrich/http-logs.yaml stage=s02-enrich
time="25-05-2023 14:01:20" level=info msg="Loaded 1 parser nodes" file=/etc/crowdsec/parsers/s02-enrich/whitelists.yaml stage=s02-enrich
time="25-05-2023 14:01:20" level=info msg="Loaded 17 nodes from 3 stages"
time="25-05-2023 14:01:20" level=info msg="No postoverflow parsers to load"
time="25-05-2023 14:01:20" level=info msg="Loading 42 scenario files"
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=cool-pond file=/etc/crowdsec/scenarios/vmware-vcenter-vmsa-2021-0027.yaml name=crowdsecurity/vmware-vcenter-vmsa-2021-0027
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=wild-feather file=/etc/crowdsec/scenarios/CVE-2022-37042.yaml name=crowdsecurity/CVE-2022-37042
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=hidden-morning file=/etc/crowdsec/scenarios/http-probing.yaml name=crowdsecurity/http-probing
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=purple-mountain file=/etc/crowdsec/scenarios/jira_cve-2021-26086.yaml name=crowdsecurity/jira_cve-2021-26086
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=crimson-snow file=/etc/crowdsec/scenarios/ssh-bf.yaml name=crowdsecurity/ssh-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=blue-pond file=/etc/crowdsec/scenarios/ssh-bf.yaml name=crowdsecurity/ssh-bf_user-enum
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=little-feather file=/etc/crowdsec/scenarios/pulse-secure-sslvpn-cve-2019-11510.yaml name=crowdsecurity/pulse-secure-sslvpn-cve-2019-11510
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=holy-voice file=/etc/crowdsec/scenarios/ssh-slow-bf.yaml name=crowdsecurity/ssh-slow-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=red-voice file=/etc/crowdsec/scenarios/ssh-slow-bf.yaml name=crowdsecurity/ssh-slow-bf_user-enum
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=billowing-voice file=/etc/crowdsec/scenarios/spring4shell_cve-2022-22965.yaml name=crowdsecurity/spring4shell_cve-2022-22965
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=solitary-firefly file=/etc/crowdsec/scenarios/http-backdoors-attempts.yaml name=crowdsecurity/http-backdoors-attempts
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=muddy-leaf file=/etc/crowdsec/scenarios/zz-g00g1-endlessh.yaml name=g00g1/endlessh-trap
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=shy-field file=/etc/crowdsec/scenarios/http-w00tw00t.yaml name=ltsich/http-w00tw00t
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=black-smoke file=/etc/crowdsec/scenarios/dovecot-spam.yaml name=crowdsecurity/dovecot-spam
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=polished-grass file=/etc/crowdsec/scenarios/thinkphp-cve-2018-20062.yaml name=crowdsecurity/thinkphp-cve-2018-20062
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=hidden-field file=/etc/crowdsec/scenarios/zz-g00g1-dovecot.yaml name=g00g1/dovecot-bf
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=small-voice file=/etc/crowdsec/scenarios/grafana-cve-2021-43798.yaml name=crowdsecurity/grafana-cve-2021-43798
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=aged-wildflower file=/etc/crowdsec/scenarios/CVE-2022-41082.yaml name=crowdsecurity/CVE-2022-41082
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=throbbing-hill file=/etc/crowdsec/scenarios/CVE-2022-44877.yaml name=crowdsecurity/CVE-2022-44877
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=young-silence file=/etc/crowdsec/scenarios/zz-g00g1-nginx.yaml name=g00g1/nginx-honeypot
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=bitter-hill file=/etc/crowdsec/scenarios/postfix-spam.yaml name=crowdsecurity/postfix-spam
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=dawn-wood file=/etc/crowdsec/scenarios/postfix-spam.yaml name=crowdsecurity/postscreen-rbl
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=restless-morning file=/etc/crowdsec/scenarios/http-sensitive-files.yaml name=crowdsecurity/http-sensitive-files
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=morning-fire file=/etc/crowdsec/scenarios/CVE-2022-26134.yaml name=crowdsecurity/CVE-2022-26134
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=spring-night file=/etc/crowdsec/scenarios/endlessh-bf.yaml name=crowdsecurity/endlessh-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=proud-river file=/etc/crowdsec/scenarios/http-xss-probing.yaml name=crowdsecurity/http-xss-probbing
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=blue-mountain file=/etc/crowdsec/scenarios/http-cve-2021-41773.yaml name=crowdsecurity/http-cve-2021-41773
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=sparkling-moon file=/etc/crowdsec/scenarios/fortinet-cve-2018-13379.yaml name=crowdsecurity/fortinet-cve-2018-13379
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=bold-forest file=/etc/crowdsec/scenarios/apache_log4j2_cve-2021-44228.yaml name=crowdsecurity/apache_log4j2_cve-2021-44228
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=billowing-sound file=/etc/crowdsec/scenarios/http-generic-bf.yaml name=crowdsecurity/http-generic-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=morning-glade file=/etc/crowdsec/scenarios/http-generic-bf.yaml name=LePresidente/http-generic-401-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=fragrant-sound file=/etc/crowdsec/scenarios/http-generic-bf.yaml name=LePresidente/http-generic-403-bf
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=red-field file=/etc/crowdsec/scenarios/CVE-2022-46169.yaml name=crowdsecurity/CVE-2022-46169-bf
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=bold-butterfly file=/etc/crowdsec/scenarios/CVE-2022-46169.yaml name=crowdsecurity/CVE-2022-46169-cmd
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=cool-meadow file=/etc/crowdsec/scenarios/nginx-req-limit-exceeded.yaml name=crowdsecurity/nginx-req-limit-exceeded
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=cool-thunder file=/etc/crowdsec/scenarios/zz-g00g1-postfix.yaml name=g00g1/postfix-bf
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=old-frost file=/etc/crowdsec/scenarios/zz-g00g1-postfix.yaml name=g00g1/postfix-spam
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=solitary-glade file=/etc/crowdsec/scenarios/CVE-2022-40684.yaml name=crowdsecurity/fortinet-cve-2022-40684
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=twilight-meadow file=/etc/crowdsec/scenarios/http-open-proxy.yaml name=crowdsecurity/http-open-proxy
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=long-feather file=/etc/crowdsec/scenarios/http-crawl-non_statics.yaml name=crowdsecurity/http-crawl-non_statics
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=ancient-voice file=/etc/crowdsec/scenarios/http-sqli-probing.yaml name=crowdsecurity/http-sqli-probbing-detection
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=spring-sky file=/etc/crowdsec/scenarios/f5-big-ip-cve-2020-5902.yaml name=crowdsecurity/f5-big-ip-cve-2020-5902
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=bitter-waterfall file=/etc/crowdsec/scenarios/http-path-traversal-probing.yaml name=crowdsecurity/http-path-traversal-probing
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=red-paper file=/etc/crowdsec/scenarios/vmware-cve-2022-22954.yaml name=crowdsecurity/vmware-cve-2022-22954
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=damp-paper file=/etc/crowdsec/scenarios/CVE-2019-18935.yaml name=crowdsecurity/CVE-2019-18935
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=polished-dawn file=/etc/crowdsec/scenarios/CVE-2022-42889.yaml name=crowdsecurity/CVE-2022-42889
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=red-night file=/etc/crowdsec/scenarios/CVE-2022-35914.yaml name=crowdsecurity/CVE-2022-35914
time="25-05-2023 14:01:20" level=info msg="Adding leaky bucket" cfg=ancient-meadow file=/etc/crowdsec/scenarios/CVE-2022-41697.yaml name=crowdsecurity/CVE-2022-41697
time="25-05-2023 14:01:20" level=info msg="Adding trigger bucket" cfg=proud-glade file=/etc/crowdsec/scenarios/http-cve-2021-42013.yaml name=crowdsecurity/http-cve-2021-42013
time="25-05-2023 14:01:20" level=warning msg="Loaded 49 scenarios"
time="25-05-2023 14:01:20" level=info msg="Adding file /var/log/mail.log to filelist" type="file:///var/log/mail.log"
time="25-05-2023 14:01:20" level=info msg="Starting processing data"
time="25-05-2023 14:01:20" level=info msg="reading /var/log/mail.log at once" type="file:///var/log/mail.log"
time="25-05-2023 14:01:20" level=error msg="error while performing request: dial tcp 127.0.0.1:8080: connect: connection refused; 4 retries left"
time="25-05-2023 14:01:20" level=info msg="retrying in 16 seconds (attempt 2 of 5)"
fatal error: concurrent map read and map write
goroutine 35 [running]:
github.com/crowdsecurity/crowdsec/pkg/parser.Parse({{_, _}, {_, _, _}, _, {_, _}}, {0x0, 0x1, ...}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/runtime.go:329 +0x1128
main.runParse(0xc000453920, 0xc0004538c0?, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/parse.go:33 +0x3a5
main.runCrowdsec.func1.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:57 +0xe8
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c82a0, 0xc002240050?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 1 [chan receive]:
main.Serve(0xc00221e3f0, 0x1?, 0x1e483e1?)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/serve.go:370 +0x7c5
main.StartRunSvc()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/run_in_svc.go:61 +0x3b5
main.main()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/main.go:336 +0x225
goroutine 50 [select]:
database/sql.(*DB).connectionOpener(0xc0021a1e10, {0x225e030, 0xc002240000})
database/sql/sql.go:1218 +0x8d
created by database/sql.OpenDB
database/sql/sql.go:791 +0x18d
goroutine 37 [runnable]:
github.com/crowdsecurity/crowdsec/pkg/parser.(*Node).process(0xc00198eab8, 0xc001bda000, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/node.go:284 +0xeab
github.com/crowdsecurity/crowdsec/pkg/parser.(*Node).process(0xc00198f320, 0xc001bda000, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/node.go:361 +0x1f85
github.com/crowdsecurity/crowdsec/pkg/parser.Parse({{_, _}, {_, _, _}, _, {_, _}}, {0x0, 0x1, ...}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/runtime.go:322 +0x102d
main.runParse(0xc000453920, 0xc0004538c0?, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/parse.go:33 +0x3a5
main.runCrowdsec.func1.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:57 +0xe8
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c82a0, 0xc002240050?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 36 [runnable]:
regexp.(*inputString).step(0xc000042390?, 0x6?)
regexp/regexp.go:391 +0x8d
regexp.(*machine).match(0xc0000422d0, {0x2260e80, 0xc000042390}, 0x0)
regexp/exec.go:237 +0x49d
regexp.(*Regexp).doExecute(0xc000d55900, {0x0?, 0x0}, {0x0, 0x0, 0x0}, {0xc001454d48, 0xba}, 0x4?, 0x13e, ...)
regexp/exec.go:542 +0x319
regexp.(*Regexp).FindStringSubmatch(0xc000d55900, {0xc001454d48, 0xba})
regexp/regexp.go:1046 +0x8f
github.com/crowdsecurity/grokky.(*PatternLegacy).Parse(0xc002285760, {0xc001454d48?, 0xc001f0fd50?})
github.com/crowdsecurity/grokky@v0.2.1/pattern_legacy.go:14 +0x45
github.com/crowdsecurity/crowdsec/pkg/parser.(*Node).process(0xc001f10ab8, 0xc00105a000, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/node.go:288 +0xf2d
github.com/crowdsecurity/crowdsec/pkg/parser.(*Node).process(0xc001f11320, 0xc00105a000, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/node.go:361 +0x1f85
github.com/crowdsecurity/crowdsec/pkg/parser.Parse({{_, _}, {_, _, _}, _, {_, _}}, {0x0, 0x1, ...}, ...)
github.com/crowdsecurity/crowdsec/pkg/parser/runtime.go:322 +0x102d
main.runParse(0xc000453920, 0xc0004538c0?, {{0xc001bea960, 0x0}, {0xc000dc41c0, 0x3, 0x4}, 0x1, {0xc0009f1920, 0x16}}, ...)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/parse.go:33 +0x3a5
main.runCrowdsec.func1.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:57 +0xe8
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c82a0, 0xc002240050?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 135 [chan send]:
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/file.(*FileSource).readFile(0xc00197c360, {0x7ffd52e0368e, 0x11}, 0x0?, 0x30c80c0)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/file/file.go:538 +0x8e8
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/file.(*FileSource).OneShotAcquisition(0xc00197c360, 0x24?, 0xc002152bd0?)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/file/file.go:267 +0x210
github.com/crowdsecurity/crowdsec/pkg/acquisition.StartAcquisition.func1()
github.com/crowdsecurity/crowdsec/pkg/acquisition/acquisition.go:320 +0x43b
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c80c0, 0xc00196ec00?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 38 [select]:
main.runPour(0xc0004538c0, {0xc0017a8000, 0x31, 0x49}, 0xc002e73050?, 0xc00221e3f0)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/pour.go:20 +0xfd
main.runCrowdsec.func2.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:83 +0x6c
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c8180, 0xc002240050?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 130 [chan receive]:
gopkg.in/tomb%2ev2.(*Tomb).Wait(0x30c80c0)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:126 +0x35
github.com/crowdsecurity/crowdsec/pkg/acquisition.StartAcquisition({0xc00196d420, 0x1, 0xc000082f30?}, 0xc000453920, 0x30c80c0)
github.com/crowdsecurity/crowdsec/pkg/acquisition/acquisition.go:332 +0x1ed
main.runCrowdsec(0xc00221e3f0, 0xc002d54300)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:125 +0x32d
main.serveCrowdsec.func1.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:141 +0xe5
created by main.serveCrowdsec.func1
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:136 +0xd8
goroutine 16 [select]:
main.waitOnTomb()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:227 +0x7d
main.serveCrowdsec.func1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:150 +0xdd
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c81e0, 0xc002240050?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
goroutine 114 [IO wait]:
internal/poll.runtime_pollWait(0x7f5f2024ed00, 0x72)
runtime/netpoll.go:306 +0x89
internal/poll.(*pollDesc).wait(0xc001696000?, 0xc000083c80?, 0x0)
internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc001696000)
internal/poll/fd_unix.go:614 +0x2bd
net.(*netFD).accept(0xc001696000)
net/fd_unix.go:172 +0x35
net.(*TCPListener).accept(0xc0021ae468)
net/tcpsock_posix.go:148 +0x25
net.(*TCPListener).Accept(0xc0021ae468)
net/tcpsock.go:297 +0x3d
net/http.(*Server).Serve(0xc0016460f0, {0x225c700, 0xc0021ae468})
net/http/server.go:3059 +0x385
net/http.(*Server).ListenAndServe(0xc0016460f0)
net/http/server.go:2988 +0x7d
net/http.ListenAndServe(...)
net/http/server.go:3242
main.servePrometheus(0xc001b9eff0, 0xc00227b3e0?, 0x2260a40?, 0xc00227b3e0?)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/metrics.go:196 +0x1fc
created by main.StartRunSvc
github.com/crowdsecurity/crowdsec/cmd/crowdsec/run_in_svc.go:59 +0x398
goroutine 146 [select]:
github.com/crowdsecurity/crowdsec/pkg/apiclient.retryRoundTripper.RoundTrip({{0x224d140, 0x2faa240}, 0x5, {0xc000376030, 0x3, 0x3}, 0x1, 0x0}, 0xc00201a300)
github.com/crowdsecurity/crowdsec/pkg/apiclient/auth.go:108 +0x250
github.com/crowdsecurity/crowdsec/pkg/apiclient.retryRoundTripper.RoundTrip({{0x2249e40, 0xc0020040c0}, 0x2, {0xc000618140, 0x2, 0x2}, 0x0, 0xc002000160}, 0xc00201a200)
github.com/crowdsecurity/crowdsec/pkg/apiclient/auth.go:118 +0x2ae
github.com/crowdsecurity/crowdsec/pkg/apiclient.(*JWTTransport).RoundTrip(0xc0010800a0, 0xc00201a200)
github.com/crowdsecurity/crowdsec/pkg/apiclient/auth.go:258 +0x54d
net/http.send(0xc00201a200, {0x2249e20, 0xc0010800a0}, {0x8?, 0x1de4bc0?, 0x0?})
net/http/client.go:252 +0x5f7
net/http.(*Client).send(0xc00131e000, 0xc00201a200, {0x4053d4?, 0x9?, 0x0?})
net/http/client.go:176 +0x9b
net/http.(*Client).do(0xc00131e000, 0xc00201a200)
net/http/client.go:716 +0x8fb
net/http.(*Client).Do(...)
net/http/client.go:582
github.com/crowdsecurity/crowdsec/pkg/apiclient.(*ApiClient).Do(0xc00200e080, {0x225e068, 0xc0000460b0}, 0xc00201a100, {0x1c4a0a0, 0xc00131e060})
github.com/crowdsecurity/crowdsec/pkg/apiclient/client_http.go:65 +0x325
github.com/crowdsecurity/crowdsec/pkg/apiclient.(*AuthService).AuthenticateWatcher(0xc00200e088, {0x225e068, 0xc0000460b0}, {0xc001a84020, 0xc002000010, {0xc000075400, 0x2a, 0x40}})
github.com/crowdsecurity/crowdsec/pkg/apiclient/auth_service.go:63 +0x1a5
main.runOutput(0xc0004538c0?, 0xc000535860, 0xc002e73050, {{0xc0004cc8d0, 0x0}, {0x0, 0x0, 0x0}, 0x1, {0xc0009f1920, ...}}, ...)
github.com/crowdsecurity/crowdsec/cmd/crowdsec/output.go:100 +0x68e
main.runCrowdsec.func3.1()
github.com/crowdsecurity/crowdsec/cmd/crowdsec/crowdsec.go:101 +0x166
gopkg.in/tomb%2ev2.(*Tomb).run(0x30c8240, 0xc00227b3e0?)
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:159 +0xee
FATA[25-05-2023 14:01:20] fail to run crowdsec for test: exit status 2
```
Anything else we need to know?
No response
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
Details
```console $ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/* filenames: - /var/log/auth.log labels: type: syslog --- filenames: - /var/log/mail.log labels: type: syslog --- filenames: - /var/log/endlessh.log labels: type: endlessh --- filenames: - /var/log/nginx-trap.log labels: type: nginx-custom --- filenames: - /var/log/nginx/*_log labels: type: nginx --- cat: '/etc/crowdsec/acquis.d/*': No such file or directory ```
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.