Systemd: shutdown hangs without daemon-reload

I've recently encountered this problem since I've moved arch over to an SSD. I'm not sure if this is directly related though. I've implemented a user session as per the systemd/user wiki page. The logs suggest that all of my system and session services seem to stop correctly except for the user-session service. I get a message on shutdown which is something like "a stop job is running for [email protected]". Running systemctl daemon-reload before shutdown fixes this for some reason, even when I haven't edited any of the units. The systemctl -a output is the same before and after the reload, so I don't know how to find out what it is actually doing to fix this. Is there any way to find out what this changes in order to diagnose the problem?

I have the same problem using systemd user sessions on two separate computers, one without an SSD.
`systemctl daemon-reload` also fixes this for me.
Last edited by kotharia (2013-07-13 07:44:15)

Similar Messages

  • [solved] systemd shutdown scripts

    I'm trying to configure network-ups-tools to properly shutdown UPS after system is halted, so UPS and server could restart when the line power is regained. network-ups-tools contains /usr/lib/systemd/system-shutdown/nutshutdown shell script which checks if shutdown was caused by nut-monitor daemon and in this case shuts down the UPS. Unfortunately it seems that script isn't executed.
    According to man systemd-shutdown:
    Immediately before executing the actual system halt/poweroff/reboot/kexec systemd-shutdown will run all executables in /usr/lib/systemd/system-shutdown/ and pass one arguments to them: either "halt", "poweroff", "reboot" or "kexec", depending on the chosen action.
    It sounds logical to use this feature rather than service executed at shutdown as this script will immediately cut the power.
    I've created /usr/lib/systemd/system-shutdown/test.sh which writes echo $1 to file, but it also does not seem to be executed. What am I doing wrong?
    Last edited by denn (2013-11-29 07:12:20)

    Right, I use this feature also for my UPS (APC). Did you set the right file mode (0755) ?
    In my case:
    /usr/lib/systemd/system-shutdown/apc_killpower
    #!/bin/sh
    if [ -f /etc/apcupsd/powerfail -a "$1" = "poweroff" ]; then
    /etc/apcupsd/apccontrol killpower
    fi
    At that point / is mounted ro, your file should be writed to /run for example, then from "initramfs" after pivot_root (if you have enabled shutdown hook) you can see it (just execute "ash" in /run/initramfs/shutdown at some point , ie just before poweroff

  • Systemd: run cloudprint.py daemon

    Hi!
    I tried to use cloudprint.py to use Google cloudprint with my USB printers. Running it as user and root is working fine ("normal" and daemon mode). The problems started, when I tried to create a systemd service file, to start it automatically at boot.
    Here is the service file I came up with
    [Unit]
    Description=Google Cloudprint
    Requires=cups.service
    After=cups.service network.target
    [Service]
    User=root
    Type=forking
    PIDFile=/var/run/cloudprint.pid
    ExecStart=/usr/bin/python2 /usr/bin/cloudprint -d -p /var/run/cloudprint.pid
    [Install]
    WantedBy=multi-user.target
    The first problem was that the daemonized app still wanted to write to /dev/tty. I changed the paths for stdout/stderr to /dev/null and got daemon mode working.
    Authentication/login and printer update is working fine, but after some time the service gets terminated by systemd ("operation timed out"). If I start the script manually (without systemd) it keeps running, but if I start it using systemd it is terminated after about one minute.
    x200s# systemctl status cloudprint.service
    cloudprint.service - Google Cloudprint
    Loaded: loaded (/etc/systemd/system/cloudprint.service; disabled)
    Active: failed (Result: exit-code) since Fri 2013-02-15 22:22:40 CET; 2min 27s ago
    Process: 10939 ExecStart=/usr/bin/python2 /usr/bin/cloudprint -d -p /var/run/cloudprint.pid (code=exited, status=1/FAILURE)
    Feb 15 22:21:10 x200s systemd[1]: Starting Google Cloudprint...
    Feb 15 22:21:14 x200s cloudprint.py[10939]: Updated Printer HP_Deskjet_5900_series_USB_CN68G1Z0DM04KF_HPLIP
    Feb 15 22:21:16 x200s cloudprint.py[10939]: Updated Printer HP_DJ_5940
    Feb 15 22:21:19 x200s cloudprint.py[10939]: Updated Printer Deskjet_6980_series
    Feb 15 22:21:21 x200s cloudprint.py[10939]: Updated Printer HP5940
    Feb 15 22:21:23 x200s cloudprint.py[10939]: Updated Printer HP_5940_rbp
    Feb 15 22:22:40 x200s systemd[1]: cloudprint.service operation timed out. Terminating.
    Feb 15 22:22:40 x200s systemd[1]: cloudprint.service: control process exited, code=exited status=1
    Feb 15 22:22:40 x200s systemd[1]: Failed to start Google Cloudprint.
    Feb 15 22:22:40 x200s systemd[1]: Unit cloudprint.service entered failed state
    I could not get any other information on what could trigger the error. As far as I have seen no exception gets thrown and systemd terminates the process.
    The script is using python-daemon (DaemonRunner). Could this cause problems in combination with systemd or the pid-file? I am not very experienced with troubleshooting systemd services or python daemons
    Any help is greatly appreciated
    Edit: If I choose "oneshot" instead of "forking" it works, but I'm not sure if this is just a hacky way to get it running or if this is ok?
    thx!
    matt
    Last edited by m@tt (2013-02-16 10:09:07)

    tomk wrote:
    Jobbe wrote:
    I used systemd:
    systemctl enable httpd.service
    which didn't produce any errors. nor output at all.
    It should have given you this output:
    ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
    I just tried this command (after i did a disable)
    sudo systemctl enable httpd.service
    which gave this output:
    ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
    tomk wrote:Have you successfully enabled other services?
    yes, I got GDM working - with trouble! (systemd didn't work as expected either)
    tomk wrote:
    Jobbe wrote:
    Also this command works, so I don't think it's the httpd service that have a problem.
    systemctl enable httpd.service
    That's the enable command again - did you mean 'systemctl start'?
    I did. Sorry!
    Still httpd is not running ..

  • Propagation Queue hanged without any error.

    Hi All,
    We have bi-directional replication using streams on 10g database.Last night propagation process hanged without any error in any of the queue.
    We tried to restart it but propagation queue didnt stop.It just went into infinite loop.
    Finally we have to kill the session.Then we restarted the database and everything worked fine.
    Just curious what happened there is no error so far neither in the queue nor in alert log/trace files.
    Please help!!!
    Thanks for all your help!!!
    Kind Regards
    Rahul

    There is insufficient information here to help you.
    If you have not patched to 10.2.0.4 that might be something to put on your radar sooner rather than later.

  • Weird : Database Hangs without any message in Alert File

    Hi
    We have production database 10.2.0 , in the last 3 days database database has to be restarted as it hangs without any information in the Alert File.
    No trace file is genrated at that time.
    Only SYS user Can LOGIN to the database.
    I had no other option but to restart
    Database is in NO ARCHIVE MODE
    There is Enough Space in Temporary Tablespace and all other tablespace.
    NO patches were applied to the database
    NO parameters has been modified
    When i check the CPU usage its normal.
    There is Enough Disk Space.
    This is procution and i apreciate Help.
    Thank You

    user6421665 wrote:
    Only SYS user Can LOGIN to the database.
    What is the OS ? Windows --> Did you check virus scan or some other process running during that time ?
    Unix / Linux --> Is sysadmin running a defrag on the disks or some other OS Utility ?
    Do you login as SYS from the server ? Can you login as any other user from the server ?
    Hang == Slow ?
    >
    This is procution and i apreciate Help.
    Production database in NOARCHIVE log mode... is interesting by itself, but that is not a question here.

  • OBIEE 11.1.1.6 installation hangs without any error or warning

    Hi all,
    I'm trying to install OBIEE 11.1.1.6 on a previous 11.1.1.5 installation, on Windows Server 2003 Enterprise Edition. I followed the instructions on the "Oracle® Fusion Middleware Upgrade Guide for Oracle Business Intelligence 11g Release 1 (11.1.1)" manual, "Moving from 11.1.1.3 or 11.1.1.5 to 11.1.1.6" paragraph.
    All checks give positive result but then installation hangs without any error or warning. I tried 3 times with the same behaviour.
    Any suggestion? Anyone having similar problems?
    Thanks in advance,
    Cristina

    The only error I get (in the Windows application event viewer) is:
    [nQSError: 12002] Socket communication error at call=recv: (Number=10054) An existing connection was forcibly closed by the remote host
    Any suggestion?
    Thanks,
    Cristina

  • Systemd: shutdown order

    Is there a counterpart to 'After=' for shutting down services in a particular order?
    I wrote a unit file that shall wrap an old init-script which handles initialization and backup of some ramdisks (tmpfs):
    [Unit]
    Description=Persistent ramdisks
    Requires=local-fs.target
    After=local-fs.target
    [Service]
    Type=simple
    RemainAfterExit=true
    ExecStart=/etc/rc.d/ramdisks start
    ExecStop=/etc/rc.d/ramdisks stop
    [Install]
    WantedBy=graphical.target
    Startup works fine and in the correct order, but when it comes to shutdown the 'ExecStop=' command is issued late: local filesystems are often unmounted already and my ramdisks are lost.
    Any idea how to make sure the stop command gets executed before local filesystems are unmounted?
    Regards,
    lynix

    Place the script in /usr/lib/systemd/system-shutdown/ see systemd-shutdown(8).
    Example: https://wiki.archlinux.org/index.php/Us … ra#apcupsd
    PS: I love trance!
    Last edited by djgera (2012-11-05 14:35:48)

  • RunInstaller hang without apparently errors

    The runInstaller hang without apparently error (nothing in the installActions.log, .err and .out)
    We originally install 8.1.7.0 64bits on a Sparc 5.8 64 bits without problem, after this, we apply patch 8.1.7.4.1.
    Now are necessary installing interMedia software from CD 8.1.7.0 but the runInstaller from CD or in the Sparc hang without errors.
    Please, any help will be appreciated!
    Any way to trace runInstaller or to find the cause of the hang...
    Thanks,
    Diego L.
    [email protected]

    We found a workaround, but not satisfy.
    We make a "truss -f -o /tmp/intaller.truss -p <pid>" for the runInstaller process and when it hang, we abort the truss "Ctrl+C" and run it again.
    This method "pick up" the runInstaller and the installation continue for some minutes, when the runInstaller hang again we repeat the process (abort the truss and run it again) until the end of installation. :(
    We see the truss output and appreciate the same patron when the runInstaller hang... always after a SIGNAL 14 (timeout).
    Thanks!
    Any help will be apreciated.
    [email protected]

  • Shutdown hangs up on my Qosmio

    HELP--Not exactly computer illiterate but no guru either.
    Shutdown hangs up on my computer. I get the following messages after I hit "shutdown"
    Nvidia TwinWindow View end now
    TouchEd Window end now
    Config Free end now
    Toshiba Raid console end now
    tfswctrl.exe end now
    By the time I click on "end now" for each of this and get to the last prompt, the computer hangs there forever and I have to shutdown with the off button. This just started.
    Help please!
    Thanks :)

    Obviously those listed running processes can not be ended as usual. Like Joao already posted, try to use system restore tool and roll back the operating system to created system restore point. Use data before it starts. I hope everything will be as before.

  • Pacman should run `systemd daemon-reload` when updating .service files

    Every time pacman updates a service like ngingx; I would like to restart that service to propagate the changes. However; systemd always complains that the service file was updated. It would be nice if pacman would do this for me. Is it possible to extend pacman in userland, so I can execute this command whenever a .service file is touched? Or should I write a pacman wrapper that uses inotify to detect this?
    Anyone knows if this is currently possible? I'm also interested in feedback; I'll post a feature-request on the bugtracker depending on your replies
    Last edited by Spider.007 (2013-11-23 13:32:54)

    graysky wrote:Glad to hear the underlying code is coming together.  I have noticed that nfs exports simply stop working when the nfs-utils package is updated, so having the underlying services restart after the update would be a welcomed addition.
    You could have systemd watch for changes to a relevant file or directory and restart the service. Not as neat but possibly useful if you haven't thought of it already.

  • Applications won't launch, shutdown hangs

    Hi All,
    I've seen posts with similar symptoms to mine, but none with a fix:
    Everything was running fine, then all of a sudden applications refused to launch. First it was System Preferences, then Console.app, then SubEthaEdit - nothing could be launched any more. Running applications worked fine, so at least I was able to save my work and shut all apps down.
    I had a Terminal.app running and was able to have a look at which processes were running, etc. but couldn't see anything that looked like a rogue process or anything which was hogging resources.
    Next, I tried to HUP the Dock, but it went and didn't come back.
    I then tried to log out. Everything was closed, but the background remained and the system did not log out.
    The only button that still worked was the power button - it brought up the restart / shutdown menu fine. But when I selected either restart or shutdown, nothing happened. The mouse was working fine also BTW. I also noticed that while I was able to change the volume with the usual keys, the see-through icons didn't appear - only the 'ping' sound was made.
    The system came up fine, and everything appears to be working at the moment - no problems launching apps etc.
    I checked the Console and didn't see anything particularly out of the ordinary. I saw spindump entries for all the apps I'd tried to launch, but which didn't (they were added to the Dock, but without the 'active' dot underneath them, and I was able to context-click and Force Quit them from the Dock). I also saw hang logs for each app corresponding to the time when they wouldn't launch.
    The only slightly weird thing that happened before all the crazy madness was that my AirPort connection suddenly went wobbly. It lost its connection all together and it took a while for me to convince it to come back online. The AirPort Utility didn't show either base station reporting any problems (I have a TimeCapsule as the main base station and an AirPort Express extending that network out to the office). The system was trying to perform a backup at the time - not sure if that's what was causing the weirdness.
    Next time it happens, I might try HUPping the window server or something to see what happens then. Of course, I'm hoping it doesn't happen again
    Any hints / tips / experiences / etc more than welcome
    Cheers,
    C

    I have now added back all the items which were in my original Logins List except for "Spark Daemon" (a shortcuts manager), which I no longer have on my system. Leopard appears to be running fine now. Perhaps populating the list again was all that was needed.

  • Linux-ck 3.9.3 disabling IRQ #16 shutdown hang

    Hi!
    It just happened again: my system hangs on Disabling IRQ #16, just ater "Storage is finalized" systemd output. It won't poweroff...
    As title says, i'm using latest linux-ck, with bfq scheduler, atom optimized, from gravsky's repo.
    Any idea?
    Thanks!
    Last edited by nierro (2013-05-30 09:52:26)

    I have a PF kernel, not CK (and no hp-related hardware), and it happens to me occasionally, but I rarely reboot/shutdown.
    However, I frequently put the laptop to sleep and it just hangs  before shutting down the screen. The sleep LED keeps blinking indefinitely (it should only be blinking during sleep initialisation), and no errors are being printed out, but I suspect it is the same cause as with reboot when the aforementioned printout is visible.
    It affects ~50% of sleep cycles, which means that when I put laptop to sleep, I lose my work 50% of the time.
    Last edited by Lockheed (2013-06-27 22:48:55)

  • Shutdown hangs with pulsing circle

    Lately, when I shut down my imac, the process just hangs on the blue screen with the pulsing circle. Sometimes it does shut down all the way but most times it will not.
    When I do a repair disk, it will shut down for the next couple of days but then go back to the hang.
    Is there a way that I can look in a log or something as to what is making the computer hang?
    Thanks for any help or adivce on this,
    paul

    Hey Alan,
    Thanks for Hijacking my post man.... geez..
    Anyhooo, It does not happen on another user just on mine,
    Here is my log from yesterday
    Jun 15 17:27:38 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9841]): posix_spawn("/Library/Application Support/iStat local/iStatLocal", ...): No such file or directory
    Jun 15 17:27:38 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9841]): Exited with exit code: 1
    Jun 15 17:27:38 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal): Throttling respawn: Will start in 10 seconds
    Jun 15 17:27:48 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9846]): posix_spawn("/Library/Application Support/iStat local/iStatLocal", ...): No such file or directory
    Jun 15 17:27:48 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9846]): Exited with exit code: 1
    Jun 15 17:27:48 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal): Throttling respawn: Will start in 10 seconds
    Jun 15 17:27:52 paul-squillaces-imac Microsoft Outlook[306]: Periodic CFURLCache Insert stats (iters: 556) - Tx time:0.045657, # of Inserts: 4, # of bytes written: 14088, Did shrink: NO, Size of cache-file: 22528, Num of Failures: 0
    Jun 15 17:27:58 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9847]): posix_spawn("/Library/Application Support/iStat local/iStatLocal", ...): No such file or directory
    Jun 15 17:27:58 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9847]): Exited with exit code: 1
    Jun 15 17:27:58 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal): Throttling respawn: Will start in 10 seconds
    Jun 15 17:28:08 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9848]): posix_spawn("/Library/Application Support/iStat local/iStatLocal", ...): No such file or directory
    Jun 15 17:28:08 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9848]): Exited with exit code: 1
    Jun 15 17:28:08 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal): Throttling respawn: Will start in 10 seconds
    Jun 15 17:28:10 paul-squillaces-imac [0x0-0x36036].com.activestate.Komodo[0]: SciMoz was not closed correctly before destructor called.
    Jun 15 17:28:18 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9851]): posix_spawn("/Library/Application Support/iStat local/iStatLocal", ...): No such file or directory
    Jun 15 17:28:18 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal[9851]): Exited with exit code: 1
    Jun 15 17:28:18 paul-squillaces-imac com.apple.launchd.peruser.501[213] (com.bjango.istatlocal): Throttling respawn: Will start in 10 seconds
    Jun 15 17:28:20 paul-squillaces-imac com.apple.launchd.peruser.501[213] ([0x0-0x23023].com.apple.ImageCaptureExtension2[376]): Exited: Killed
    Jun 15 17:28:23 paul-squillaces-imac /Library/Image Capture/Devices/HPScanner.app/Contents/MacOS/HPScanner[366]: ERROR: Image Capture Extension went away!
    Jun 15 17:28:24 paul-squillaces-imac loginwindow[48]: DEAD_PROCESS: 48 console
    Jun 15 17:28:25 paul-squillaces-imac shutdown[9855]: halt by paulsquillace:
    Jun 15 17:28:25 paul-squillaces-imac shutdown[9855]: SHUTDOWN_TIME: 1308173305 580423
    Jun 15 17:28:25 paul-squillaces-imac DFFinderWindowServer[9852]: Could not get Finder window list (NSInvalidReceivePortException): connection went invalid while waiting for a reply
    Jun 15 17:28:27 paul-squillaces-imac SystemStarter[41]: VirtualBox Support and USB Drivers (9859) did not complete successfully
    Jun 15 17:28:27 paul-squillaces-imac SystemStarter[41]: The following StartupItems failed to stop properly:
    Jun 15 17:28:27 paul-squillaces-imac SystemStarter[41]: /Library/StartupItems/VirtualBox
    Jun 15 17:28:27 paul-squillaces-imac SystemStarter[41]:  - execution of Startup script failed
    Jun 15 17:28:27 paul-squillaces-imac imagent[257]: Quit - notifying about shutdown
    Jun 15 17:28:27 paul-squillaces-imac imagent[257]: Quit - shutting down daemon
    Jun 15 17:28:27 paul-squillaces-imac imagent[257]: [Warning] imagent shutting down
    Jun 15 17:28:27 paul-squillaces-imac mDNSResponder[18]: mDNSResponder mDNSResponder-258.18 (Jan 18 2011 20:25:03) stopping
    Jun 15 17:28:27 paul-squillaces-imac DirectoryService[11]: BUG in libdispatch: 10J869 - 1960 - 0x10004004
    Jun 15 17:28:27 paul-squillaces-imac imagent[257]: Unable to create APS daemon connection: (ipc/mig) server died
    Jun 15 17:28:27 paul-squillaces-imac imagent[257]: Unable to set enabled topics: (ipc/send) invalid destination port
    Jun 15 17:28:27 paul-squillaces-imac /Applications/FaceTime.app/Contents/PrivateFrameworks/IMCore.framework/imagent. app/Contents/MacOS/imagent[257]: BUG in libdispatch: 10J869 - 1960 - 0x10004004
    Jun 15 17:28:27 paul-squillaces-imac diskarbitrationd[13]: SCDynamicStoreCreate[WithOptions] configopen(): Unknown service name
    Jun 15 17:28:27 paul-squillaces-imac CS5ServiceManager[2865]: CGSShutdownServerConnections: Detaching application from window server
    Jun 15 17:28:27 paul-squillaces-imac CS5ServiceManager[2865]: CGSDisplayServerShutdown: Detaching display subsystem from window server

  • Shutdown CRS without shuting down database?

    hi forum
    It's all know that if I shutdown the CRS, the CRS daemon will shutdown the database as part of it shutdown procedure.
    How can I shutdown the CRS without shuting down the database ?
    Thank you for your time.

    hi all
    I have found the solution:
    follow steps below:
    1) use crs_stop to stop the database resource
    2) use srvctl remove to remove the database
    3) startup the database
    Now the database is not under control of the CRS.
    You can later use srvctl add database back to the CRS if you want the CRS manages the database for you.
    Thanks for your time.

  • Rc.shutdown hangs on shutdown/reboot

    Hi,
    I installed Arch two weeks ago. Unfortunately it hangs at shutdown/reboot. It stopps succesfully the network-daemon and stops at this point. Keyboard and Mouse are responding but I'm unable to log in via a different console.
    The daemon that should be stopped after network is syslog-ng.
    My daemons:
    DAEMONS=(syslog-ng !hotplug !pcmcia network nscd portmap fam nfslock netfs ypbind autofs crond gdm)
    I was able to reboot the system succesfully by disabling syslog-ng in the rc.conf and commenting out following lines of the rc.shutdown:
    #!/bin/bash
    # /etc/rc.shutdown
    . /etc/rc.conf
    . /etc/rc.d/functions
    # avoid staircase effect
    /bin/stty onlcr
    echo " "
    printhl "Initiating Shutdown..."
    echo " "
    if [ -x /etc/rc.local.shutdown ]; then
    /etc/rc.local.shutdown
    fi
    if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
    # Shutdown daemons
    let i=${#DAEMONS[@]}
    while [[ i -ge 0 ]]; do
    if [[ `echo ${DAEMONS[$i]} | grep '^[^!]' | wc -l` -eq 1 ]]; then
    /etc/rc.d/${DAEMONS[$i]#@} stop
    fi
    let i=i-1
    done
    # find any leftover daemons and shut them down
    # these lines cause my system to stop the shutdown
    #if [ -d /var/run/daemons ]; then
    # for daemon in `ls /var/run/daemons`; do
    # /etc/rc.d/$daemon stop
    # done
    #fi
    fi
    # Terminate all processes
    stat_busy "Sending SIGTERM To Processes"
    /sbin/killall5 -15 &> /dev/null
    /bin/sleep 5
    stat_done
    I have absolutely no idea why my system is acting this way.
    [UPDATE]
    I tried using syslogd instead of syslog-ng but there's still the same problem. Why does my system dislike a system-logger this much?

    *bump*
    I have an almost identical problem to this one.  Which would be the most pertinent system, and log files one would need to help me trouble shoot this?
    Mike

Maybe you are looking for