Missing Cpanel::CPAN::YAML::Tiny since last update

philpem

Member
Aug 12, 2005
17
0
151
Hi,
Since about an hour ago, my server has started returning this error when it runs the daily cron jobs:

Can't locate Cpanel/CPAN/YAML/Tiny.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/cpaddons /usr/local/cpanel/whostmgr/docroot/cgi /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.6.2 /usr/lib/perl5/site_perl .) at /usr/local/cpanel/Cpanel/cPAddons.pm line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/cPAddons.pm line 10.
Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/d

Does anyone know what's going on? Bug 4195 (http://bugzilla.cpanel.net/show_bug.cgi?id=4195) mentions a change to Yaml, but doesn't say much else.

OS is Fedora Core 4, WHM 10.8.0, cPanel 10.9.0-C135.

Thanks,
Phil.
 

isputra

Well-Known Member
May 3, 2003
574
0
166
Mbelitar
I'm using WHM 10.8.0 cPanel 10.9.0-C136 CentOS 3.8 i686 but still I'm getting the same error
 

Lyttek

Well-Known Member
Jan 2, 2004
775
5
168
fixed on mine

WHM 10.8.0 cPanel 10.9.0-C136
CentOS 4.4 i686 - WHM X v3.1.0
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Another error may appear:

YAML READ ERROR:
Failed to load YAML document from string at
/usr/local/cpanel/Cpanel/cPAddons.pm line 2492

If you receive that error, it's due to incorrect ownership of a .yaml file in /home/user/.cpaddons/

The problem file will have root ownership and root group. Changing the owner and group to the user will resolve the issue.
 

jcsolutions

Well-Known Member
Nov 4, 2002
181
0
166
Canada
Thanks for posting this latest fix. I just upgraded to cPanel 10.9.0-C138 last night and that's the exact error being reported. The ownership change worked.
 

felix220

Active Member
Aug 12, 2001
29
0
301
Another error may appear:

YAML READ ERROR:
Failed to load YAML document from string at
/usr/local/cpanel/Cpanel/cPAddons.pm line 2492

If you receive that error, it's due to incorrect ownership of a .yaml file in /home/user/.cpaddons/

The problem file will have root ownership and root group. Changing the owner and group to the user will resolve the issue.
will this also be fixed? this error shows when updating the addon scripts via WHM and it means otherwise that we need to correct the ownership/group of each user for the CPanel 'script-o-tron update-o-matic' to work... :eek:
 

jcsolutions

Well-Known Member
Nov 4, 2002
181
0
166
Canada
Run the following script. It'll fix all accounts quick, fast, and in a hurry! :cool:

(Complements of CPSkins "...with the help of Dan from cpanel".)

Code:
#!/usr/bin/perl

use strict;
use warnings;

use File::Slurp;

for my $user( read_dir('/home') ) {
      next if !-d "/home/$user";
      print "Starting $user...\n";
      next if !-d "/home/$user/.cpaddons";

       for my $reg  ( read_dir("/home/$user/.cpaddons/") ) {
             my ($uid, $gid) = (getpwnam( $user ))[2,3];
             chown $uid,$gid,"/home/$user/.cpaddons/$reg" or warn qq;
{Could not chown "/home/$user/.cpaddons/$reg to $user ($uid - $gid)};
       }
}
If you need to install Slurp, just click "Install a Perl Module" in WHM, search for "File::Slurp", install.
 
Last edited:

rs-freddo

Well-Known Member
May 13, 2003
828
1
168
Australia
cPanel Access Level
Root Administrator
Another error may appear:

YAML READ ERROR:
Failed to load YAML document from string at
/usr/local/cpanel/Cpanel/cPAddons.pm line 2492

If you receive that error, it's due to incorrect ownership of a .yaml file in /home/user/.cpaddons/

The problem file will have root ownership and root group. Changing the owner and group to the user will resolve the issue.
I was getting this error and fixed the owner and group and now cpaddons will only produce some of the cpaddons page (this part page stuff was happening on some accounts on the server that didn't have YAML problems):
"cPAddon cPanel::CMS::E107

This is a cPanel packaged module. (v0.1)

Website http://e107.org/"

That's it, cpaddons is stuffed, I'm running the latest release.
Anyone know where the error log is for cpaddons?

BTW we had one customer uninstall a cpaddon and the uninstall process wiped out ALL files in her account. I suggest cpaddons in the latest release is seriously flawed.

If you don't fix the YAML ownership this is the error:
cPAddon cPanel::CMS::E107

This is a cPanel packaged module. (v0.1)

Website http://e107.org/
[a fatal error or timeout occurred while processing this directive]

YAML READ ERROR:

Failed to load YAML document from string at /usr/local/cpanel/Cpanel/cPAddons.pm line 2492

Description: (v0.7.5)
e107 is a content management system written in" ...... yada yada yada
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Anytime you see [a fatal error or timeout occurred while processing this directive], check the contents of /usr/local/cpanel/logs/error_log There often is more useful information posted there.

The YAML read error means the file it was attempting to read was not in YAML format.

In WHM, go to the Manage cPAddons section and generate a report showing all installed cAPddons. That will convert the currently installed cPAddon files to the YAML format.

If that doesn't work then obviously there is something else happening.
 

rs-freddo

Well-Known Member
May 13, 2003
828
1
168
Australia
cPanel Access Level
Root Administrator
Anytime you see [a fatal error or timeout occurred while processing this directive], check the contents of /usr/local/cpanel/logs/error_log There often is more useful information posted there.

The YAML read error means the file it was attempting to read was not in YAML format.

In WHM, go to the Manage cPAddons section and generate a report showing all installed cAPddons. That will convert the currently installed cPAddon files to the YAML format.

If that doesn't work then obviously there is something else happening.
I can confirm that this error only occurs on accounts with cpaddons already installed. However showing all cpaddons does not convert the existing installs to YAML format - the error remains after doing this. All cpaddons show in WHM without errors.

So I need a short script that will convert all installs to YAML format?
 

rs-freddo

Well-Known Member
May 13, 2003
828
1
168
Australia
cPanel Access Level
Root Administrator
Thu Mar 1 13:48:45 2007 warn [cPAddons]: couldn't make missing yaml out of store
Thu Mar 1 13:48:45 2007 warn [cPAddons]: at /usr/local/cpanel/Cpanel/cPAddons.pm line 2472
Cpanel::cPAddons::_read_cache('/var/cpanel/cpaddons_moderated', 'HASH(0x9b4e8dc)') called at /usr/local/cpanel/Cpanel/cPAddons.pm line 75
Cpanel::cPAddons::cPAddons_init() called at (eval 23) line 1
eval 'Cpanel::cPAddons::cPAddons_init();' called at cpanel.pl line 3597
main::modloader('cPAddons') called at /usr/local/cpanel/Cpanel.pm line 240
Cpanel::loadmodule('cPAddons') called at cpanel.pl line 540
main::exectag('<cpanel cPAddons="mainpg(%FORM)">') called at cpanel.pl line 3496
main::dotag(undef) called at cpanel.pl line 3410
main::parsehtml('GLOB(0x9748960)') called at cpanel.pl line 355
 

rs-freddo

Well-Known Member
May 13, 2003
828
1
168
Australia
cPanel Access Level
Root Administrator
latest release 139. This happens on both my servers - RHEL3 and RHEL 4. I'd say the only reason it hasn't been reported by others is that so few people use cpaddons.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
latest release 139. This happens on both my servers - RHEL3 and RHEL 4. I'd say the only reason it hasn't been reported by others is that so few people use cpaddons.
Nah, it's been reported :) (unless you mean by people on your servers) That report I directed you to earlier (viewing all installed cPAddons for all users) is what does the conversion (don't ask me why, I'm not its developer/mainainer) from the old Storable to the new YAML format. The error message in your 2-27-2007 post, is that on the cPanel side?