cpsrvd failed @... A restart was attempted automagicly.

PowWeb

Active Member
Oct 22, 2004
26
0
151
Every to minutes I get the following email:

cpsrvd failed @ Mon Oct 25 22:48:49 2004. A restart was attempted automagicly.


Also none of my acocunts can open cpanel.

I have tried everything I can think of. I have tried to restart the service (service cpsrvd start) but when I do I get the following error cpsrvd: unrecognized service. I have forced a rebuild of cp. I have tried to rebuild apache but it will not complete it just hangs in WHM. I am at my witts end. My NOC has been no help so far. Support ticket has been open for 12 hours on this and cPanel Inc will not help me until my NOC gives up. Can any one please help???
 

haze

Well-Known Member
Dec 21, 2001
1,550
3
318
What reports when you restart cpanel manually ?
# service cpanel restart
 

PowWeb

Active Member
Oct 22, 2004
26
0
151
Done all that... After 16hours down my noc had me rebuild apache. Then apache crashed and then I could not evern serve web pages. So we ended up transfering all the accoutns to anther server and reinstalling os. :mad:
 

sv1

Well-Known Member
Aug 31, 2003
135
0
166
[email protected]*** [~]# service cpanel restart
Stopping cPanel services: [ OK ]
Stopping pop3 services: [ OK ]
Stopping cPanel log services: [ OK ]
Stopping cPanel Chat services: [ OK ]
Stopping Melange Chat services: [ OK ]
Stopping InterChange services: [FAILED]
Stopping cPanel ssl services: [ OK ]

Stopping mailman services: Traceback (most recent call last):
File "/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl", line 102, in ?
import socket
File "/usr/lib/python2.2/socket.py", line 41, in ?
from _socket import *
ImportError: /lib/libssl.so.4: undefined symbol: krb5_cc_get_principal

Starting SMTP Tweak: [ OK ]
Starting eximstats: DBI connect('eximstats:localhost','eximstats',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/bin/eximstats line 262
Can't Connect at /usr/local/cpanel/bin/eximstats line 265.
[FAILED]
Starting cPanel services: [ OK ]
Starting cPanel Log services: [ OK ]
Starting pop3 services: [ OK ]
Starting cPanel Chat services: [ OK ]
Starting Melange Chat services: [ OK ]
Starting cPanel ssl services: [ OK ]
Starting mailman services: Traceback (most recent call last):
File "/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl", line 102, in ?
import socket
File "/usr/lib/python2.2/socket.py", line 41, in ?
from _socket import *
ImportError: /lib/libssl.so.4: undefined symbol: krb5_cc_get_principal


Is what I get, what a mess I have going on :-(
 

sv1

Well-Known Member
Aug 31, 2003
135
0
166
/scripts/upcp --force

I get this error:

Error 404 while fetching url http://httpupdate.cpanel.net//cpanelsync/STABLE/scripts/.cpanelsync.bz2
...Done

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Success
Input file = /scripts/.cpanelsync.bz2, output file = /scripts/.cpanelsync

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

bzip2: Deleting output file /scripts/.cpanelsync, if it exists.
Fetching http://httpupdate.cpanel.net/cpanelsync/STABLE/scripts/.cpanelsync....Trying httpupdate.cpanel.net @ 69.72.164.151
Error 404 while fetching url http://httpupdate.cpanel.net//cpanelsync/STABLE/scripts/.cpanelsync
...Done
Download Failed... trying again..
Unable to retrieve file
...Failed
Fetching http://httpupdate.cpanel.net/cpanelsync/STABLE/scripts/.cpanelsync.bz2....Trying httpupdate.cpanel.net @ 69.72.164.151
Error 404 while fetching url http://httpupdate.cpanel.net//cpanelsync/STABLE/scripts/.cpanelsync.bz2
...Done

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Success
Input file = /scripts/.cpanelsync.bz2, output file = /scripts/.cpanelsync
 

pinha

Registered
Mar 1, 2004
1
0
151
Fantastico / PHPBB / suexec

Do you have Fantastico installed?
Do you have domains running old PHPBB scripts?
Do you have suexec compiled in apache?

That can be the problem for cpsrvd failing. This process cpsrvd is your cpanel daemon, webmail daemon, and WHM daemon, in one process. Maybe some script is loading to much cpsrvd.
 

itrends

Well-Known Member
Oct 21, 2004
50
0
156
pinha said:
Do you have Fantastico installed?
Do you have domains running old PHPBB scripts?
Do you have suexec compiled in apache?

That can be the problem for cpsrvd failing. This process cpsrvd is your cpanel daemon, webmail daemon, and WHM daemon, in one process. Maybe some script is loading to much cpsrvd.
i got the same problem. the above stuff is not the sollution.
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
My eximstats is started OK (Starting eximstats: [ OK ]) but when I check services trough WHM service status I see "eximstats failed". Process /usr/bin/perl /usr/local/cpanel/bin/eximstats is running normaly. Any ideas why?
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
Yes, and still shows "failed".


ps copy/paste

3632 ? S 0:00 /usr/bin/perl /usr/local/cpanel/bin/eximstats


cpanel copy/paste

eximstats failed
 

pshepperd

Well-Known Member
Feb 12, 2005
147
0
166
did you install exim stats manually or did cpanel do it for you?

/scripts/eximup --force
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
It came with cPanel. I have stopped it, and then when I try to enable it again and cPanel now always shows "failed" status :mad:
 

pshepperd

Well-Known Member
Feb 12, 2005
147
0
166
ok then did you restart checkservd? or checkserved i forget which one.
 

ispro

Well-Known Member
Verifed Vendor
Apr 8, 2004
628
2
168
Here is simple perl script to check if cPanel service actually failed (got Internal Server Error), but not restarted by chkservd (as the processes are running!):

Code:
#!/usr/bin/perl

use strict;
use POSIX;

my $HOSTNAME = `hostname`;
chomp $HOSTNAME;
my $logfile="/var/log/chkserv_own_log";

print "Checking if the important services at $HOSTNAME up & running\n";

cpsrvd_check();

# cpsrvd check
sub cpsrvd_check {
print "\n*** Checking if the cpsrvd has no Internal Server Error... ***\n\n";
my $date = `date`;
print "$date\n";
my $cpsrvd_status = `lynx --dump $HOSTNAME:2086`;
print $cpsrvd_status;
if ($cpsrvd_status =~ m/Internal Server Error/)
    {
    cpsrvd_act();
    }
else
    {
    print "\ncpsrvd has no Internal Server Error.\n";
    }
}

# cpsrvd act
sub cpsrvd_act {
my $message = "cpsrvd stopped! Going to restart it...";
my $subject = "ERROR AT $HOSTNAME: cpsrvd stopped!";
print "\ncpsrvd stopped! Going to restart it...\n";
my $date = `date`;
print "\n$date\n$message\n";
`echo "\n\n\n\n\n\n$date\n$message\n\n" >> $logfile`;
`echo "$date\n$message" | mail -s "$subject" root`;
`killall -9 -v cpsrvd 2>>$logfile;service cpanel restart >> /dev/null 2>&1`;
}
This creates log file at /var/log/chkserv_own_log and mail to root if that server got error.

We have this as a temporary solution.
By the way, this issue going since the end of 2004 (!). We have posted several times, with no valuable information answered...
 

ispro

Well-Known Member
Verifed Vendor
Apr 8, 2004
628
2
168
THE QUESTION:

Is it possible to check WHO are accessing cpsrvd at any chosen time?
Like "ps aux" for processes?

Because the cpsrvd failures may be related to the connections from some domains/accounts and it could help to investigate the issues.