A fatal error or timeout occurred while processing this directive - Fix this cPanel error ?








Sometimes, cPanel Administrators experiences error,  'A fatal error or timeout occurred while processing this directive'.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related cPanel errors.


Cause and solutions for A fatal error or timeout occurred while processing this directive

As started earlier, WHM/cPanel interface can give timeout errors occasionally, if the packages are outdated:

[A fatal error or timeout occurred while processing this directive.]
OR
[A warning occurred while processing this directive.]


1. This is due to the error with rpm database.

Firstly, from cPanel log in the server /usr/local/cpanel/logs/error_log:

STDERR: error: rpmdb: BDB0113 Thread/process 14329/139871898372160 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 – (-30973)
error: cannot open Packages database in /var/lib/rpm
error: rpmdb: BDB0113 Thread/process 14329/139871898372160 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm

To fix this error, do the following:

i. Firstly, we update the RPM packages using “yum update” command.

ii. Then, remove all db files from rpm directory and rebuild the database:

# rm -f /var/lib/rpm/__db*
# db_verify /var/lib/rpm/Packages
# rpm –rebuilddb
# yum clean all


2. cPanel installation or template is corrupted.

From cPanel log in the server /usr/local/cpanel/logs/error_log:

[2021-05-03 09:57:24 +0000] die [Internal Death while parsing ./frontend/paper_lantern/ssl/install.html.tt 15562] Template::Exception:
[TYPE]=[undef]
[INFO]=[SSL::installed_hosts() failed: Unrecognized vhost: “second-addon-domain.com.customer-main-domain.com” at /usr/local/cpanel/Cpanel/Config/WebVhosts.pm line 292.
]
[TEXT]=[]
at cpanel.pl line 1267.
cpanel::cpanel::cptt_exectag(“/usr/local/cpanel/base/frontend/paper_lantern/ssl/install.htm”…, 1) called at cpanel.pl line 5226
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 874
cpanel::cpanel::script(“cpanel::cpanel”, “./frontend/paper_lantern/ssl/install.html.tt”) called at cpanel.pl line 304

Also, the Customer added an addon domain addon-domain.com. 

For some reason, apache virtual host for this site is missing. This domain was not listed in cPanel to remove it using cPanel.


To fix this error, try the following tips:

i. If we run just cPanel, do cpanel force update:

# /scripts/upcp –force
# /scripts/checkperlmodules

If we run cPanel with CloudLinux, do LVE Manager update:

# yum update lvemanager

ii. Then, we need to manually remove all entry for this domain from following locations:

/var/cpanel/users/$username
/var/cpanel/userdata/$username/

Example:

root@server [/var/cpanel/users]# grep addon-domain /var/cpanel/users/*
/var/cpanel/users/ibmimedia:XDNS1=addon-domain.com
/var/cpanel/users/ibmimedia:XDNS2=addon-domain.customer-main-domain.com
root@server [/var/cpanel/users]#
Removed the two entries from the file /var/cpanel/users/ibmimedia

Now in users data folder, check for the domain:

root@server [/var/cpanel/users]# cd /var/cpanel/userdata/bob/
root@server [/var/cpanel/userdata/ibmimedia]# ls -l | grep addon-domain.com
-rw-r–r– 1 root root 719 May 03 06:27 addon-domain.com.customer-main-domain.com_SSL
-rw-r–r– 1 root root 764 May 03 06:27 addon-domain.com.customer-main-domain.com_SSL.cache
root@server [/var/cpanel/userdata/ibmimedia]# rm -f addon-domain.com.customer-main-domain.com_SSL
root@server [/var/cpanel/userdata/ibmimedia]# rm -f addon-domain.com.customer-main-domain.com_SSL.cache


3. When we create a cPanel account from root WHM account we are getting this error:

[wpfmb type=’error’ theme=2]Fatal error or timeout occurred while processing this directive] [an error occurred while processing this directive[/wpfmb]

It is due to permission issues.


To fix this error, Execute following commands in /home:

# chown username.username username -R
# chown username.mail username/etc -R
# chown username.nobody username/public_html
# rm -rf username/.cpanel

Then log out and log in back into cPanel. This will regenerate the .cpanel directory.


4. The file /var/cpanel/whm/nvdata/root.yaml seems to have been corrupted.

From cPanel log:

Magic number checking on storable file failed at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 414, at /usr/local/cpanel/Cpanel/SafeStorable.pm line 69
Carp::croak(‘Magic number checking on storable file failed at /usr/lib/perl5/…’) called at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 38
Storable::__ANON__(‘Magic number checking on storable file failed at /usr/lib/perl5/…’) called at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 415
Storable::fd_retrieve(‘GLOB(0x1d4a980)’, 0) called at /usr/local/cpanel/Cpanel/SafeStorable.pm line 69
Cpanel::SafeStorable::fd_retrieve(‘GLOB(0x1d4a980)’) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 120
eval {…} called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 120
Cpanel::CachedDataStore::loaddatastore(‘/var/cpanel/whm/nvdata/root.yaml’, 0, ‘HASH(0x1d3e340)’, undef) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 39
Cpanel::CachedDataStore::load_ref(‘/var/cpanel/whm/nvdata/root.yaml’, ‘HASH(0x1d3e340)’) called at /usr/local/cpanel/Cpanel/CachedDataStore.pm line 29
Cpanel::CachedDataStore::fetch_ref(‘/var/cpanel/whm/nvdata/root.yaml’) called at /usr/local/cpanel/Whostmgr/NVData.pm line 41
Whostmgr::NVData::get_ref() called at whostmgr/bin/whostmgr10 line 402
main::themecommand_tmpl(‘main’) called at whostmgr/bin/whostmgr10 line 252

To fix this error, simply Move the file /var/cpanel/whm/nvdata/root.yaml to /var/cpanel/whm/nvdata/root.yaml.bk.


[Need assistance in fixing cPanel errors? We can help you. ]



Conclusion

This article covers different methods to tackle Cpanel error 'a fatal error or timeout occurred while processing this directive'.

Basically, WHM/cPanel interface can give timeout errors occasionally, if the packages are outdated.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com