redis server does not create socket file
I had a similar issue but on a derivative of Arch Linux.
Redis had to be installed for OpenVAS and I was getting a permission error after attempting to start the service like this:
systemctl start redis.service
The error was visible using:
journalctl -xeu redis.service
as recommended by the systemctl
command output.
When it attempted to create the Unix socket in /run
(also linked from /var/run
) it would fail because it could not create the file. I could manually created a redis
subdirectory under /run
using sudo
and change the owner to the redis
user then started redis
but the directory kept disappearing later.
I tried re-installing with pacman because I was a bit lost but that didn't seem to help.
Solution in my case
After running
sudo systemctl enable redis.service
I can start the service and /run/redis
(also linked as /var/run/redis
) is present with a PID and Unix socket file as configured with the unixsocket
entry in my config file.
I can confirm it's accessible with:
redis-cli -s /run/redis/redis.sock
After a reboot it's still good.