Accounts missing from list after server migration

mrmister

Registered
Dec 26, 2010
4
0
51
Hi everyone,

I have a few domains on a VPS with cPanel and because of a HDD issue the provider moved the VPS to a new server with diferent IP.
The problem is that after this operation I get the cPanel login asking for the user and Password and if I type the correct user and password for any of my accounts I get "Login Attempt Failed!".

In order:
- When I went to WHM there were no accounts on "list accounts"
- After searching thru the forum I SSH'd and edited \etc\trueuserdomains and \etc\userdomains, added the domaind.tld: user for my domains and ran /scripts/rebuildhttpdconf
- ran "service cpanel restart" and "/scripts/updateuserdomains"
- The accounts still wouldn't show up so I created a new account and deleted it and now all the accounts show up on the accounts list but if I try to access any of the account functions like change the IP address I only get a blank frame.


Also:
- Since when I tried to edit the DNS Zone to change the IP to the new one I would get "Failed to fetch zone: domaind.tld.db" I had to delete the zones and create them again and now can edit with no issues. For good measure I did a "/scripts/rebuilddnsconfig" and get no errors.
- when I do a "ls /var/cpanel/users" I have all the users there
- I've seen one of the answers be to use the \scripts\rebuildcpusers but I don't have that script in \scripts
- Whenever there's an "Account Selection" panel, if I select the account that I created, I can see the account information on the right but if I select one of the pre-existing accounts all I get on the right is "Updating Account Information..."

Using WHM VPS optimized 3 (11.28.52) and cPanel 11 on CENTOS 5.5 i686 virtuozzo.

I really need some help with this, please.

EDIT: Inside the \home directory the user dirs have as owner only a number (the user id I assume) and not the username. also, on \etc\password the users that should exist since they belong to the accounts do not exist.

I assume that since the users do not exist this might be the cause of all these issues.
So, considering that I have all the files needed to recreate the accounts, what should I do?
I considered terminating the account and recreating it but when I try I get "Account Removal Status: failed (System user cvlcom does not exist!)"
 
Last edited:

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
It could be several reasons but your host should be the one troubleshooting this for you and fixing it.

1- Permissions of your /home/user folders did not remain intact after the transfer so you may have to manually correct permissions of all your users.

2- Your VPS may be hitting a disk resource limit or quotaugid limit after the transfer. Your host should be able to check this for you. A simple diagnostic on your end would be checking the available limits other than quotaugidlimit which can be checked at node level by your host admins.

df -h
df -i
cat /proc/user_beancounters (in case your VPS is using the UBC system)

Hi everyone,

I have a few domains on a VPS with cPanel and because of a HDD issue the provider moved the VPS to a new server with diferent IP.
The problem is that after this operation I get the cPanel login asking for the user and Password and if I type the correct user and password for any of my accounts I get "Login Attempt Failed!".

In order:
- When I went to WHM there were no accounts on "list accounts"
- After searching thru the forum I SSH'd and edited \etc\trueuserdomains and \etc\userdomains, added the domaind.tld: user for my domains and ran /scripts/rebuildhttpdconf
- ran "service cpanel restart" and "/scripts/updateuserdomains"
- The accounts still wouldn't show up so I created a new account and deleted it and now all the accounts show up on the accounts list but if I try to access any of the account functions like change the IP address I only get a blank frame.


Also:
- Since when I tried to edit the DNS Zone to change the IP to the new one I would get "Failed to fetch zone: domaind.tld.db" I had to delete the zones and create them again and now can edit with no issues. For good measure I did a "/scripts/rebuilddnsconfig" and get no errors.
- when I do a "ls /var/cpanel/users" I have all the users there
- I've seen one of the answers be to use the \scripts\rebuildcpusers but I don't have that script in \scripts
- Whenever there's an "Account Selection" panel, if I select the account that I created, I can see the account information on the right but if I select one of the pre-existing accounts all I get on the right is "Updating Account Information..."

Using WHM VPS optimized 3 (11.28.52) and cPanel 11 on CENTOS 5.5 i686 virtuozzo.

I really need some help with this, please.

EDIT: Inside the \home directory the user dirs have as owner only a number (the user id I assume) and not the username. also, on \etc\password the users that should exist since they belong to the accounts do not exist.

I assume that since the users do not exist this might be the cause of all these issues.
So, considering that I have all the files needed to recreate the accounts, what should I do?
I considered terminating the account and recreating it but when I try I get "Account Removal Status: failed (System user cvlcom does not exist!)"
 
Last edited:

mrmister

Registered
Dec 26, 2010
4
0
51
EDIT2: After checking /usr/local/apache/conf/httpd.conf I noticed that the VirtualHosts for the various websites were not created and there was only a VirtualHost for "*".
I went to "Show Active and Inactive Accounts" on WHM, noticed that there were 2 domains inactive (none of them the one i was trying to get up, that one was active) so I activated them all and now httpd.conf has all virtualhosts created.
The issue is that the website still won't load , now the only thing that shows up is "You don't have permission to access / on this server.".
------------------------------------------------------------------------------

EDIT1: Right, since I had backups, I took the chance and created the users again
useradd cvlcom -d /home/cvlcom
passwd cvlcom
chown cvlcom.cvlcom /var/cpanel/users/cvlcom -R
chown cvlcom.cvlcom /home/cvlcom -R
I can now login to cPanel with this account, I get the information of the account on WHM and the issue I had where there was only a empty frame if I tried to edit the account seems to be fixed.

Now, what I do have is on cPanel, between "Monthly Bandwidth Transfer" and "Hosting package" I get a message "[a fatal error or timeout occurred while processing this directive]" and if I click on it I get:

Not an ARRAY reference at /usr/local/cpanel/Cpanel/Ftp.pm line 458.
Cpanel::Ftp::listftp() called at /usr/local/cpanel/Cpanel/Ftp.pm line 462
Cpanel::Ftp::countftp() called at /usr/local/cpanel/Cpanel/StatsBar.pm line 57
Cpanel::StatsBar::api2_stat('rowcounter', 'mainstats', 'infinitylang', 'true', 'display', 'emailac_counts|subdomains|parkeddomains|addondomains|ftpaccounts...') called at (eval 77) line 1
eval '$dataref = [Cpanel::StatsBar::api2_stat(%{$rCFG})];' called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 84
Cpanel::Api2::Exec::api2_exec('StatsBar', 'stat', 'HASH(0xab5a3a4)', 'HASH(0xab638b0)') called at cpanel line 600
main::real_cpexectag('<?cp StatsBar::stat(^J [tr class="row-%"]^J [td class="s...') called at cpanel line 3827
main::dotag_finished_headers(0) called at cpanel line 3612
main::cpanel_parseblock('<table width="100%" id="stats_extended" class="truncate-table" c...') called at cpanel line 3560
main::cpanel_parse('GLOB(0xab8594c)') called at cpanel line 2433
main::doinclude('/usr/local/cpanel/base/frontend/x3/branding//extended_statsbar.h...', 0, 1) called at /usr/local/cpanel/Cpanel/Branding.pm line 49
Cpanel::Branding::Branding_include('extended_statsbar.html') called at (eval 74) line 1
eval 'Cpanel::Branding::Branding_include(@{$argref});' called at cpanel line 1131
main::real_exectag('<?cp StatsBar::stat(^J [tr class="row-%"]^J [td class="s...') called at cpanel line 3824
main::dotag_finished_headers(0) called at cpanel line 3612
main::cpanel_parseblock('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "...') called at cpanel line 3560
main::cpanel_parse('GLOB(0x9e8017c)') called at cpanel line 2433
main::doinclude('/usr/local/cpanel/base/frontend/x3/branding//index.html', 0, 1) called at /usr/local/cpanel/Cpanel/Branding.pm line 49
Cpanel::Branding::Branding_include('index.html') called at (eval 4) line 1
eval 'Cpanel::Branding::Branding_include(@{$argref});' called at cpanel line 1131
main::real_exectag('<?cp StatsBar::stat(^J [tr class="row-%"]^J [td class="s...') called at cpanel line 3824
main::dotag_finished_headers(0) called at cpanel line 3652
main::cpanel_parseblock('<cpanel Branding="include(index.html)">^J') called at cpanel line 3560
main::cpanel_parse('GLOB(0x9d2cd18)') called at cpanel line 5048
main::run_standard_mode() called at cpanel line 421
Also, if I try to go to the website using a browser I get automatically redirected to a default webpage "http://domain.tld/cgi-sys/defaultwebpage.cgi" saying:
If you are the web site owner, it is possible you have reached this page because:

* The IP address has changed.
* There has been a server misconfiguration.
* The site may have been moved to a different server.

If you are the owner of this website and were not expecting to see this page, please contact your hosting provider.

Note: Although this site is running cPanel, WebHost Manag
------------------------------------------------------------------------------

It could be several reasons but your host should be the one troubleshooting this for you and fixing it.
True, but since it's an unmanaged VPS it falls on me to do it :(

1- Permissions of your /home/user folders did not remain intact after the transfer so you may have to manually correct permissions of all your users.
I don't really mind rebuilding the accounts since I only have about 5 on the VPS, I'm just not sure on how to go about doing it. Since I have all the files and backups of them I even tried deleting the accounts so that I could recreate them but cPanel will not allow it since the Linux Users do not exist.

2- Your VPS may be hitting a disk resource limit or quotaugid limit after the transfer. Your host should be able to check this for you. A simple diagnostic on your end would be checking the available limits other than quotaugidlimit which can be checked at node level by your host admins.
[email protected] [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 20G 14G 6.2G 69% /
none 256M 4.0K 256M 1% /dev

[email protected] [~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/simfs 10240000 321882 9918118 4% /
none 65536 96 65440 1% /dev

cat /proc/user_beancounters (in case your VPS is using the UBC system)
[email protected] [~]# cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
248: kmemsize 6510707 8778605 2147483646 2147483646 0
lockedpages 0 8 512 512 0
privvmpages 62786 120318 131072 131072 406
shmpages 1935 2591 65536 65536 0
dummy 0 0 0 0 0
numproc 66 99 512 512 0
physpages 34246 77189 0 2147483647 0
vmguarpages 0 0 65536 2147483647 0
oomguarpages 34247 77190 65536 2147483647 0
numtcpsock 30 63 4096 4096 0
numflock 8 14 512 512 0
numpty 1 3 256 256 0
numsiginfo 0 28 512 512 0
tcpsndbuf 527448 1936800 53687296 70464512 0
tcprcvbuf 491520 3600896 53687296 70464512 0
othersockbuf 38224 4334112 53687296 70464512 0
dgramrcvbuf 0 18248 53687296 70464512 0
numothersock 38 56 4096 4096 0
dcachesize 0 0 4718592 4718592 0
numfile 2101 2538 12288 12288 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 47 47 512 512 0

I might be being a bit naive since I don't know how cPanel works internally, but isn't there a way to rebuild the accounts from the files and db on disk?
 
Last edited:

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
EDIT2: After checking /usr/local/apache/conf/httpd.conf I noticed that the VirtualHosts for the various websites were not created and there was only a VirtualHost for "*".
I went to "Show Active and Inactive Accounts" on WHM, noticed that there were 2 domains inactive (none of them the one i was trying to get up, that one was active) so I activated them all and now httpd.conf has all virtualhosts created.
The issue is that the website still won't load , now the only thing that shows up is "You don't have permission to access / on this server.".
------------------------------------------------------------------------------
It is not recommended you edit httpd.conf directly. All virtualhosts metadata is available in /var/cpanel/userdata/user/domainxyz.com file and cPanel rebuilds httpd.conf everytime using this data. You can rebuild httpd.conf by running '/scripts/rebuildhttpdconf'.

EDIT1: Right, since I had backups, I took the chance and created the users again

useradd cvlcom -d /home/cvlcom
passwd cvlcom
chown cvlcom.cvlcom /var/cpanel/users/cvlcom -R
chown cvlcom.cvlcom /home/cvlcom -R

I can now login to cPanel with this account, I get the information of the account on WHM and the issue I had where there was only a empty frame if I tried to edit the account seems to be fixed.
Glad some things are getting fixed but it is not recommended to add cPanel users manually. cPanel creates a Linux user and a corresponding FTP user unless there is a problem with cPanel or the server which is the case here. The perl errors you listed confirm this. You can run '/scripts/checkperlmodules --force' and see if you get the error again.

True, but since it's an unmanaged VPS it falls on me to do it
This could have and may still cost you time worth more than you have saved in purchasing an un-managed server. Since you are a cPanel license holder, you can contact cPanel support at this link and they should be able to assist you regarding this.

Now, what I do have is on cPanel, between "Monthly Bandwidth Transfer" and "Hosting package" I get a message "[a fatal error or timeout occurred while processing this directive]" and if I click on it I get:
You can try running '/scripts/upcp --force' via root and see if this fixes the problem. If not, you can run 'tail -f /usr/local/cpanel/logs/error_log' and open the link in the browser and immediately check the log output to see if it throws an error. This may help you diagnose the cause.

Also, if I try to go to the website using a browser I get automatically redirected to a default webpage "http://domain.tld/cgi-sys/defaultwebpage.cgi" saying:

------------------------------------------------------------------------------
There could be several reasons for this. Make sure site's DNS is pointing to this IP, and its VirtualHost is also against the same IP. A simple ping from your local computer will let you know what IP the site is resolving to.

I don't really mind rebuilding the accounts since I only have about 5 on the VPS, I'm just not sure on how to go about doing it. Since I have all the files and backups of them I even tried deleting the accounts so that I could recreate them but cPanel will not allow it since the Linux Users do not exist.
Linux users are created automatically by cPanel unless your OS has some issues. VPSes face such issues normally when quotaugidlimit hits. This is a parameter on the VPS' parent kernel that limits the number of linux users you can create. You can contact your host to see if this limit is hitting and/or increase it for you. Strangely, you have very small number of accounts and your limit should not hit that quickly.

[email protected] [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 20G 14G 6.2G 69% /
none 256M 4.0K 256M 1% /dev

[email protected] [~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/simfs 10240000 321882 9918118 4% /
none 65536 96 65440 1% /dev
These seem OK.

[email protected] [~]# cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
vmguarpages 0 0 65536 2147483647 0
privvmpages 62786 120318 131072 131072 406
privvmpages determines burstable RAM and it looks like it is set to 512MB which has hit already. This suggests your VPS has hit its memory limit and you either need to optimize your scripts/applications or contact your host to check/upgrade RAM for you. Your guaranteed RAM looks like 256MB which is short for cPanel's scripts like easyapache etc so its highly likely your Apache may not be function/rebuild correctly or may not in the future in case you attempt a recompile via easyapache.

I might be being a bit naive since I don't know how cPanel works internally, but isn't there a way to rebuild the accounts from the files and db on disk?
Once you have enough experience on cPanel, you do understand the core files/folders settings that you need to update to get things back up. You can fix a buggy server but it is hard to list exact steps since they may vary so much depending on the exact state of the issue and there may be so manysteps that can only be applied at run-time. In forum communication, it would be hard to fix it without encountering unacceptable delay in communication.
 
Last edited:

mrmister

Registered
Dec 26, 2010
4
0
51
My sincere thanks in your attempt to help. I've decided that since it's becoming harder to fix, I'll just terminate the accounts and recreate them. Did one of them already and everything is fine with that one.
Should any moderators wish to close this thread, please do.
----------------------------------------------------------------------------

It is not recommended you edit httpd.conf directly. All virtualhosts metadata is available in /var/cpanel/userdata/user/domainxyz.com file and cPanel rebuilds httpd.conf everytime using this data. You can rebuild httpd.conf by running '/scripts/rebuildhttpdconf'.
I ran "/scripts/rebuildhttpdconf" but the virtualhosts weren't being generated so I had to do it manualy in order to get the site back up.

Glad some things are getting fixed but it is not recommended to add cPanel users manually. cPanel creates a Linux user and a corresponding FTP user unless there is a problem with cPanel or the server which is the case here. The perl errors you listed confirm this. You can run '/scripts/checkperlmodules --force' and see if you get the error again.
Yes, I had guessed that cPanel would take care of the users for me, the problem is that I couldn't even terminate the account in order to recreate it since it would complain that the user didn't exist when I tried terminating the account.

This could have and may still cost you time worth more than you have saved in purchasing an un-managed server. Since you are a cPanel license holder, you can contact cPanel support at this link and they should be able to assist you regarding this.
Well, since these aren't business sites, I don't really mind having them down for a bit and this allows me to aquire some knowledge of cPanel. Regarding the cPanel support, I did try their site where they have a input box so you can check your IP address and see if you are entitled to support and it told me no, that that IP was licensed to another company (the provider of my provider perhaps?).

You can try running '/scripts/upcp --force' via root and see if this fixes the problem. If not, you can run 'tail -f /usr/local/cpanel/logs/error_log' and open the link in the browser and immediately check the log output to see if it throws an error. This may help you diagnose the cause.
That was one of the first things I did but that only caused another issue. It seems 11.25 does a graceful restart of Apache every hour. Graceful restart requested, doing restart error - Web Hosting Talk
Seems I have to go back to 11.24.

There could be several reasons for this. Make sure site's DNS is pointing to this IP, and its VirtualHost is also against the same IP. A simple ping from your local computer will let you know what IP the site is resolving to.
Working OK

Linux users are created automatically by cPanel unless your OS has some issues. VPSes face such issues normally when quotaugidlimit hits. This is a parameter on the VPS' parent kernel that limits the number of linux users you can create. You can contact your host to see if this limit is hitting and/or increase it for you. Strangely, you have very small number of accounts and your limit should not hit that quickly.
Yep, don't really need a huge number of users, don't expect to run more than these 5 websites.

privvmpages determines burstable RAM and it looks like it is set to 512MB which has hit already. This suggests your VPS has hit its memory limit and you either need to optimize your scripts/applications or contact your host to check/upgrade RAM for you. Your guaranteed RAM looks like 256MB which is short for cPanel's scripts like easyapache etc so its highly likely your Apache may not be function/rebuild correctly or may not in the future in case you attempt a recompile via easyapache.
I have been running these on this VPS config for about 2 years now and have noticed no issues. Sent an email to the provider asking how much for an increase in RAM, if it's only a few bucks/year I'll go for it.
BTW, I did have to run easyapache because of an issue with a dependency of PHP and mySQL and it compiled all the way with no problems.

Once you have enough experience on cPanel, you do understand the core files/folders settings that you need to update to get things back up. You can fix a buggy server but it is hard to list exact steps since they may vary so much depending on the exact state of the issue and there may be so manysteps that can only be applied at run-time. In forum communication, it would be hard to fix it without encountering unacceptable delay in communication.
This problem has wnabled me to learn a bit more about the internal of cPanel, so not really a huge waste of time :)