systemd is systemv times one hundred!
See all
Members (3,275)
Harald Hoyer's profile photo
Michal Sekletár's profile photo
Lennart Poettering's profile photo
systemd's profile photo
Malar Kannan's profile photo
Glenn Holmer's profile photo
Ivan Ilic's profile photo
Clayton Casciato's profile photo
brain power's profile photo
Mauro Toffanin's profile photo
Petru-Vasile Avram's profile photo
Jean Jacques's profile photo
Jeremy Page's profile photo
Anton “tony” Bangratz's profile photo
Johan Heikkilä's profile photo
Chester Moy's profile photo
Max N. Boyarov (zotrix)'s profile photo
Николай Кирчев's profile photo
Joshua D'Almeida's profile photo
Andy Webster's profile photo
Shaowu Tseng's profile photo
Dhaval Giani's profile photo
Harrison Teng's profile photo
Flavião !'s profile photo

Stream

Join this community to post or comment

Anthony Kamau

Discussion  - 
 
Slow SSH login on new CentOS 7 LXC Container.

I have read, and suffered the same consequence of restarting d-bus and not restarting systemd-logind, whereby SSH connections take an awfully long time to get to the remote prompt. After much reading, I found this post:

http://serverfault.com/questions/792486/ssh-connection-takes-forever-to-initiate-stuck-at-pledge-network

The question then is - "If systemd-logind needs to be restarted if d-bus is restarted, why isn't systemd-logind bound to d-bus?"

For instance, I have a zebra.service file that when restarted/stopped, also restarts/stops ospfd.service and vice versa. In zebra.service, I have a 'Wants=ospfd.service' in the [Unit] section and in ospfd.service I have a 'BindsTo=zebra.service' also in the [Unit] section. Shouldn't this be the default for such interdependent services?

Anyone care to explain why it's not?
2
1
David Ford (FirefighterBlu3)'s profile photoMichael Chapman's profile photo
9 comments
 
You say "the onus is on upstream caring to fix the issues rather than ignore and close because they haven't replicated it". But that just raises three questions.

First, if they can't replicate the bug, how can you expect them to fix it? Second, if you're hitting the bug so frequently, but few other people are, have you considered that the bug may actually require specific circumstances to hit, and thus be hard to reproduce?. Third, if upstream can replicate the bug, is there any evidence to show they've ignored it?

As I said earlier, I think what you've described is actually a real bug. But I don't think the way you're working around it is particularly good, and, moreover, I see no evidence that you've ever engaged upstream to get it fixed. That's your problem.

G+ is not a support channel.
Add a comment...

Edward Torvalds

Discussion  - 
 
I am getting 'mount-start-limit-hit' error for my automount ( https://paste.gnome.org/po8awhulm ). After sometime if the device gets available systemd does not tries to auto-mount it, how can I solve this problem?
device is remote samba share.
thanks
1
Add a comment...

Nate Hardt

Discussion  - 
 
Hello,
I have an issue with machined where a vm has crashed, the process is gone, but it still shows up in machinectl output. Is there a mechanism for machined to reconcile this situation?

Things that work: reboot, machinectl terminate vmname.
Things that don't work: restarting libvirtd, systemctl restart systemd-machined.service.

A little background, this is an automated system for vm management. I can always run 'machinectl terminate vm' just before starting a vm as a work around, but it feels like that is a bit of a hack. I'm still working on a clean repro, it happens maybe 1% of the time when killing off the underlying block driver, causing a panic in the VM.

Thanks in advance for any guidance or help!
Nate
1
Nate Hardt's profile photo
 
Digging around some more, it looks like machined stores its data about what vms are running in /var/run/systemd/machines/. This matches what I am seeing in that my dead VM is still listed.

Looking through the code here: https://github.com/systemd/systemd/blob/master/src/machine/machined.c it further seems like on restart it just iterates /var/run/systemd/machines and re-adds everything to its list.

I guess the strange thing is that there is some mechanism to handle this situation as everything works fine most of the time. In looking through the libvirt code that calls TerminateMachine, I found this bug listed as being worked around in the libvirt code: https://bugs.freedesktop.org/show_bug.cgi?id=68370

Listed as fixed but the original reporter still says he can repro it. I guess maybe my simplest option is to just call terminate on a vm before starting it.

I guess I should mention this is on a rhel 7.2 variant.

If this triggers a light bulb for anyone would be happy to hear about it (or even a pointer if there is a better place to ask about this). Thanks!
Nate
Add a comment...

Darryl Bond

Discussion  - 
 
I have a mythtv backend that doubles as a desktop machine. i want to prevent anyone pressing the shutdown button from shutting down or rebooting the box.
The mythtv service runs as the user mythtv.
I have tried
Exec=/bin/systemd-inhibit /bin/mythbackend ...
in the mythbackend.service file. This does nothing and does not show in systemd-inhibit --list. I assume, because it is run as User=mythtv.

I would like to only allow shutdown/reboot if the mythbacked service is stopped.


1
Colin Guthrie's profile photoDarryl Bond's profile photo
5 comments
 
Yep, that worked. My policy now has:
polkit.addRule(function(action, subject) {
polkit.log(action.id);
if (action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off-ignore-inhibit" ||
action.id == "org.freedesktop.login1.reboot-ignore-inhibit" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.reboot")
return polkit.Result.NO;
});
The multiple sessions action.id was the one that fixed it but I included ignore-inhibit.
Add a comment...

Anthony Kamau

Discussion  - 
 
I'm working on a project and I've created a simple service file for:

[Unit]
Description=My Service
After=network.service

[Service]
WorkingDirectory=/opt/myservice
Environment=LOGFILE=/var/log/myservice.log
Type=forking
Restart=always
ExecStart=/opt/myservice/myserviceprocess

[Install]
WantedBy=multi-user.target

When this service is running fine, it forks a child, the child prints a message out, does some data processing and terminates when done.

After 4 connections, I expected to see 4 log lines in the log file as indicated below:

Child process 1 handling the connection...
Child process 2 handling the connection...
Child process 3 handling the connection...
Child process 4 handling the connection...

I see this instead:

Child process 1 handling the connection...
Child process 1 handling the connection...
Child process 2 handling the connection...
Child process 1 handling the connection...
Child process 2 handling the connection...
Child process 3 handling the connection...
Child process 1 handling the connection...
Child process 2 handling the connection...
Child process 3 handling the connection...
Child process 4 handling the connection...

Obviously there's something wrong somewhere **(most likely my limited understanding of systemd)** and I need to fix it as I'm getting tired of manual intervention when partition fills up - it's a small hobby server so doesn't have a large HDD!

Cheers.
1
Simon Lindgren's profile photoAnthony Kamau's profile photo
18 comments
 
Well, I never got closure on this as the project was dropped. I'll post back if/when we resume and we're still having similar issues.

Thanks all for your assistance, especially you, +Simon Lindgren.
Add a comment...

Wout Mertens

Discussion  - 
 
Is it possible to run systemd in user mode as a task scheduler?
…on a non-systemd Linux?
…on OS X?
…on Windows?

I'm asking because it would be super nice to have only one configuration for services across OSes, whether they are run by root or by a user…
1
Wout Mertens's profile photoChungy Nexen's profile photo
4 comments
 
systemd already has a --user option that runs on user sessions, it shouldn't require systemd-as-init to be running, but I don't think that scenario is tested often.

As for the other operating systems, they'll have to implement their own systemd-compatible layers.
Add a comment...
 
Is there a way to change the severity of the message sent to the syslog daemon when a unit goes into a failed state? Currently it's "warning".
1
Add a comment...

Quinn Shanahan

Discussion  - 
 
I want to add some visibility to this because it's really been frustrating me:

http://stackoverflow.com/questions/37010497/systemd-unit-is-killed-immediately-after-starting-resque

systemd is killing my service right after it starts.. but if I start it myself then systemd is able to run it too... very weird. 
3
Quinn Shanahan's profile photo
9 comments
 
christian: as I said earlier, this works with a "simple" process type and running it in the foreground, so this enforces the conclusion that the WorkingDirectory is correct
Add a comment...

Marko Subasic

Discussion  - 
 
I am trying to schedule a daily backup service using systemd, but with no success. I would like to do a full sync of my home directory from local SSD to local HDD during the poweroff sequence. The backup service gets started during the poweroff sequence (wanted by the powetoff.target), but the target drive gets unmounted prior to any writing, so the backup script fails. This happens most of the time, and on rare occasions, the backup service succeeds because it starts writing to HDD prior to unmounting. My question is: how can a service unit started during the poweroff sequence, prevent a mount from being unmounted during the execution of the unit? The unit file and a few more details on my setup can be found here: http://ubuntuforums.org/showthread.php?t=2317181

Any suggestions?
Thanks in Advance.
I am trying to do a backup of home directory from local SSD to local HDD on a desktop PC running Ubuntu 15.10. The idea is to perform a synchronization using rsyncrypto during the poweroff equence, because there are no file operations in home directory at that time, and I don't really care if the sync takes some time. So I created this systemd unit: Description=backup to internal HDD before shutdown Before=umount.target poweroff.target Aft...
1
Marko Subasic's profile photo
10 comments
 
+Michael Chapman Finally success! I am using ExecStop directive, as you suggested. Thu unit is started by user-1000.slice (when I log in), and it is stopped by the conflicting poweroff.target. Stopping of my unit is scheduled after stopping of local-fs.target. Full unit file with comments is here  http://ubuntuforums.org/showthread.php?t=2317181

Thanks for pointing me in the right direction. I am getting the results that I want, but please let me know if my approach is messy in any way.
Add a comment...

Steve Youngs

Discussion  - 
 
Lost colour from boot messages in v229

After updating to v229 (from v221) I'm no longer getting coloured '[ OK ]' in the boot messages. I know it still works because I do get it in the initrd portion of the boot (dracut). I also do get colour when something takes too long and has that little red horizontal scrolly asterix.

Does anyone know what might be going on? I've checked the git logs and scoured the net for clues, but so far I'm stumped. :-(
1
Add a comment...

About this community

A community for all things +systemd

Jared White

Discussion  - 
 
I am interested in becoming a contributor and adding support for specifying time zones when setting up timers for a service.

Can anyone point me in the direction of who I should talk to about this?
1
Jared White's profile photoCarey Riley's profile photo
3 comments
 
+Jared White how do you do that now? How do you configure times with the present system?
Add a comment...

Björn Bidar

Discussion  - 
 
I currently use systemd in early boot (initramfs) with systemd-generator-cryptsetup (sd-encrypt on arch here). Is it possible to read the key to encrypt the volume from a tpm module?
1
Add a comment...

Anthony Kamau

Discussion  - 
 
Help me understand `BindsTo=`

I have 2 services - call them A and B. I want service B to be started/stopped/restarted when I start/stop/restart service A. To this end, I've used `BindsTo=A.service` in B's service file and this works as intended for start/stop/restart. Good.

Now, I've also got the `Restart=always` in both service files. However, when service B enters `failed` state for whatever reason, it is not restarted - why?

3
Add a comment...

Wojtek Swiatek

Discussion  - 
 
Hello

When looking at systemd-nspawn I had the problem os passing arguments to "systemctl start systemd-nspawn@mycontainer.service", where mycontainer is a debbootstrap-generated base system.

What is the correct way to pass a parameter (like "--network-bridge=br0") to systemctl?
1
Elias Probst's profile photoWojtek Swiatek's profile photo
5 comments
 
Thanks. I just found http://superuser.com/questions/961165/start-systemd-nspawn-systemd-container-on-boot where it is mentioned that machine.target must be enabled.

I also explicitely enabled systemd-nspawn@machinename.service. It now boots.
Add a comment...

Simon Frei

Discussion  - 
 
Hi,
I am having this issue, that I have a user service that is dependent on two local mounts. Should be easily done, so I set
After=local-fs.target
I first tried with Requires as well, but that gives an error, as apparently user services cannot depend on system targets, but no error on After=. Whether this ordering is followed on boot I cannot say, as at the time I login local-fs.target is reached anyway. However on shutdown systemd starts unmounting local mounts and stopping the user script at the same time. As this user script takes its time to exit and accesses disk heavily, unmounting fails with target is busy. I expected that because of the specified After= in the user service systemd would first stop this service, then stop the services of local-fs.target.
What did I get wrong there? Any help appreciated.
Cheers,
Simon
1
Add a comment...
 
Interesting discussion: https://github.com/tmux/tmux/issues/428
With systemd 230 we switched to a default in which user processes started as part of a login session are terminated when the session exists (KillUserProcesses=yes). See https://github.com/systemd/s...
1
1
Michael Chapman's profile photoOlav Vitters's profile photo
9 comments
 
+Michael Chapman: Somehow never saw your reply until now. Thanks for explaining!
Add a comment...

Michael Murphy

Discussion  - 
 
Systemd users might find this useful. This is an application that I've written with the Rust programming language with GTK3 as the chosen front-end of choice for managing systemd services on your desktop. It is one of my first attempts at writing a GTK3 GUI application with the Rust systems programming language.

https://github.com/mmstick/systemd-manager
systemd-manager - A systemd service manager written in Rust with the GTK-rs wrapper and direct integration with dbus
23
1
Chungy Nexen's profile photoAnthony Kamau's profile photo
3 comments
 
Michael,
As a first attempt, this is waaay more than awesome! I see a very bright future for neat looking apps on the Linux desktop from you!
Add a comment...
 
Hi all!
Is there a way with systemd to exec a command on another tty without root privileges?
Eg: i'd like to start htop on a second tty from may be a desktop file from my kde desktop.
Is this possible?

Thanks everyone!
1
Federico Di Pierro's profile photoTetja Rediske's profile photo
3 comments
 
To start? sure, but you can specify which user gets logged in and which program is started.
Add a comment...
 
From my talk last night for the Reliability Engineering Meetup hosted at Facebook:
9
11
Add a comment...
 
Hi there!

Will +systemd (I mean systemd-as-PID1) be related to http://www.bus1.org somehow? According to the documentation published up to now, this project will have its own PID1 binaries (org.bus1.init and org.bus1.rdinit).
Version 1. Index. Overview. org.bus1.bootstrap(7) · Git repositories. Services. org.bus1.activator(1) · org.bus1.administrator(1) · org.bus1.coredump(1) · org.bus1.devices(1) · org.bus1.init(1) · org.bus1.rdinit(1). Kernel Module ...
3
Jan Alexander Steffens (heftig)'s profile photo
 
The bus1 project is a sandbox for a couple of Red Hat engineers to experiment with and develop new technologies. AFAIK it's currently cooking a multicast messaging system (the kernel part) and an init system for IOT devices.

I would expect that successful designs will eventually find their way into systemd.
Add a comment...