We usually get wrapper errors while adding subdomains and addon domains, parked domains etc in Cpanel. If you can read the cpanel error logs carefully, you can understand how cpanel works. Here is an example of the same. I got the hint to resolve this issue while reading the error_log.
Cpanel Error displayed on Browser :
Error from domain wrapper: Bind reloading on advanced using rndc zone: [testdomain.com] Bind reloading on central using rndc zone: [testdomain.com] Bind reloading on central2 using rndc zone: [testdomain.com]
Cpanel Error Log reads as follows :
Thu Jul 31 22:50:39 2008 warn [Cpanel::CachedDataStore]: YAML in ‘/var/cpanel/userdata/testuser/main’ is not a hash or array reference at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 204
Cpanel::CachedDataStore::_copy_ref_data(‘
<\h1\>An error has occurred. Please upload and replace this index/default page. We apologize for the inconvenience.<\/\h1\>
‘, HASH(0×8a70ba4), ‘/var/cpanel/userdata/testuser/main’) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 171
eval {…} called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 167
Cpanel::CachedDataStore::loaddatastore(‘/var/cpanel/userdata/testuser/main’, 0, HASH(0×8a70ba4)) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 44
Cpanel::CachedDataStore::load_ref(‘/var/cpanel/userdata/testuser/main’, HASH(0×8a70ba4)) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 34
Cpanel::CachedDataStore::fetch_ref(‘/var/cpanel/userdata/testuser/main’) called at /usr/local/cpanel/Cpanel/Config/userdata.pm line 651
Cpanel::Config::userdata::load_userdata(‘testuser’, ‘main’) called at /usr/local/cpanel/Cpanel/Config/userdata.pm line 678
Cpanel::Config::userdata::load_userdata_main(‘testuser’) called at /usr/local/cpanel/Cpanel/Config/userdata.pm line 143
Cpanel::Config::userdata::add_sub_domain_data(HASH(0×878db98)) called at /usr/local/cpanel/Cpanel/Sub.pm line 171
Cpanel::Sub::addsubdomain(‘force’, 0, ‘rootdomain’, ‘testdomain.com’, ’subdomain’, ‘imhsup1′, ‘usecannameoff’, 0, ‘documentroot’, ‘/home/testuser/public_html/imhsup1′, ‘user’, ‘testuser’) called at bin/domainadmin.pl line 166
[Cpanel::CachedDataStore]: YAML in ‘/var/cpanel/userdata/testuser/main’ is not a hash or array reference
not a reference at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 184
Cpanel::AdminBin::adminrun(domain) set error in context subdomain
Thu Jul 31 22:50:39 2008 warn [subdomain::addsubdomain]: Encountered error in subdomain::addsubdomain: Error from domain wrapper: Bind reloading on advanced using rndc zone: [testdomain.com]
Bind reloading on central using rndc zone: [testdomain.com]Bind reloading on central2 using rndc zone: [testdomain.com]
at /usr/local/cpanel/Cpanel/EventHandler.pm line 48
Cpanel::EventHandler::event(1, ‘post’, ’subdomain’, ‘addsubdomain’, HASH(0×97907a0), ARRAY(0×9134928)) called at /usr/local/cpanel/Cpanel/SubDomain.pm line 179
Cpanel::SubDomain::addsubdomain(‘imhsup1′, ‘testdomain.com’, 0, 0, ‘public_html/imhsup1′) called at cpanel.pl line 3021
main::dosubdomain(‘addsubdomain($FORM{\’domain\’},$FORM{\’rootdomain\’},0,0,$FORM{\’dir\’})’) called at cpanel.pl line 1778
main::exectag(”) called at cpanel.pl line 4809
main::dotag(‘addsubdomain’) called at cpanel.pl line 4676
main::cpanel_parseblock(SCALAR(0×9114234)) called at cpanel.pl line 4628
main::cpanel_parse(GLOB(0×93a6188)) called at cpanel.pl line 1311
Root Cause :
main file in Userdata folder of the domain testdomain.com found to be having some HTML content instead of ASCII text.
Resolution :
Remove the content of the file /var/cpanel/userdata/testuser/main and add the following line :
main: ASCII text
This should resolve the problem



