zfsnap does not work under systemd - errors writing to /dev/stderr

Bug #2065427 reported by Georgi Georgiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfsnap (Ubuntu)
New
Undecided
Unassigned

Bug Description

This issue is reported upstream at https://github.com/zfsnap/zfsnap/issues/91 and fixed in https://github.com/zfsnap/zfsnap/commit/f895af7835fdc08f7115b31307e71a064e8afe7b

The issue is that when running zfSnap under cron which is managed by systemd-cron we get errors like these and snapshots are not created.

```
$ sudo systemctl status cron-daily-zfSnap.service
○ cron-daily-zfSnap.service - [Cron] /etc/cron.daily/zfSnap
     Loaded: loaded (/etc/cron.daily/zfSnap; generated)
     Active: inactive (dead) since Sat 2024-05-11 01:02:32 JST; 8min ago
TriggeredBy: ● cron-daily-zfSnap.timer
       Docs: man:systemd-crontab-generator(8)
    Process: 57556 ExecStart=/etc/cron.daily/zfSnap (code=exited, status=0/SUCCESS)
   Main PID: 57556 (code=exited, status=0/SUCCESS)
        CPU: 1.144s

May 11 01:02:31 neo systemd[1]: Starting cron-daily-zfSnap.service - [Cron] /etc/cron.daily/zfSnap...
May 11 01:02:31 neo zfSnap[57557]: /usr/sbin/zfSnap: 365: cannot create /dev/stderr: No such device or address
May 11 01:02:31 neo zfSnap[57557]: /usr/sbin/zfSnap: 365: cannot create /dev/stderr: No such device or address
May 11 01:02:32 neo systemd[1]: cron-daily-zfSnap.service: Deactivated successfully.
May 11 01:02:32 neo systemd[1]: Finished cron-daily-zfSnap.service - [Cron] /etc/cron.daily/zfSnap.
May 11 01:02:32 neo systemd[1]: cron-daily-zfSnap.service: Consumed 1.144s CPU time.
May 11 01:02:32 neo systemd[1]: cron-daily-zfSnap.service: Triggering OnSuccess= dependencies.
```

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: zfsnap 1.11.1-8.1
Uname: Linux 5.15.146.1-microsoft-standard-WSL2 x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudBuildName: server
CloudID: none
CloudName: none
CloudPlatform: none
CloudSerial: 20190521
CloudSubPlatform: config
Date: Sat May 11 01:05:09 2024
PackageArchitecture: all
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=tmux-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: zfsnap
UpgradeStatus: Upgraded to noble on 2024-05-09 (1 days ago)

Revision history for this message
Georgi Georgiev (chutz) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.