LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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

Tags used in this thread
Popular LQ Tags , , , , , , , , ,

Reply
 
Thread Tools
Old 05-03-2009, 02:37 AM   #1
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 22
Thanked: 0
Red face Starting killall... hangs on reboot!


[Log in to get rid of this advertisement]
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
saghi is offline     Reply With Quote
Old 05-03-2009, 05:14 AM   #2
Disillusionist
Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 822
Thanked: 48
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 05:28 AM..
Disillusionist is offline  
Tag This Post , , , , , , , , ,
Reply With Quote
Old 05-03-2009, 06:51 AM   #3
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 22
Thanked: 0

Original Poster
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
saghi is offline     Reply With Quote
Old 05-03-2009, 07:13 AM   #4
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 22
Thanked: 0

Original Poster
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
saghi is offline     Reply With Quote
Old 05-03-2009, 01:36 PM   #5
Disillusionist
Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 822
Thanked: 48
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 01:38 PM..
Disillusionist is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
HTML code is Off


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


All times are GMT -5. The time now is 01:04 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration