Skip to content
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

Redis Log without log-rotate #78

Open
idev opened this issue Jul 25, 2019 · 5 comments
Open

Redis Log without log-rotate #78

idev opened this issue Jul 25, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@idev
Copy link

idev commented Jul 25, 2019

Hello,

we identified a log which grow (and still is growing) to 22 GB.

Log File seems to be from the redis container:
a2e6544627ee17f8ebe3aa85432296e84308fa362e2613ddf0b6514a95f59bf7-json.log

last few entries:
`{"log":"1:M 23 Jul 2019 10:19:35.569 # Background AOF rewrite terminated with error\n","stream":"stdout","time":"2019-07-23T10:19:35.569321238Z"}
{"log":"1:M 23 Jul 2019 10:19:35.669 * Starting automatic rewriting of AOF on 262479% growth\n","stream":"stdout","time":"2019-07-23T10:19:35.669917108Z"}
{"log":"1:M 23 Jul 2019 10:19:35.674 * Background append only file rewriting started by pid 16547\n","stream":"stdout","time":"2019-07-23T10:19:35.674740779Z"}
{"log":"16547:C 23 Jul 2019 10:19:35.674 # Opening the temp file for AOF rewrite in rewriteAppendOnlyFile(): Permission denied\n","stream":"stdout","time":"2019-07-23T10:19:35.674770152Z"}
{"log":"1:M 23 Jul 2019 10:19:35.775 # Background AOF rewrite terminated with error\n","stream":"stdout","time":"2019-07-23T10:19:35.775292049Z"}
{"log":"1:M 23 Jul 2019 10:19:35.875 * Starting automatic rewriting of AOF on 262479% growth\n","stream":"stdout","time":"2019-07-23T10:19:35.875845499Z"}
{"log":"1:M 23 Jul 2019 10:19:35.881 * Background append only file rewriting started by pid 16548\n","stream":"stdout","time":"2019-07-23T10:19:35.881380514Z"}
{"log":"16548:C 23 Jul 2019 10:19:35.881 # Opening the temp file for AOF rewrite in rewriteAppendOnlyFile(): Permission denied\n","stream":"stdout","time":"2019-07-23T10:19:35.881541614Z"}
{"log":"1:M 23 Jul 2019 10:19:35.981 # Background AOF rewrite terminated with error\n","stream":"stdout","time":"2019-07-23T10:19:35.981993017Z"}
{"log":"1:M 23 Jul 2019 10:19:36.083 * Starting automatic rewriting of AOF on 262479% growth\n","stream":"stdout","time":"2019-07-23T10:19:36.083339357Z"}
{"log":"1:M 23 Jul 2019 10:19:36.087 * Background append only file rewriting started by pid 16549\n","stream":"stdout","time":"2019-07-23T10:19:36.087995192Z"}
{"log":"16549:C 23 Jul 2019 10:19:36.087 # Opening the temp file for AOF rewrite in rewriteAppendOnlyFile(): Permission denied\n","stream":"stdout","time":"2019-07-23T10:19:36.089309445Z"}
{"log":"1:M 23 Jul 2019 10:19:36.188 # Background AOF rewrite terminated with error\n","stream":"stdout","time":"2019-07-23T10:19:36.18858401Z"}
{"log":"1:M 23 Jul 2019 10:19:36.288 * Starting automatic rewriting of AOF on 262479% growth\n","stream":"stdout","time":"2019-07-23T10:19:36.294436515Z"}
{"log":"1:M 23 Jul 2019 10:19:36.293 * Background append only file rewriting started by pid 16550\n","stream":"stdout","time":"2019-07-23T10:19:36.294532578Z"}
{"log":"16550:C 23 Jul 2019 10:19:36.294 # Opening the temp file for AOF rewrite in rewriteAppendOnlyFile(): Permission denied\n","stream":"stdout","time":"2019-07-23T10:19:36.294549359Z"}
{"log":"1:signal-handler (1563877176) Received SIGTERM scheduling shutdown...\n","stream":"stdout","time":"2019-07-23T10:19:36.373753739Z"}
{"log":"1:M 23 Jul 2019 10:19:36.394 # User requested shutdown...\n","stream":"stdout","time":"2019-07-23T10:19:36.402955923Z"}
{"log":"1:M 23 Jul 2019 10:19:36.394 # There is a child rewriting the AOF. Killing it!\n","stream":"stdout","time":"2019-07-23T10:19:36.402998044Z"}
{"log":"1:M 23 Jul 2019 10:19:36.394 * Calling fsync() on the AOF file.\n","stream":"stdout","time":"2019-07-23T10:19:36.403004901Z"}
{"log":"1:M 23 Jul 2019 10:19:36.394 # Redis is now ready to exit, bye bye...\n","stream":"stdout","time":"2019-07-23T10:19:36.403009592Z"}
{"log":"1:C 23 Jul 2019 10:20:21.028 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo\n","stream":"stdout","time":"2019-07-23T10:20:21.028509079Z"}
{"log":"1:C 23 Jul 2019 10:20:21.028 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=1, just started\n","stream":"stdout","time":"2019-07-23T10:20:21.036454065Z"}
{"log":"1:C 23 Jul 2019 10:20:21.028 # Configuration loaded\n","stream":"stdout","time":"2019-07-23T10:20:21.03647338Z"}
{"log":"1:M 23 Jul 2019 10:20:21.029 * Running mode=standalone, port=6379.\n","stream":"stdout","time":"2019-07-23T10:20:21.036482606Z"}
{"log":"1:M 23 Jul 2019 10:20:21.029 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.\n","stream":"stdout","time":"2019-07-23T10:20:21.036487174Z"}
{"log":"1:M 23 Jul 2019 10:20:21.029 # Server initialized\n","stream":"stdout","time":"2019-07-23T10:20:21.036494051Z"}
{"log":"1:M 23 Jul 2019 10:20:21.029 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.\n","stream":"stdout","time":"2019-07-23T10:20:21.036498002Z"}
{"log":"1:M 23 Jul 2019 10:47:19.678 * DB loaded from append only file: 1618.647 seconds\n","stream":"stdout","time":"2019-07-23T10:47:19.78794494Z"}
{"log":"1:M 23 Jul 2019 10:47:19.679 * Ready to accept connections\n","stream":"stdout","time":"2019-07-23T10:47:19.808241437Z"}

`

Maybe there is some problem with the redis instance, or log-rotate is missing.

Kind regards

@8ear
Copy link
Contributor

8ear commented Jul 26, 2019

Thanks four your issue. I will look at this.
In which timespan does the log grow to 22GB?

@8ear 8ear self-assigned this Jul 26, 2019
@8ear 8ear added the bug Something isn't working label Jul 26, 2019
@idev
Copy link
Author

idev commented Jul 26, 2019

Thanks four your issue. I will look at this.
In which timespan does the log grow to 22GB?

Don't really know, we just noticed the unusual growing disk space.

@idev
Copy link
Author

idev commented Jul 26, 2019

Forgot to ask, if it is a problem to delete the file?

@8ear
Copy link
Contributor

8ear commented Jul 29, 2019

Hi Sorry for my late reply.
Normally it is no problem. But the best way is to replace the redis docker container.
docker exec -ti misp-robot bash -c "docker-compose -f /srv/MISP-dockerized/current/docker-compose.yml -f /srv/MISP-dockerized/current/docker-compose.override.yml up -d --force-recreate misp-redis"

This should use the misp-robot container to recreate the misp-redis container with the help of docker-compose.

@8ear
Copy link
Contributor

8ear commented Oct 4, 2019

Hi @idev,
I'm sorry to inform you, but I can't fix this issue in this repository.
It is unclear if this development can be integrated into MISP/MISP repository or any other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants