----- Original Message -----
From: "Tushar Patel" <tupatel (at mark) ecpi.com>
To: <coba-e (at mark) bluequartz.org>
Sent: Friday, October 26, 2007 10:08 AM
Subject: [coba-e:10965] admserv not starting back
> Hi,
>
> I just install backup gu from Nuonce and some how it wont show up in the
> server gui, so I thaught I will restart the admserv, bad idea now I can't
> even start it back.
>
> some how it will stop, put some process must be taking 444 port.
>
> Any idea what I can do to start it back?
>
>
>
> [root (at mark) ns10 init.d]# ./admserv stop
> Stopping admin web server: httpd.admsrv [ OK ]
> [root (at mark) ns10 init.d]# ./admserv start
> Starting admin web server: (98)Address already in use: make_sock: could
> not
> bind to address 0.0.0.0:444
> no listening sockets available, shutting down
> Unable to open logs
> [FAILED]
> [root (at mark) ns10 init.d]# ./admserv stop
> Stopping admin web server: httpd.admsrv [ OK ]
> [root (at mark) ns10 init.d]# ./admserv stop
> Stopping admin web server: httpd.admsrv [ OK ]
> [root (at mark) ns10 init.d]#
>
>
> Thanks in advance.
>
> Tushar
Tushar
The script I have set to run periodically is
#!/usr/bin/perl
##################################################################
# checks the admserv process and restarts if necessary
#################################################################
$mailprog = '/usr/sbin/sendmail';
$running = "no";
$processtokill = "nothing";
require 'setup.conf';
@ps =`ps auxwwwww | grep httpd | grep admsrv`;
$aps = "@ps";
foreach $line (@ps){
if ( ($line =~ /usr\/sbin\/httpd.admsrv/) ) {
#print "The all is well\n";
$running = "yes";
}
}
if ($running eq "no") {
print "admserv problem \n";
open (MAIL, "|$mailprog -t") || &safe_die("Can't open
$mailprog!\n");
print MAIL "From: $sendto\n";
print MAIL "Reply-To: $sendto\n";
print MAIL "To: $sendto\n";
print MAIL "Subject: $serverdomain admserv restart\n\n";
system ("/etc/rc.d/init.d/admserv stop");
sleep (5);
$fuser =`/sbin/fuser 444/tcp`;
chomp ($fuser);
($prev0, $processtokill) = split(/tcp:/,$fuser);
print "The /fuser of 444 is $fuser \n";
if ($processtokill =~ /\d/){
system ("kill -9 $processtokill");
print MAIL "I killed $processtokill \n";
print "I killed $processtokill \n";
}
system ("/etc/rc.d/init.d/admserv start");
print MAIL "The ps is $aps \n";
print MAIL "The /fuser of 444 is $fuser \n";
print MAIL "444 process $processtokill \n";
close (MAIL);
}