FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-16-2011, 11:41 AM
Tomasz Torcz
 
Default why does my systemd-services not work?

On Thu, Jun 16, 2011 at 01:25:40PM +0200, Michal Schmidt wrote:
> On 06/16/2011 01:07 PM, Reindl Harald wrote:
> > you can see the master-porcess and a child shortly in ps aux but
> > after a few seconds systemd changes to "deactivating (stop-sigterm)"
> > and is killing the processes
> ...
>
> > [root@testserver:/lib/systemd/system]$ systemctl status dbmail-imapd.service
> > dbmail-imapd.service - DBMail IMAP Server
> > Loaded: loaded (/lib/systemd/system/dbmail-imapd.service)
> > Active: deactivating (stop-sigterm) since Thu, 16 Jun 2011 13:05:11 +0200; 1s ago
> > Process: 5013 ExecStart=/usr/sbin/dbmail-imapd (code=exited, status=0/SUCCESS)
> > Main PID: 5014 (code=exited, status=0/SUCCESS)
>
> When the main PID of the service exits, the default action is to kill
> the whole cgroup.
> The question is why did the main PID exit in the first place.

dbmail is doing something confusing systemd. For such cases, GuessMainPID=
(systemd.service) was introduced. Also worth playing with is PIDFile= (the same manpage).
Reindl, could you put dbmail-imapd.service somewhere for us to download
and play with?

--
Tomasz Torcz "Never underestimate the bandwidth of a station
xmpp: zdzichubg@chrome.pl wagon filled with backup tapes." -- Jim Gray

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-16-2011, 12:23 PM
Michal Schmidt
 
Default why does my systemd-services not work?

On 06/16/2011 01:41 PM, Tomasz Torcz wrote:
> dbmail is doing something confusing systemd.

Yes. Its startup sequence is wrong. It exits the original process
immediately after the first fork(), before it finishes initialization
and before the PID file is written.

Upstream should take a look at "SysV Daemons" in
http://0pointer.de/public/systemd-man/daemon.html

Michal
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-17-2011, 12:05 AM
Bob Arendt
 
Default why does my systemd-services not work?

On 06/16/2011 04:25 AM, Michal Schmidt wrote:
> On 06/16/2011 01:07 PM, Reindl Harald wrote:
>> you can see the master-porcess and a child shortly in ps aux but
>> after a few seconds systemd changes to "deactivating (stop-sigterm)"
>> and is killing the processes
> ...
>
>> [root@testserver:/lib/systemd/system]$ systemctl status dbmail-imapd.service
>> dbmail-imapd.service - DBMail IMAP Server
>> Loaded: loaded (/lib/systemd/system/dbmail-imapd.service)
>> Active: deactivating (stop-sigterm) since Thu, 16 Jun 2011 13:05:11 +0200; 1s ago
>> Process: 5013 ExecStart=/usr/sbin/dbmail-imapd (code=exited, status=0/SUCCESS)
>> Main PID: 5014 (code=exited, status=0/SUCCESS)
>
> When the main PID of the service exits, the default action is to kill
> the whole cgroup.
> The question is why did the main PID exit in the first place.
>
> Michal

mpd forks and daemonizes itself, so the main pid dies. Maybe the --no-daemon
arg would help. Or there might be a more appropriate "Type" for mpd.
-Bob Arendt
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-17-2011, 08:22 AM
Michal Schmidt
 
Default why does my systemd-services not work?

On 06/17/2011 02:05 AM, Bob Arendt wrote:
> mpd forks and daemonizes itself, so the main pid dies.

There is a misunderstanding about what "main PID" means.
It is not the PID of the original process which forks and then exits. It
should be the PID of the process of the running daemon. The one that
gets written to the PID file.

Michal
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 12:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org