hi all, i got redis in ubuntu and it is working, i copied /etc/redis.conf and /lib/systemd/system/redis-server.service for a new instance and it failed to start:
/etc/systemd/system>service redis-quinton start
Job for redis-server-quinton.service failed because the control process exited with error code.
See "systemctl status redis-server-quinton.service" and "journalctl -xe" for details.
systemctl status redis-server-quinton.service
● redis-server-quinton.service - Advanced key-value store - quinton
Loaded: loaded (/lib/systemd/system/redis-server-quinton.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-09-13 02:26:12 HKT; 5s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 14021 ExecStart=/usr/bin/redis-server /etc/redis/redis-quinton.conf (code=exited, status=1/FAILURE)
Sep 13 02:26:12 godaddy1 systemd[1]: redis-server-quinton.service: Service hold-off time over, scheduling restart.
Sep 13 02:26:12 godaddy1 systemd[1]: redis-server-quinton.service: Scheduled restart job, restart counter is at 5.
Sep 13 02:26:12 godaddy1 systemd[1]: Stopped Advanced key-value store - quinton.
Sep 13 02:26:12 godaddy1 systemd[1]: redis-server-quinton.service: Start request repeated too quickly.
Sep 13 02:26:12 godaddy1 systemd[1]: redis-server-quinton.service: Failed with result 'exit-code'.
Sep 13 02:26:12 godaddy1 systemd[1]: Failed to start Advanced key-value store - quinton.
/etc/systemd/system>cat redis-quinton.service
[Unit]
Description=Advanced key-value store - quinton
After=network.target
Documentation=http://redis.io/documentation, man:redis-server(1)
[Service]
Type=forking
ExecStart=/usr/bin/redis-server /etc/redis/redis-quinton.conf
ExecStop=/bin/kill -s TERM $MAINPID
PIDFile=/var/run/redis/redis-server-quinton.pid
TimeoutStopSec=0
Restart=always
User=redis
Group=redis
RuntimeDirectory=redis-quinton
RuntimeDirectoryMode=2755
UMask=007
PrivateTmp=yes
LimitNOFILE=65535
PrivateDevices=yes
ProtectHome=yes
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/redis-quinton
ReadWriteDirectories=-/var/log
ReadWriteDirectories=-/var/run
NoNewPrivileges=true
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
MemoryDenyWriteExecute=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
# redis-server can write to its own config file when in cluster mode so we
# permit writing there by default. If you are not using this feature, it is
# recommended that you replace the following lines with "ProtectSystem=full".
ProtectSystem=true
ReadWriteDirectories=-/etc/redis
[Install]
WantedBy=multi-user.target
Alias=redis-quinton.service
but if I do "/usr/bin/redis-server /etc/redis/redis-quinton.conf" manually in terminal, it works, why? thanks
Comment From: yossigo
@quantrpeter You should check the logs and see why Redis aborted (try journalctl -xe as indicated).