[systemd-devel] Installing gitlab

Marwan Rabbâa waghanza at gmail.com
Thu Jan 23 02:16:44 PST 2014


there is already *Type=forking *in the service section


2014/1/23 Mathieu Bridon <bochecha at fedoraproject.org>

> On Thu, 2014-01-23 at 10:51 +0100, Marwan Rabbâa wrote:
> > that is not very useful for me. /var/www/gitlab/script/sidekiq is just
> > a litle startup script for sidekiq
> > ********************************************
> > #!/usr/bin/env sh
> >
> >
> > cd /var/www/gitlab
> > /usr/local/bin/bundle exec sidekiq -q
> >
> post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default
> -e production -P /var/run/gitlab-sidekiq.pid -d -L
> /var/www/gitlab/log/sidekiq.log >> /var/www/gitlab/log/sidekiq.log 2>&1
> > ********************************************
> >
> > When I run this script in a tty, I have a 0 exit code, I presume it
> > works (the process behind is started).
>
> The way sidekiq is started, it forks itself as a daemon, and the parent
> process exits.
>
> Because you didn't specify the Type= option in the
> gitlab-sidekiq.service file, systemd assumes the default: Type=simple
>
> This means that systemd expects the main process to just start, and keep
> running forever. (systemd handles the forking)
>
> So when the parent process exits after forking, systemd assumes that the
> service failed.
>
> To fix this, you should use Type=forking in your gitlab-sidekiq.service
> file.
>
> I recommend you look at the systemd.service(5) manual page for more
> details.
>
>
> --
> Mathieu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140123/d59a77a1/attachment.html>


More information about the systemd-devel mailing list