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

[bitnami/redis] Can't find log file on Unraid #78286

Open
Cnote43 opened this issue Feb 21, 2025 · 3 comments
Open

[bitnami/redis] Can't find log file on Unraid #78286

Cnote43 opened this issue Feb 21, 2025 · 3 comments
Assignees
Labels
redis tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@Cnote43
Copy link

Cnote43 commented Feb 21, 2025

Name and Version

bitnami/redis

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. On Unraid 6.12.13 and 7.0.0. I'm trying to troubleshoot a problem with Authelia, where the redis authentication key is getting deleted before its TTL, but I can't do that without a redis log file.

  2. With the default config file

  3. Run this:

docker run
  -d
  --name='redis'
  --net='bridge-network'
  --pids-limit 2048
  -e TZ="America/Denver"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="hostname"
  -e HOST_CONTAINERNAME="redis"
  -e 'ALLOW_EMPTY_PASSWORD'='no'
  -e 'REDIS_PASSWORD'='redis_password'
  -e 'REDIS_EXTRA_FLAGS'='--auto-aof-rewrite-percentage 100
  --auto-aof-rewrite-min-size 64mb'
  -e 'REDIS_LOG_DIR'='/logs'
  -e 'REDIS_LOG_FILE'='redis.log'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/redis.png'
  -p '6379:6379/tcp'
  -v '/mnt/user/appdata/redis':'/bitnami/redis/data':'rw' 'bitnami/redis:latest'
541ea19a6b231ca157dce63295913f9b9fef70efa9cb404994fd5f4cc9a64f82
  1. Error: I can't find a log file inside the container or in the mapped volume. I don't have a log server and would rather not spin one up just for this purpose if it's possible to just get a log file created that I can view. I'm sure this is a config problem on my part but I haven't been able to make it work.

What is the expected behavior?

To have a log file created.

What do you see instead?

No log file found.

Additional information

No response

@Cnote43 Cnote43 added the tech-issues The user has a technical issue about an application label Feb 21, 2025
@github-actions github-actions bot added the triage Triage is needed label Feb 21, 2025
@javsalgar javsalgar changed the title Can't find log file on Unraid [bitnami/redis] Can't find log file on Unraid Feb 24, 2025
@javsalgar
Copy link
Contributor

Hi!

With this

  -e 'REDIS_LOG_DIR'='/logs'
  -e 'REDIS_LOG_FILE'='redis.log'

It would be writing at /logs/redis.log, are you mounting a volume there?

@Cnote43
Copy link
Author

Cnote43 commented Feb 24, 2025

Thanks for trying to help. I figured this was a config issue. I wasn't previously mounting a volume for /logs, but I think I am now. I've got:

-v '/mnt/user/appdata/redis/logs/':'/logs':'rw'

But no log file is showing up there. Is that the wrong way to map the volume?

@javsalgar
Copy link
Contributor

I believe the reason is this

redis_conf_set logfile "" # Log to stdout

This is set in the container postunpack.sh because, in containers, the best practice is to log to stdout. For your use case, you may need to edit the redis.conf file and change that setting. You can mount your own configuration file as explained here https://github.com/bitnami/containers/tree/main/bitnami/redis#configuration-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
redis tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants