Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529050 - dev-db/redis-2.8.17 - systemd fails to recognise service has started because systemd expects to daemonise it
Summary: dev-db/redis-2.8.17 - systemd fails to recognise service has started because ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL: http://serverfault.com/a/616557
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 16:16 UTC by Sviatoslav @webknjaz Sydorenko #StandWithUkraine
Modified: 2015-02-23 15:45 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (output.txt,5.24 KB, text/plain)
2015-01-14 04:53 UTC, David Novakovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sviatoslav @webknjaz Sydorenko #StandWithUkraine 2014-11-12 16:16:36 UTC
systemctl cannot run redis with default config out of the box.

Reproducible: Always

Steps to Reproduce:
1. Have systemd installed and running
2. Install dev-db/redis
3. Run redis with `systemctl start redis`
Actual Results:  
Terminal pauses for a while.
Meanwhile in background redis server starts. I can see it with htop and logs inform you that everything is ok.
Then I see that systemctl failed to run redis because of timeout.

Expected Results:  
redis runs as a daemon

It fact systemd expects to daemonize process by itself. But there's "daemonize yes" in /etc/redis.conf

I guess it should be removed for systemd-based installations.
Comment 1 Ultrabug gentoo-dev 2014-12-02 15:34:50 UTC
I'll take your word for it as I'm no systemd user ;) anyway, I fixed this by altering the openRC init script to it also does the daemonization and PID handling

+  02 Dec 2014; Ultrabug <ultrabug@gentoo.org> redis-2.8.17.ebuild,
+  +files/redis-2.8.17-config.patch, files/redis.initd-4:
+  fix daemonization wrt #529050
+
Comment 2 David Novakovic 2015-01-14 04:53:50 UTC
Created attachment 393932 [details]
emerge info
Comment 3 David Novakovic 2015-01-14 04:55:32 UTC
I had to comment these two lines in the redis.service file to get it to work, even with "daemonize no":

{{{
[Service]
#Type=forking
#PIDFile=/var/run/redis/redis.pid
ExecStart=/usr/sbin/redis-server /etc/redis.conf
User=redis
Group=redis
}}}
Comment 4 Leho Kraav (:macmaN @lkraav) 2015-02-04 12:22:50 UTC
I can confirm 2.8.17-r1 stable still does not work ootb on systemd.

Service=simple is the way to go.
Comment 5 Ultrabug gentoo-dev 2015-02-23 15:45:29 UTC
Please follow and give feedback on https://bugs.gentoo.org/show_bug.cgi?id=537384