Bug#792777: fails to send email on failure; falls over on circle at start of systemctl status
Jörg Sommer
joerg at alea.gnuu.de
Sat Oct 20 10:29:28 BST 2018
On Sat, 18 Jul 2015 15:25:06 +0200 Alexandre Detiste <alexandre.detiste at gmail.com> wrote:
> control: tag -1 moreinfo
>
> Hi,
>
> I can't find the correct environnement needed to reproduce this bug.
I'm having the same problem. This is the environment of the script
`mail_on_failure` when called from *systemd*
```
USER=nobody
HOME=/nonexistent
LOGNAME=nobody
JOURNAL_STREAM=8:15023569
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
INVOCATION_ID=8f1cf292d7024ede9aa1cb66dc58bef4
PWD=/
```
With this I can reproduce the error:
```
# env -i $(</tmp/mail_on_failure.27550.log) /lib/systemd-cron/mail_on_failure cron-kernel-root-0
Traceback (most recent call last):
File "/lib/systemd-cron/mail_on_failure", line 51, in <module>
systemctl = subprocess.check_output(['systemctl','status',job], universal_newlines=True)
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 385, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.5/subprocess.py", line 788, in communicate
stdout = self.stdout.read()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
```
```
# cat /etc/debian_version
9.5
# dpkg -l systemd systemd-sysv init-system-helpers python3
ii init-system-helpers 1.48
ii python3 3.5.3-1
ii systemd 232-25+deb9u4
ii systemd-sysv 232-25+deb9u4
```
Bye Jörg
--
Leben – es gibt nichts Selteneres auf der Welt. Die meisten Menschen
existieren, weiter nichts.
(Oscar Wilde: Der Sozialismus und die Seele des Menschen)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20181020/8cacb437/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list