Installing discourse dev broke redis

AI-generated summary

NubeBuster is experiencing issues with Redis after installing Discourse dev. The server fails to start and logs indicate a user-requested shutdown. NubeBuster suspects that Discourse is causing the issue and is looking for a way to prevent it from killing the Redis server.

NubeBuster has attempted to resolve the issue by undoing a change made by the Discourse installation script, specifically related to the Redis service. They provided a series of commands that were used to stop the Redis server, remove the service file, reload the systemd daemon, re-enable the Redis server, and start it again.

I had redis installed and configured for other projects. Currently the server fails to start. After starting the server is immediately shut down. The logs say

#User requested shutdown…

Is this caused by discourse? (99.99% sure because redis broke after installing dev discourse) How do I stop discourse from killing my redis server?

The discourse server is not currently running for me.

923:M 20 Mar 2024 13:25:47.359 * Background saving terminated with success
923:M 20 Mar 2024 13:29:16.773 * User requested shutdown...
923:M 20 Mar 2024 13:29:16.773 * Saving the final RDB snapshot before exiting.
923:M 20 Mar 2024 13:29:16.958 * DB saved on disk
923:M 20 Mar 2024 13:29:16.959 * Removing the pid file.
923:M 20 Mar 2024 13:29:16.959 # Redis is now ready to exit, bye bye...
919:C 20 Mar 2024 13:30:00.782 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures withou>
919:C 20 Mar 2024 13:30:00.782 # systemd supervision requested or auto-detected, but Redis is compiled without libsystemd support!
951:C 20 Mar 2024 13:30:00.783 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
951:C 20 Mar 2024 13:30:00.783 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=951, just started
951:C 20 Mar 2024 13:30:00.783 * Configuration loaded
951:M 20 Mar 2024 13:30:00.784 * Increased maximum number of open files to 10032 (it was originally set to 1024).
951:M 20 Mar 2024 13:30:00.784 * monotonic clock: POSIX clock_gettime
951:M 20 Mar 2024 13:30:00.787 # Failed to write PID file: No such file or directory
951:M 20 Mar 2024 13:30:00.787 * Running mode=standalone, port=6379.
951:M 20 Mar 2024 13:30:00.788 * Server initialized
951:M 20 Mar 2024 13:30:00.790 * Loading RDB produced by version 7.2.4
951:M 20 Mar 2024 13:30:00.790 * RDB age 44 seconds
951:M 20 Mar 2024 13:30:00.790 * RDB memory usage when created 41.01 Mb
951:M 20 Mar 2024 13:30:00.813 * User requested shutdown...
951:M 20 Mar 2024 13:30:00.813 * Removing the pid file.
951:M 20 Mar 2024 13:30:00.813 # Redis is now ready to exit, bye bye...

I undid the following

using

sudo systemctl stop redis-server
sudo rm /etc/systemd/system/redis-server.service
sudo systemctl daemon-reload
sudo systemctl enable redis-server
sudo systemctl start redis-server
sudo systemctl status redis-server
redis-cli ping