2

Redis properly starts up if I run the command:

sudo /etc/init.d/redis-server start

I've added my startup script with:

sudo update-rc.d redis-server defaults

But when I startup from a fresh boot, Redis isn't running. Where should I look to troubleshoot this?

  • In my log files, I can see redis exiting and starting up manually, but nothing is written to the log on startup. I can see a link to redis-server in each of my /etc/rcX.d/ directories. –  Dec 15 '13 at 00:11
  • Ubuntu 13.10 (Saucy Salamander) –  Dec 17 '13 at 15:55
  • 1
    Have you installed redis from repo or from sources? It starts normally on my 13.10 – twil Dec 22 '13 at 23:23
  • Aha, I had installed from source. I just removed redis-server from rc.d, reinstalled from the repo and let it replace my init.d/redis-server file, then added it back and restarted. It started up just fine. Convert to answer for bounty. –  Dec 23 '13 at 10:02
  • @arby Did the below answer work for you? – Manu Manjunath Dec 24 '13 at 07:13
  • @Manu I actually had luck after I removed mine with `update-rc.d -f redis-server remove` then ran `apt-get install redis-server` and let it replace my init.d/redis-server script, then added it with `update-rc.d redis-server defaults`. Everything is working as it should now. –  Dec 24 '13 at 23:22
  • Interesting. Good to know. But I would personally prefer fine grained control over `defaults`. – Manu Manjunath Dec 26 '13 at 06:46

3 Answers3

4

The defaults thing usually sets starting to 20. It's too early as redis requires networking.

So, try below:

sudo update-rc.d redis-server remove
sudo update-rc.d redis-server start 80 2 3 4 5 . stop 20 0 1 6 .

Manu Manjunath
  • 6,201
  • 3
  • 32
  • 31
3

Use the below into the terminal:

sudo systemctl enable redis

It made run on startup for me.

J. Chomel
  • 8,193
  • 15
  • 41
  • 69
firebox
  • 41
  • 5
2

In my case update-rc.d didn't work

$ sudo update-rc.d redis-server start 80 2 3 4 5 . stop 20 0 1 6 .
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

On the other hand

sudo systemctl enable redis-server

did the trick

LeoK
  • 51
  • 6