Can't terminate accounts (old WHM version)

dragos03

Member
Jun 7, 2018
16
3
3
Bucuresti
cPanel Access Level
DataCenter Provider
Hello,

We have an old CentOS 5 server running the latest WHM version (56) available for it. Yes, I know it's an old version and it should be updated but this is just not possible at the moment.

When we try to terminate an account, it doesn't work.

The error in the logs starts with:
Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcUyHa>' is not a PID.
at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/StateFile.
pm line 63.

We tried various workarounds, which have failed.

Any ideas?

Thanks,
Dragos
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hi @dragos03

Now I'm scratching my head, I went through a bunch of old tickets from v56 and those two were the only results I got, with the exception of 1-2 that were related specifically to corrupt/invalid userdata. What's the exact error output in the cPanel error logs at /usr/local/cpanel/logs/error_log
 

dragos03

Member
Jun 7, 2018
16
3
3
Bucuresti
cPanel Access Level
DataCenter Provider
Hello, the full errors look like this:

[2020-01-13 11:14:00 +0200] die [Internal Death while parsing [stdin] 6058] Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcUyHa>' is not a PID. at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/StateFile.pm line 63.
at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/StateFile.pm line 63.
DefaultLogger::throw(DefaultLogger=HASH(0xfc603d8), "Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcU"...) called at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/StateFile.pm line 86
cPanel::StateFile::_throw("cPanel::StateFile", "Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcU"...) called at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/TaskQueue.pm line 261
cPanel::TaskQueue::new("cPanel::TaskQueue", HASH(0xfbf17a0)) called at /usr/local/cpanel/Cpanel/ServerTasks.pm line 28
Cpanel::ServerTasks::queue_task(ARRAY(0xfc09080), "mysqluserstore") called at /usr/local/cpanel/Whostmgr/Accounts/Remove.pm line 1036
Whostmgr::Accounts::Remove::queue_mysqluserstore() called at /usr/local/cpanel/Whostmgr/Accounts/Remove.pm line 608
Whostmgr::Accounts::Remove::_killacct("user", "hwradu", "killdns", 1) called at /usr/local/cpanel/Whostmgr/Accounts/Remove.pm line 933
Whostmgr::Accounts::Remove::_removeaccount("user", "hwradu", "keepdns", 0) called at whostmgr/bin/whostmgr.pl line 1415
main::killacct() called at whostmgr/bin/whostmgr.pl line 735

Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcUyHa>' is not a PID. at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/cPanel/StateFile.pm line 63.

[2020-01-13 11:14:00 +0200] warn [cpsrvd] The subprocess (whostmgr (whostmgr)) exited with an error: The subprocess reported error number 255 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 155.
Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0xcf86748)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 72
Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0xcf86748), "subprocess_name", "whostmgr (whostmgr)", "subprocess_read_handle", IO::Handle=GLOB(0xcf89510), "subprocess_write_handle", IO::Handle=GLOB(0xcf89540), "api_type", "html", ...) called at cpsrvd.pl line 6475
cpanel::cpsrvd::cpHandler("app", "whostmgr", "json", 0, "document", "./scripts/killacct") called at cpsrvd.pl line 5685
cpanel::cpsrvd::dodoc_whostmgrd() called at cpsrvd.pl line 1674
cpanel::cpsrvd::dodoc(HASH(0xf23360)) called at cpsrvd.pl line 1347
cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 841
cpanel::cpsrvd::script() called at cpsrvd.pl line 334
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
So, the whole reason for the error you're getting is the presence of that file....somewhere. Without access to the server, it'd be hard to tell you where it's located, but you can see it quoted in the error message:

Code:
 Invalid lock file: ', mpid=23545, TLS, session=<aleO8daTL9NcUyHa>' is not a PID
So, either that file exists or it's referenced in /var/cpanel/taskqueue/ in one of the files there as a current PID.

What's the output of the following:

Code:
ls -lah /var/cpanel/taskqueue
 

dragos03

Member
Jun 7, 2018
16
3
3
Bucuresti
cPanel Access Level
DataCenter Provider
Hello, this is the output:

[ 11:59:02 [email protected]: ~/ # ls -lah /var/cpanel/taskqueue
total 52K
drwxr-xr-x 2 root root 4.0K Jan 10 22:48 ./
drwxr-xr-x 114 root root 12K Jan 20 11:58 ../
-rw-r--r-- 1 root root 200 Oct 14 17:03 servers_queue.json
-rw-r--r-- 1 root root 54 Apr 27 2015 servers_queue.json.lock
-rw-r--r-- 1 root root 192 Jul 31 18:31 servers_queue.yaml.discarded_after_conversion
-rw-r--r-- 1 root root 283 Jan 10 22:48 servers_sched.json
-rw-r--r-- 1 root root 60 Jul 31 17:42 servers_sched.yaml.discarded_after_conversion
 

dragos03

Member
Jun 7, 2018
16
3
3
Bucuresti
cPanel Access Level
DataCenter Provider
Well, most of our customers don't want to move to another server, as long as the current one works, in order to avoid downtime, the change of IPs, etc.
But we will migrate them all to new servers as soon as WHM will be available for CentOS 8.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Well, most of our customers don't want to move to another server, as long as the current one works, in order to avoid downtime, the change of IPs, etc.
But we will migrate them all to new servers as soon as WHM will be available for CentOS 8.
Ahh I missed the part where you said you were on CentOS 5! I just saw cPanel/WHM v56 :)

It seems at this juncture that moving once CentOS 8 is available is the smartest choice and the one that will provide you with the most longevity. There are a couple of internal teams working on CentOS 8 compatibility right now and hopefully, we should be prepared to support it soon.