Redis template throws "permission denied" error

When using the redis.template.yml on rebuild in a setup with separate containers (web_only, data), i see

...
/.launcher rebuild web_only

I, [2022-04-01T06:14:05.621316 #1]  INFO -- : End of custom commands
I, [2022-04-01T06:14:05.621524 #1]  INFO -- : Terminating async processes
I, [2022-04-01T06:14:05.621574 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 29
29:signal-handler (1648793645) Received SIGTERM scheduling shutdown...
29:M 01 Apr 2022 06:14:05.643 # User requested shutdown...
29:M 01 Apr 2022 06:14:05.643 * Saving the final RDB snapshot before exiting.
29:M 01 Apr 2022 06:14:05.896 # Failed opening the RDB file dump.rdb (in server root dir /) for saving: Permission denied
29:M 01 Apr 2022 06:14:05.896 # Error trying to save the DB, can't exit.
29:M 01 Apr 2022 06:14:05.896 # SIGTERM received but errors trying to shut down the server, check the logs for more information
I, [2022-04-01T06:14:15.622606 #1]  INFO -- : exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid:29 did not terminate cleanly, forcing termination!

redis.template.yml should be a part of data.yml

I just performed a git pull followed by ./launcher rebuild web_only and it completed successfully.
Have you tried using ./discourse-doctor although it may not help much.

If you can still boot up your old container using ./launcher start web_only then maybe try taking a full backup (as insurance) then try ./launcher stop web_only; ./launcher rebuild data if no errors occur in rebuilding data then try ./launcher rebuild web_only to see if that fixes the problem?

in the meanwhile, Iā€™m moving this topic to #support due to lack of a consistent repro.

2 Likes

ok, then I mixed something up, I thought the redis template is part of the web_only container but its already included in the settings of the data container - where it makes more sense :wink:

2 Likes