[systemd-devel] Additional error details when resource limits are exceeded

Kai Krakow hurikhan77 at gmail.com
Mon Dec 21 16:28:44 PST 2015


Am Wed, 9 Dec 2015 11:45:00 +0800
schrieb Peter Hoeg <peter at hoeg.com>:

> Hi,
> 
> it turns out that the teamviewer daemon wasn't behaving correctly and
> double-forked before the PID file was written. Fixed by running it as
> Type=simple and in the foreground.
> 
> It however, still doesn't change anything about the error message,
> which is just plain wrong in this case as opposed to unhelpful.
> 
> Is there anything I can provide or do to help with this?

AFAIR I had the same problem and I think it was respawning itself over
and over again because of this PID file issue.

I fixed it by using a different service file (still forking):

--------
[Unit]
Description=TeamViewer remote control daemon
After=network.target

[Service]
Type=forking
PIDFile=/run/teamviewerd.pid
ExecStart=/opt/teamviewer10/tv_bin/teamviewerd -d
Restart=on-abort
StartLimitInterval=60
StartLimitBurst=10

[Install]
WantedBy=graphical.target
--------

The original included different redundant deps to NetworkManager, dbus,
network-online and NetworkManager-wait-online which completely exploded
somehow. Not sure if this was distro or upstream specific (Gentoo).

Resource limit exhaustion (in kernel sense) is usually easily to be
found in dmesg. I think this wasn't the case here. I propose it was
just because of StartLimitBurst?

> 
> --
> Regards,
> Peter
> 
> On 15-12-03 at 12:42, Peter Hoeg wrote:
> >Hi,
> >
> >I'm using systemd 228-3 on Arch Linux (up-to-date as of time of
> >writing) and am having an issue figuring out why a particular
> >service fails to run.
> >
> >The message I am getting is "Job for teamviewerd.service failed
> >because a configured resource limit was exceeded." but how do I
> >figure out WHICH resource limit is causing this?
> >
> >What I have tried:
> >
> >1) checking "systemctl status teamviewerd.service" and "journalctl
> >-xe" as mentioned by systemd 2) bumping up the various LimitXXX
> >configuration items in the unit file 3) adding
> >Environment=SYSTEMD_LOG_LEVEL=debug to the unit file
> >
> >All in vain.
> >
> >However running the ExecStart line manually using sudo works fine.
> >
> >The fact that this is teamviewer really doesn't matter - it just
> >happened to be where I noticed it, but providing additional info on
> >this error would be very welcome.


-- 
Regards,
Kai

Replies to list-only preferred.



More information about the systemd-devel mailing list