You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System service should be modified without changing directory. Here's the difference that works:
@@ -8 +8 @@
-ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
+ExecStart=/usr/bin/redis-server /etc/redis/redis-cache-server.conf
@@ -10 +10 @@
-PIDFile=/run/redis/redis-server.pid
+PIDFile=/run/redis/redis-cache-server.pid
@@ -46 +46 @@
-Alias=redis.service
+Alias=redis-cache-server.service
System service should be modified without changing directory. Here's the difference that works: @@ -8 +8 @@ -ExecStart=/usr/bin/redis-server /etc/redis/redis.conf +ExecStart=/usr/bin/redis-server /etc/redis/redis-cache-server.conf @@ -10 +10 @@ -PIDFile=/run/redis/redis-server.pid +PIDFile=/run/redis/redis-cache-server.pid @@ -46 +46 @@ -Alias=redis.service +Alias=redis-cache-server.service
If the directory RuntimeDirectory has not been changed, executing systemctl stop redis2 leads to the disappearance of the unix socket and the pid file of the first instance of Redis because "runtime directory is cleaned up automatically after use". At the same time, systemctl status redis and pid aux | grep redis says that everything is fine - the systemd unit is active and the process exists, but there is no unix socket of the first instance of Redis. That's why it's crucial to change RuntimeDirectory. ReadWriteDirectories should be changed for different directories as well.
BTW, I think it's better to store everything in different directories: pid, unixsocket, logfile, dir (working directory), and the config too, especially since "redis-server can write to its own config file when in cluster mode". It's safer.
Hi, there is some mistake in this line here right ?
ReadWriteDireRuntimeDirectory=redis2