0

A little rodeo with redis. The error issued by redis is pretty unspecific ...

When doing journalctl -xe I got:

-- The process' exit code is 'exited' and its exit status is 1.
Nov 05 20:53:34 servername systemd[1]: redis-server.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit redis-server.service has entered the 'failed' state with result 'exit-code'.
Nov 05 20:53:34 servername systemd[1]: Failed to start Advanced key-value store.
-- Subject: A start job for unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit redis-server.service has finished with a failure.
--
-- The job identifier is 184424 and the job result is failed.

When doing sudo service redis status:

sudo service redis status
● redis-server.service - Advanced key-value store
     Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset:     enabled)
     Active: failed (Result: exit-code) since Thu 2020-11-05 20:53:35 UTC; 11min ago
       Docs: http://redis.io/documentation,
         man:redis-server(1)
    Process: 1468552 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)

Nov 05 20:53:35 servername systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Nov 05 20:53:35 servername systemd[1]: Stopped Advanced key-value store.
Nov 05 20:53:35 servername systemd[1]: redis-server.service: Start request repeated too quickly.
Nov 05 20:53:35 servername systemd[1]: redis-server.service: Failed with result 'exit-code'.
Nov 05 20:53:35 servername systemd[1]: Failed to start Advanced key-value store.

So how to resolve?

kghbln
  • 371
  • 1
  • 9
  • 19
  • 1
    Check the logs. – Michael Hampton Nov 05 '20 at 21:27
  • 1
    Thank you for this comment. Actually I did but I was not able to interprete the error message `systemd supervision requested, but NOTIFY_SOCKET not found` correctly. My answer below however allows random redis users to track the cause of the error faster I guess. – kghbln Nov 05 '20 at 21:34
  • Huh? I don't see that error anywhere in your question. That made it impossible to answer. You should make sure to include all relevant information when posting. – Michael Hampton Nov 05 '20 at 21:36
  • You were too fast. :) I was at the same time typing my solution. Anyhow, indeed I should have added this. My answer is for the dummies like me, i.e. hopefully helps them track the cause better in a way or at least have an additional path to go about it. This is the only reason why I posted the question. – kghbln Nov 05 '20 at 21:50

1 Answers1

1

So I started searching for solutions covering the "systemd[1]: Failed to start Advanced key-value store" and "redis-server.service: Start request repeated too quickly." issue.

None of the offered solutions seemed to help or make sense. However finding the true cause of the issue was quite easy by issuing /usr/bin/redis-server /etc/redis/redis.conf. This checked the configuration file and I got the following information:

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 151
>>> 'supervised yes'
Invalid option for 'supervised'. Allowed values: 'upstart', 'systemd', 'auto', or 'no'

After changing supervised yes to supervised systemd everything was fluff. Voilà!

In the end it was a senior moments error to add the wrong configuration to the file. :)

kghbln
  • 371
  • 1
  • 9
  • 19