Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such device or address: '/dev/stdout' #720

Closed
aexoxea opened this issue Mar 18, 2017 · 2 comments
Closed

No such device or address: '/dev/stdout' #720

aexoxea opened this issue Mar 18, 2017 · 2 comments
Milestone

Comments

@aexoxea
Copy link

aexoxea commented Mar 18, 2017

After updating to v1.1.14, running "backintime --profile-id [id] backup-job" through a systemd service unit (in either system or user session scopes) produces the following:

Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 865, in <module>
    start_app()
  File "/usr/share/backintime/common/backintime.py", line 450, in start_app
    args.func(args)
  File "/usr/share/backintime/common/backintime.py", line 634, in backupJob
    cli.BackupJobDaemon(backup, args).start()
  File "/usr/share/backintime/common/tools.py", line 1365, in start
    self.daemonize()
  File "/usr/share/backintime/common/tools.py", line 1333, in daemonize
    so = open(self.stdout, 'w')
OSError: [Errno 6] No such device or address: '/dev/stdout'

The same command can be run successfully from a terminal, and backups can also be done through the GUI without trouble; it's only when triggered as a service unit. The configuration of the units in question is the same as in #669.

Enabling or disabling the 'Redirect' options under 'Expert options' in the GUI has no effect.

For now, I've downgraded to v1.1.12, so this is mainly aimed at trying to fix this in a future release. Knowing that my setup is a little unusual, I'm happy to help in whatever ways I can to track this down.

Platform: Arch Linux (4.9.14.r201703121245-1-grsec) with python 3.6.0 and systemd 232.

@Germar
Copy link
Member

Germar commented Mar 18, 2017

The Redirect options only take place on automatic created crontab jobs (using predefined schedules in Generals tab). They will add >/dev/null 2>&1 to the command and that's also what I'd recommend in your case.

It looks like systemd doesn't provide stdout and/or stderr. So as long as this bug isn't fixed you should provide it manually in the systemd command with >/dev/null 2>&1.

@aexoxea
Copy link
Author

aexoxea commented Mar 20, 2017

Thank you @Germar for both the fix and the workaround!

I have also re-upgraded to v1.1.14 and applied your workaround through adding the parameter StandardOutput=null to the systemd service files (this cascades, as StandardError=inherit is the default). Happily, the services now run properly again 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants