[systemd-devel] Cannot add dependency job for unit... Cannot allocate memory
Anthony Messina
amessina at messinet.com
Thu Feb 21 08:14:43 PST 2013
On Thursday, February 21, 2013 09:48:57 AM Anthony Messina wrote:
> I'm not sure if this is the right place to ask, so please direct me to the
> proper list if it's not. And byt the way, THANK YOU for systemd! The more
> I read and try, the simpler my systems get.
>
> Anyway, I'm writing due to an issue I'm seeing on a few of my Fedora 18
> machines after I've created a unit file for instantiation that will acquire
> Kerberos tickets for user-based services such as apache and mythtv, etc. to
> access NFSv4.1 filesystems. Any assistance would be appreciated,
> especially with pointers on improving the unit file itself. I have
> attached the dmesg output after booting with "systemd.log_level=debug
> systemd.log_target=kmsg"
>
> Thanks in advance -A
>
> I am intermittently running into the error:
> "Cannot add dependency job for unit k5start at mythtv.service, ignoring: Unit
> k5start at mythtv.service failed to load: Cannot allocate memory. See system
> logs and 'systemctl status k5start at mythtv.service'
> for details."
>
> And systemctl status k5start at mythtv.service shows
> k5start at mythtv.service - k5start Kerberos ticket service for mythtv
> Loaded: error (Reason: Cannot allocate memory)
> Active: inactive (dead)
> Docs: man:k5start(1)
>
> This issue does not happen every time the computer is started, but the
> success is about 50/50. However, if I reload systemd and try to start the
> unit, it works every time.
>
> # systemctl --system daemon-reload
> # systemctl start k5start at mythtv.service
> # systemctl status k5start at mythtv.service
> k5start at mythtv.service - k5start Kerberos ticket service for mythtv
> Loaded: loaded (/etc/systemd/system/k5start at .service; enabled)
> Active: active (running) since Thu 2013-02-21 09:38:12 CST; 7s ago
> Docs: man:k5start(1)
> Process: 1167 ExecStart=/usr/bin/k5start -b -f
> /etc/k5start.d/%u.keytab -K 60 -p /run/user/%U/k5start.pid -L -v -U
> (code=exited, status=0/SUCCESS)
> Process: 1164 ExecStartPre=/usr/bin/chcon -R -t user_tmp_t
> /run/user/%U (code=exited, status=0/SUCCESS)
> Process: 1159 ExecStartPre=/bin/chown -R %u:%u /run/user/%U
> (code=exited, status=0/SUCCESS)
> Process: 1155 ExecStartPre=/usr/bin/mkdir -p -m 0700
> /run/user/%U/krb5cc (code=exited, status=0/SUCCESS)
> Process: 1152 ExecStartPre=/usr/bin/mkdir -p -m 0700 /run/user/%U
> (code=exited, status=0/SUCCESS)
> Main PID: 1168 (k5start)
> CGroup: name=systemd:/system/k5start at .service/mythtv
> └─1168 /usr/bin/k5start -b -f /etc/k5start.d/mythtv.keytab
> - K 60 -p /run/user/1136699918/k5start.pid -L -v -U
>
> Feb 21 09:38:12 mythtv.example.com k5start[1167]: Kerberos initialization
> for mythtv at EXAMPLE.COM
> Feb 21 09:38:12 mythtv.example.com k5start[1167]: k5start: authenticating
> as mythtv at EXAMPLE.COM
> Feb 21 09:38:12 mythtv.example.com k5start[1167]: k5start: getting tickets
> for krbtgt/EXAMPLE.COM at EXAMPLE.COM
> Feb 21 09:38:12 mythtv.example.com k5start[1167]: authenticating as
> mythtv at EXAMPLE.COM
> Feb 21 09:38:12 mythtv.example.com k5start[1167]: getting tickets for
> krbtgt/EXAMPLE.COM at EXAMPLE.COM
>
>
> The unit file is below (I've only wrapped the lines for email purposes) and
> I have instantiated the unit by "systemctl enable k5start at mythtv.service".
>
> [Unit]
> Description=k5start Kerberos ticket service for %i
> Documentation=man:k5start(1)
> Before=display-manager.service httpd.service mythbackend.service
> After=network.target sssd.service
>
> [Service]
> User=%i
> Type=forking
> PIDFile=/run/user/%U/k5start.pid
> #ConditionPathExists=/etc/k5start.d/%u.keytab
> Environment=KRB5CCNAME=DIR:/run/user/%U/krb5cc
> ExecStartPre=/usr/bin/mkdir -p -m 0700 /run/user/%U ; \
> /usr/bin/mkdir -p -m 0700 /run/user/%U/krb5cc ; \
> /bin/chown -R %u:%u /run/user/%U ; \
> /usr/bin/chcon -R -t user_tmp_t /run/user/%U
> ExecStart=/usr/bin/k5start -b -f /etc/k5start.d/%u.keytab \
> -K 60 -p /run/user/%U/k5start.pid -L -v -U
> ExecReload=/bin/kill -ALRM $MAINPID
> PermissionsStartOnly=true
>
> [Install]
> WantedBy=multi-user.target
Since the dmesg log was scrubbed, I've place it here:
http://messinet.com/~amessina/systemd.dmesg.out-of-memory.log
--
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130221/bc4e669e/attachment.pgp>
More information about the systemd-devel
mailing list