Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   why does my systemd-services not work? (dbmail-imapd) (http://www.linux-archive.org/fedora-development/540488-why-does-my-systemd-services-not-work-dbmail-imapd.html)

Reindl Harald 06-16-2011 11:49 AM

why does my systemd-services not work? (dbmail-imapd)
 
Am 16.06.2011 13:41, schrieb Tomasz Torcz:
> 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?

below my "dbmail-imapd.service"
i will send a copy to the dbmail-mailing-list

some minutes ago dbmail-imapd <defunct> was in ps aux
i am not sure what here happens, finally systedm shoots the service down
PIDFile is given and /etc/init.d-scripts used this too


[root@testserver:/lib/systemd/system]$ cat dbmail-imapd.service
[Unit]
Description=DBMail IMAP Server
After=syslog.target mysqld.service local-fs.target network.target

[Service]
Type=forking
PIDFile=/var/run/dbmail-imapd.pid
ExecStart=/usr/sbin/dbmail-imapd

[Install]
WantedBy=multi-user.target

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

Tomasz Torcz 06-16-2011 12:10 PM

why does my systemd-services not work? (dbmail-imapd)
 
On Thu, Jun 16, 2011 at 01:49:32PM +0200, Reindl Harald wrote:
> below my "dbmail-imapd.service"
> i will send a copy to the dbmail-mailing-list
>
> some minutes ago dbmail-imapd <defunct> was in ps aux
> i am not sure what here happens, finally systedm shoots the service down
> PIDFile is given and /etc/init.d-scripts used this too
>
>
> [root@testserver:/lib/systemd/system]$ cat dbmail-imapd.service
> [Unit]
> Description=DBMail IMAP Server
> After=syslog.target mysqld.service local-fs.target network.target
>
> [Service]
> Type=forking
> PIDFile=/var/run/dbmail-imapd.pid
> ExecStart=/usr/sbin/dbmail-imapd
>
> [Install]
> WantedBy=multi-user.target
>

I succeeded with following:

[Service]
ExecStart=/usr/sbin/dbmail-imapd -D


So, without Type (default to simple), without explicit PIDFile and with
daemon running in foreground.

--
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


All times are GMT. The time now is 05:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.