crowdsecurity / example-docker-compose

Example integration of crowdsec in docker-compose
106 stars 25 forks source link

Not modified yet and crowdsecurity/crowdsec:v1.0.8 keep restarting #3

Closed MrShippeR closed 3 years ago

MrShippeR commented 3 years ago

Hello, I'm asking for help with issue. I just clone repository and make command $docker-compose up -d. App has installed and 3 of 4 apps are running healthy. Container crowdsecurity/crowdsec:v1.0.8 keep restarting. Here is log of that container:

$docker ps

CONTAINER ID   IMAGE                           COMMAND                  CREATED          STATUS                          PORTS                                       NAMES
385d106e3f73   crowdsec_dashboard              "/app/run_metabase.sh"   19 minutes ago   Up 19 minutes                   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp   crowdsec_dashboard_1
35e4119c4fb3   crowdsecurity/crowdsec:v1.0.8   "/bin/sh -c '/bin/sh…"   19 minutes ago   Restarting (1) 20 seconds ago                                               crowdsec_crowdsec_1
0240324c7776   nginx:alpine                    "/docker-entrypoint.…"   19 minutes ago   Up 19 minutes                   0.0.0.0:8000->80/tcp, :::8000->80/tcp       crowdsec_reverse-proxy_1
3726be67d541   httpd:alpine                    "httpd-foreground"       19 minutes ago   Up 19 minutes                   80/tcp                                      crowdsec_app_1
$docker logs crowdsec_crowdsec_1

time="10-09-2021 18:09:57" level=info msg="Crowdsec v1.0.8-docker-6f8b6cdb4293bd04169e5ff2c68d54309e735d9c"
time="10-09-2021 18:09:57" level=info msg="Loading prometheus collectors"
time="10-09-2021 18:09:57" level=info msg="Loading CAPI pusher"
time="10-09-2021 18:09:57" level=info msg="start crowdsec api push (interval: 30s)"
time="10-09-2021 18:09:57" level=info msg="start crowdsec api pull (interval: 2h)"
time="10-09-2021 18:09:57" level=warning msg="scenario list is empty, will not pull yet"
time="10-09-2021 18:09:57" level=info msg="start crowdsec api send metrics (interval: 30m)"
time="10-09-2021 18:09:57" level=info msg="Loading grok library /etc/crowdsec//patterns/"
time="10-09-2021 18:09:58" level=info msg="Loading enrich plugins"
time="10-09-2021 18:09:58" level=info msg="Loading parsers 6 stages"
time="10-09-2021 18:09:58" level=error msg="Statics Compilation failed type types.Line has no field Module (1:10)\n | evt.Line.Module\n | .........^." id=young-shadow name=crowdsecurity/syslog-logs stage=s00-raw
time="10-09-2021 18:09:58" level=fatal msg="crowdsec init: Failed to load parsers: failed to load parser config : failed to compile node 'crowdsecurity/syslog-logs' in '/etc/crowdsec/parsers/s00-raw/syslog-logs.yaml' : type types.Line has no field Module (1:10)\n | evt.Line.Module\n | .........^"

Can you please help me to solve it? Thank you.

buixor commented 3 years ago

Hello,

There was a bug in the docker image where older versions would pull the latest version of the hub and end up with invalid configurations as you faced. We have fixed/republished the docker images yesterday, so it should now be good.

Please re-open the issue if you see the issue again, thanks !

jgwehr commented 2 years ago

edit: having the same issue, which seems related to #5

I've just followed the instructions here; the CrowdSec container keeps restarting.

A warning is sent in the logs:

Crowdsec is not the latest version. Current version is v1.0.8' and latest version is 'v1.2.0'. Please update it!

A fatal is then sent:

Failed to get Hub index : failed to download index: bad http code 404 while requesting http://raw.githubusercontent.com/crowdsecurity/hub/v1.0.8/index.json

It continues a bit, and then issues another fatal log, before restarting:

crowdsec init: Failed to load parsers: failed to load parser config : failed to compile node 'crwodsecurity/sys-logs' ....

I noticed the current master has locked in :v1.0.8 and removed this. This allowed the full compose to start (and remain up); Metabase and other health checks worked fine.