SOLVED Terminating Account Issue

saleh2

Registered
Dec 28, 2018
2
0
1
cPanel Access Level
Root Administrator
/usr/local/cpanel/scripts/removeacct laithedugo [options]

API failure: Need “_removed_tls” set! at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 449.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

HostXNow_Chris

Well-Known Member
PartnerNOC
Jan 22, 2016
69
43
68
United Kingdom
cPanel Access Level
DataCenter Provider
Twitter
Removing installed TLS resources …...Failed to enqueue Domain TLS entries for removal: Need FQDN! at /usr/local/cpanel/Cpanel/Domain/TLS.pm line 107.
Cpanel::Domain::TLS::has_tls("Cpanel::Domain::TLS::Write", undef) called at /usr/local/cpanel/Cpanel/Domain/TLS/Write.pm line 331
Cpanel::Domain::TLS::Write::__enqueue_unset_tls_no_task_queue("Cpanel::Domain::TLS::Write", ARRAY(0x13a1618)) called at /usr/local/cpanel/Cpanel/Domain/TLS/Write.pm line 143
Cpanel::Domain::TLS::Write::enqueue_unset_tls(undef, undef) called at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 401
Whostmgr::Accounts::Remove::Cleanup::__ANON__() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line99
eval {...} called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line 90
Try::Tiny::try(CODE(0x31adaa8), Try::Tiny::Catch=REF(0x31cff20)) called at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line405
Whostmgr::Accounts::Remove::Cleanup::_tls(Whostmgr::Accounts::Remove::Cleanup=HASH(0x1420968)) called at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 135
Whostmgr::Accounts::Remove::Cleanup::__ANON__() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line99
eval {...} called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line 90
Try::Tiny::try(CODE(0x34d1ed0), Try::Tiny::Catch=REF(0x3385928)) called at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line149
Whostmgr::Accounts::Remove::Cleanup::run(Whostmgr::Accounts::Remove::Cleanup=HASH(0x1420968)) called at /usr/local/cpanel/Whostmgr/Accounts/Remove.pm line 424
Whostmgr::Accounts::Remove::_killacct("user", "<snipped>", "killdns", 1) called at /usr/local/cpanel/Whostmgr/Accounts/Remove.pm line 948
Whostmgr::Accounts::Remove::_removeaccount("user", "<snipped>", "keepdns", undef, "force", undef) called at bin/removeacct.pl line 72
Use of uninitialized value in hash element at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 414.
Use of uninitialized value in hash element at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 415.
...Failed
Need “_removed_tls” set! at /usr/local/cpanel/Whostmgr/Accounts/Remove/Cleanup.pm line 449.

The cause of this must be because the account already existed on the server with a different domain and when I restored the domain using overwrite option it restored the account with the latest domain different to the domain that was already used for the main domain.

Could not install SSL and now when try to remove the account it does not remove. Seems an old bug caused by allowing an account to be overwritten with the same username and different domain when it shouldn't?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @HostXNow_Chris

We have two cases for this and one is reportedly fixed in v76 of cPanel/WHM where the other similar one is fixed in v80 (not yet released)

Ultimately it stems from broken/missing userdata for that domain on the account which as you speculated most likely existed on the server previously. Can you tell me if /var/cpanel/user/$user/ exists?
 

HostXNow_Chris

Well-Known Member
PartnerNOC
Jan 22, 2016
69
43
68
United Kingdom
cPanel Access Level
DataCenter Provider
Twitter
Yes, the username is there at /var/cpanel/user

Checking the restore I can see cPanel did this

The system replaced the incorrect main domain “<snipped>” with the domain “<snipped>” from the cPanel user file in order to repair the userdata for “<snipped>”.

cPanel should not have allowed the account to be restored with the same username when the domain is different if it does not support it, right? How to correct the problem?

Thanks,
Chris
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @HostXNow_Chris

For this if you're on v76 or higher the case is CPANEL-25278 and the resolutions provided below should be useable.
and it's resolved in v80 but until then the suggested workarounds are as follows:

A. Fix the userdata and then retry removing the account

B. Move the /var/cpanel/userdata/USERNAME folder out of /var/cpanel/userdata (this only works on servers that have the fix for CPANEL-24006
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
can i remove the user in /var/cpanel/users/$USER

I'd suggest fixing the userdata file then attempting to terminate the account, otherwise remove the userdata file and try the same.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @joeyadquest


I'd suggest fixing the userdata and user files then attempting to remove once more as suggested earlier on as a workaround. So readd the user in /var/cpanel/users/$user and ensure it's present in /var/cpanel/userdata/$user then attempt to terminate once more.