[systemd-devel] sometimes systemd takes a very long time to restart service

JB general at itpsg.com
Tue Jan 1 16:27:07 PST 2013


Hello all,
    I do have one more question about systemd.  Sometimes, it takes a 
really really long time to get a service to stop or restart.  
Othertimes, it doesn't.  Now, when it does take a long time I get 
entires in the logs such as this:

Jan  1 16:23:42 localhost systemd[1]: webrickd.service stopping timed 
out (2). Killing.
Jan  1 16:25:12 localhost systemd[1]: webrickd.service still around 
after SIGKILL (2). Entering failed mode.
Jan  1 16:25:12 localhost systemd[1]: Unit webrickd.service entered 
failed state.
Jan  1 16:25:12 localhost pulseaudio[9196]: main.c: Unable to contact 
D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch 
terminated abnormally with the following error: Autolaunch error: X11 
initialization failed.

Might also be nice to figure out how to get rid of that last pulseaudio 
error as well but I'll do that some other time.

The service is actually no longer running and does stop very quickly but 
systemd still sits there timing out and I have no idea why.

Here is the service file:
***********************************************
[Unit]
Description=DriveSafety Configuration ruby webrick daemon
After=network.target

[Service]
Type=forking
WorkingDirectory=/home/sim/vection/bin
PIDFile=/home/sim/vection/data/logs/simd.pid
ExecStartPre=/home/sim/vection/system/scripts/preStartSimd.sh
ExecStart=/home/sim/vection/bin/simd.rb -d -p 
/home/sim/vection/data/logs/simd.pid
StandardOutput=null
StandardError=null
User=sim
Group=sim
ControlGroup=cpu:/

[Install]
WantedBy=multi-user.target
***********************************************

I don't know why this works sometimes but not others.  I would think if 
the process has ended, it should see that but it doesn't seem to.

Thanks in advance for any ideas on how I can diagnose this or solve it.


JB



More information about the systemd-devel mailing list