Bug#836736: systemd journald - empty _SYSTEMD_UNIT on some messages from oneshot service

Tomas Crhonek tomas at heronovo.cz
Mon Sep 5 11:23:57 BST 2016


Package: systemd
Version: 231-4
Severity: normal
Tags: upstream

Dear Maintainer,

I use systemd.service and systemd.timer for cron like jobs. Very simple
oneshot unit like this:

[Unit]
Description=Add service

[Service]
User=add
Group=add

Type=oneshot
WorkingDirectory=/home/add/bin
ExecStart=/home/add/bin/down.py -d ttrss
ExecStart=/home/add/bin/down.py -d one

[Unit]
Description=Timer for add.service

[Timer]
OnCalendar=*:*:00
AccuracySec=1s
Persistent=true

[Install]
WantedBy=timers.target

This works great, python script doing his job just fine.

But journalctl -u add.service (or journalctl -f -u add.service) shows
only some records, not complete output from program. In journalctl
(without -u) are all messages.

Here is json-pretty export from journalctl:

http://pastebin.com/R10AsiVG

First message is just fine with "_SYSTEMD_UNIT" : "add.service", the
other dont have _SYSTEMD_UNIT at all (and some another fields as well).

Messages from the skript are:
"--- START --- ARGV=['/home/add/bin/down.py', '-d', 'ttrss']"
"Pocet vlozenych zaznamu z TTRSS: 0"
"--- END --- ARGV=['/home/add/bin/down.py', '-d', 'ttrss']"

(Every run of this script outputs START .. END to the stdout.)

This is very random behavior, sometimes every message has _SYSTEMD_UNIT
field, sometimes like one run in 12 hours not. 


-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser         3.115
ii  libacl1         2.2.52-3
ii  libapparmor1    2.10.95-4
ii  libaudit1       1:2.6.6-1
ii  libblkid1       2.28.1-1
ii  libc6           2.23-5
ii  libcap2         1:2.25-1
ii  libcap2-bin     1:2.25-1
ii  libcryptsetup4  2:1.7.0-2
ii  libgcrypt20     1.7.3-1
ii  libgpg-error0   1.24-1
ii  libidn11        1.33-1
ii  libkmod2        22-1.1
ii  liblzma5        5.1.1alpha+20120614-2.1
ii  libmount1       2.28.1-1
ii  libpam0g        1.1.8-3.3
ii  libseccomp2     2.3.1-2
ii  libselinux1     2.5-3
ii  libsystemd0     231-4
ii  mount           2.28.1-1
ii  util-linux      2.28.1-1

Versions of packages systemd recommends:
ii  dbus            1.10.10-1
ii  libpam-systemd  231-4

Versions of packages systemd suggests:
ii  policykit-1        0.105-16
ii  systemd-container  231-4
pn  systemd-ui         <none>

Versions of packages systemd is related to:
ii  udev  231-4

-- Configuration Files:
/etc/systemd/journald.conf changed:
[Journal]
Storage=persistent
Compress=yes
RateLimitIntervalSec=0
RateLimitBurst=0
SystemMaxUse=16G
ForwardToSyslog=no
ForwardToWall=no

/etc/systemd/logind.conf changed:
[Login]
KillUserProcesses=yes

/etc/systemd/timesyncd.conf changed:
[Time]
Servers=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org


-- no debconf information



More information about the Pkg-systemd-maintainers mailing list