-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker container requires restart right after creation #3114
Comments
@Simbiat: Thanks for opening an issue, it is currently awaiting triage. In the meantime, you can:
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
Struggling to replicate the issue, could be an external factor (onedrive sync) or WSL specific. The files are not created before the collection is installed, within the staging directory is everything for Logs within details:
|
Here are my logs
And then from the log file:
I do not think it's related to OneDrive, it looks like you did not clear the data directory, because you have
in your logs, and I get similar entries only after 2nd launch of container. If data folder is empty at the time of container launch, you will get appropriate warnings. |
So here is my compose, I dont use volume I just specified a services:
crowdsec:
container_name: crowdsec
image: crowdsecurity/crowdsec:v1.6.2
restart: unless-stopped
environment:
GID: 1000
COLLECTIONS: crowdsecurity/caddy crowdsecurity/whitelist-good-actors crowdsecurity/http-cve crowdsecurity/http-dos crowdsecurity/base-http-scenarios crowdsecurity/appsec-crs crowdsecurity/appsec-generic-rules crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-wordpress crowdsecurity/wordpress crowdsecurity/discord-crawler-whitelist
volumes:
- ./test/:/var/lib/crowdsec/data/:rw
#Required to read syslog. This will be valid only on UNIX
- /var/log/:/var/log/:ro
#Caddy logs folder is RW, because we're also writing Crowdsec logs here
- ./logs:/usr/local/logs/:rw
security_opt:
- no-new-privileges=true
healthcheck:
test: [ "CMD", "cscli", "lapi", "status" ]
start_period: 120s
interval: 10s
timeout: 5s
retries: 3 Disk check to see there is no test folder
Same cant replicate: but what do you mean from When the directory is empty you get logs stating it will download them
The wording |
My
when configs are being copied. Some difference in the image? |
Managed to replicate the error by setting
let me dig further |
If it will help, my configs are in https://github.com/Simbiat/simbiat.ru/tree/master/config/crowdsec |
Right we managed to find the cause and it is indeed a bug ✨ thank you for reporting it, but TLDR; is when we decided to ship all the hub files using rsync there was an oversight in this, when the file exists in the |
That's somewhat similar to what I was wondering in relationship to
then. Documentation kind of suggests, that using a |
What happened?
When creating Docker container for the first time, you can see some warnings/errors in logs like
Not sure about the first one, but the rest seem strange, because these files are created in
staging
before we get to this point (or at least it looks that way), and copying of the files from there should be happening after collections installation, if I am readingdocker_start.sh
correctly.As result to truly utilize the container I am forced to restart it (or at the least the CrowdSec service). Technically, the same is required in case I update Docker Compose and add/remove some collections/parsers/configs. Need for restart may not be obvious, though, if the output if I do
up -d
, and the output from CrowdSec goes to container, instead of file. And technically, this should not even be required, since the service is not even up yet.What did you expect to happen?
The
should happen after components installation/removal, that is after
How can we reproduce it (as minimally and precisely as possible)?
Have a docker compose service like this:
Create and start the container
Anything else we need to know?
No response
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
Config show
Prometheus metrics
N/A
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
N/A
The text was updated successfully, but these errors were encountered: