Dragonfly Cloud is now available in the AWS Marketplace - learn more

Error: failed to start redis-server.service unit redis-server.service is masked

What's Causing This Error

The error 'failed to start redis-server.service unit redis-server.service is masked' occurs when the Redis service fails to start due to it being masked. Masking a service in Linux means disabling it intentionally, and preventing any attempts to start it, even if requested by other services or users. The systemd-init system may have masked the Redis server unit because of an incorrect configuration, or as a security measure to prevent unauthorized access.

Solution - Here's How To Resolve It

To resolve the 'failed to start redis-server.service unit redis-server.service is masked' error, you need to unmask the Redis server unit by running the following commands on the terminal:

sudo systemctl unmask redis-server.service
sudo systemctl daemon-reload
sudo systemctl start redis-server.service

The first command removes the mask from the Redis server unit, allowing it to be started again. The second command tells the systemd init system to reload its configuration files so that it recognizes the changes made to the Redis server unit. Finally, the third command starts the Redis service, which should now start successfully without throwing this error.

Was this content helpful?

Switch & save up to 80% 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost