LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-03-2009, 01:37 AM   #1
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Rep: Reputation: 15
Red face Starting killall... hangs on reboot!


while doing soft rebooting of server using "init 6" or "reboot" or "shutdown -r now" failed to reboot the server.
The system hangs at - "Starting killall". Require hard reboot for the servers
Any help in resolving this issue will be great
 
Old 05-03-2009, 04:14 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
What does it do when trying a shutdown?
Code:
shutdown -h now
If it hangs doing this, then how about changing through the init levels until you find which one is causing the issue:

Code:
init 4
init 3
init 2
init 1
init 0
EDIT:

When going to Run Level 0 the last two scripts to be called are:
S00killall
S01halt

The message "Starting killall" would be called at this point to shutdown any services that are still running. The fact that your machine is hanging at this point suggests that there are services that are still running that the script is unable to kill.

It may be worth adding a bit of logging to this script.

Last edited by Disillusionist; 05-03-2009 at 04:28 AM.
 
Old 05-03-2009, 05:51 AM   #3
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Red face

Quote:
Originally Posted by Disillusionist View Post
What does it do when trying a shutdown?
Code:
shutdown -h now
If it hangs doing this, then how about changing through the init levels until you find which one is causing the issue:

Code:
init 4
init 3
init 2
init 1
init 0
EDIT:

When going to Run Level 0 the last two scripts to be called are:
S00killall
S01halt

The message "Starting killall" would be called at this point to shutdown any services that are still running. The fact that your machine is hanging at this point suggests that there are services that are still running that the script is unable to kill.

It may be worth adding a bit of logging to this script.
yes Also i have this problem in shutdown -h now but in init1,2 is OK, Be informed that we have automatic startup script for start and stop application server and asdb automatically. I want the command that can find the related services that killall try to stop
 
Old 05-03-2009, 06:13 AM   #4
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Red face

yes Also i have this problem in shutdown -h now but in init1,2 is OK, Be informed that we have automatic startup script for start and stop application server and asdb automatically. I want the command that can find the related services that killall try to stop
 
Old 05-03-2009, 12:36 PM   #5
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
The killall script (/etc/init.d/killall) is run when entering run level 0

I have edited the version on my system (modifications in red):
Code:
#! /bin/bash

# Bring down all unneeded services that are still running (there shouldn't
# be any, so this is just a sanity check)
echo "Starting /etc/init.d/killall" > /killall.log

case "$1" in
   *start)
      ;;

   *)
      echo $"Usage: $0 {start}"
      exit 1
      ;;
esac

for i in /var/lock/subsys/* ; do
      echo "Found $i" >> /killall.log

      # Check if the script is there.
      [ -f "$i" ] || continue

      # Get the subsystem name.
      subsys=${i#/var/lock/subsys/}

      # Networking could be needed for NFS root.
      [ $subsys = network ] && continue

      # Bring the subsystem down.
      if [ -f /etc/init.d/$subsys.init ]; then
            /etc/init.d/$subsys.init stop
      elif [ -f /etc/init.d/$subsys ]; then
            /etc/init.d/$subsys stop
      else
            rm -f "$i"
      fi
done

echo "Finished /etc/init.d/killall script" >> /killall.log
This should create a log of what services the killall script is trying to kill, and hopefully provide a starting point for your investigation.

Last edited by Disillusionist; 05-03-2009 at 12:38 PM.
 
  


Reply

Tags
application, automatic, automatically, can, command, find, related, script, server, services, shutdown, start, startup, stop


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reboot hangs Mithrilhall Linux - General 2 12-08-2006 02:15 PM
HELP, cannot reboot! Hangs at "Starting Firewall" medic215 Linux - Security 3 09-05-2006 02:58 PM
FC4 hangs after reboot. Is it possible to manually reboot to find problem hathmann Fedora 5 08-13-2006 03:57 AM
PC hangs after reboot... MatMan5959 Linux - General 2 08-11-2002 04:23 PM
Killall fails at shutdown/reboot. JMC Linux - General 6 07-22-2002 06:45 PM


All times are GMT -5. The time now is 11:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration