you may need to install the Cpanel::API::Email module
Hello,
I'm getting lots of errors in the cpanel error_log file, appears like there's a loop and it's churning out this. How do I install the Cpanel::API::Email module?
v86.0.21 CloudLInux 6.10
Thanks.
[2020-06-02 01:40:06 +1000] warn [Internal Warning while parsing [stdin] 387864] Error loading module API::Email - Can't locate Cpanel/API/Email.pm in @INC (you may need to install the Cpanel::API::Email module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0 /opt/cpanel/perl5/530/site_lib/x86_64-linux-64int /opt/cpanel/perl5/530/site_lib) at (eval 135) line 1.
BEGIN failed--compilation aborted at (eval 135) line 1.
at /usr/local/cpanel/Cpanel/LoadModule.pm line 27.
Cpanel::LoadModule::_logger_warn("Error loading module API::Email - Can't locate Cpanel/API/Ema"...) called at /usr/local/cpanel/Cpanel/LoadModule.pm line 170
Cpanel::LoadModule::_modloader("API::Email") called at /usr/local/cpanel/Cpanel/LoadModule.pm line 109
Cpanel::LoadModule::loadmodule("API::Email") called at /usr/local/cpanel/Cpanel/API/StatsBar.pm line 50
Cpanel::API::StatsBar::get_stats(Cpanel::Args=HASH(0x443fa48), Cpanel::Result=HASH(0x4437678)) called at /usr/local/cpanel/Cpanel/API.pm line 342
eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 344
Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x443fa48), Cpanel::Result=HASH(0x4437678), "StatsBar", "get_stats") called at /usr/local/cpanel/Cpanel/API.pm line 222
Cpanel::API::execute("StatsBar", "get_stats", HASH(0x36d7eb0)) called at /usr/local/cpanel/Whostmgr/API/1/Cpanel.pm line 580
Whostmgr::API::1::Cpanel::_run_uapi_for_public("oceaniaboxing", "StatsBar", "get_stats", HASH(0x36d7eb0)) called at /usr/local/cpanel/Whostmgr/API/1/Cpanel.pm line 556
Whostmgr::API::1::Cpanel::__ANON__() called at /usr/local/cpanel/Cpanel/AccessIds/ReducedPrivileges.pm line 93
eval {...} called at /usr/local/cpanel/Cpanel/AccessIds/ReducedPrivileges.pm line 93
Cpanel::AccessIds::ReducedPrivileges::call_as_user("oceaniaboxing", CODE(0x36d8198)) called at /usr/local/cpanel/Whostmgr/API/1/Cpanel.pm line 556
Whostmgr::API::1::Cpanel::uapi_cpanel(HASH(0x36d7eb0), Whostmgr::API::1::Utils::Metadata=HASH(0x36d4c48), HASH(0x36d4b40)) called at whostmgr/bin/xml-api.pl line 3750
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x36d4c48), HASH(0x36d7eb0), HASH(0x36d4b40), undef) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 234
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 97
eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 88
Try::Tiny::try(CODE(0x36d7fe8), Try::Tiny::Catch=REF(0x36d1630)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 253
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x43e64d0), HASH(0x36d7eb0), HASH(0x36d4b40), HASH(0x36d4c30), undef) called at whostmgr/bin/xml-api.pl line 3925
whostmgr::bin::xml_api::runapp("uapi_cpanel", HASH(0x36d4b40), HASH(0x36d7eb0), 1, undef) called at whostmgr/bin/xml-api.pl line 4001
eval {...} called at whostmgr/bin/xml-api.pl line 4001
whostmgr::bin::xml_api::batch_runapp(HASH(0x17e7188), Whostmgr::API::1::Utils::Metadata=HASH(0x17dff70), HASH(0x3614b00)) called at whostmgr/bin/xml-api.pl line 3750
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x17dff70), HASH(0x17e7188), HASH(0x3614b00), CODE(0x3612898)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 234
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 97
eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 88
Try::Tiny::try(CODE(0x361f4d0), Try::Tiny::Catch=REF(0x3623590)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 253
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x361a100), HASH(0x17e7188), HASH(0x3614b00), HASH(0x361a430), CODE(0x3612898)) called at whostmgr/bin/xml-api.pl line 3925
whostmgr::bin::xml_api::runapp("batch", HASH(0x3614b00), HASH(0x16d17d8), 0, CODE(0x3612898)) called at whostmgr/bin/xml-api.pl line 3619
whostmgr::bin::xml_api::script(CODE(0x3612898), "-json", "./batch") called at whostmgr/bin/xml-api.pl line 3562
-
@bloatedstoat I don't see really any reports of this specific error, I know I don't have that Perl module in my test server at /usr/local/cpanel/Cpanel/API/
nor am I able to find that module when runningcpan
or/scripts/perlinstaller
Do you have any customizations/plugins on that cPanel account and is it happening for others or just the oceaniaboxing account?0 -
It's a loop of all accounts on the server. That snippet was for one only. Plugins, Munin, CSF ... Could Awstats or Webalizer cause this behaviour? 0 -
It actually looks like it's related to the stats bar, this portion of the UI (at least that's what looks like is being attributed to it) This may look a bit different on CloudLinux and you might want to try update CageFS before anything else? I know I dug through a ton of tickets yesterday trying to find anything that called that specific API and struck out. 0 -
Thanks @cPanelLauren Yeah I forced the cagefs update to no avail. This is happening twice per day at defined intervals 12 hours apart, it's not random. There is a similarity with post 5 of - it contains the near-identical chunk of code. I wasn't able to pull anything useful from the post unfortunately but it is coincidental. My stats_log does not show any errors as in the linked post. 0 -
Yea I saw that too and it's because something was broken with POP3 Bandwidth calculations but this seems to be different. What time do you run stats? You can find the configuration at WHM>>Server Configuration>>Statistics Software Configuration Not sure if it's quite the same but worth a shot. 0 -
Always worth a shot @cPanelLauren .... I disabled all the stats software yesterday. All 3 unchecked. Yet the issue persists. The frequency for processing is set to: Web Traffic Statistics every 24 hours Bandwidth Statistics every 2 hours So neither of those marry up with twice a day. 0 -
Hi. I am joining in as I have the exact behavior with my servers. I updated cagefsctl: cagefsctl --force-udpate cagefsctl -M
but didn't help to fix this. My log about a few minutes ago shows:[2020-06-04 19:15:55 -0600] warn [Internal Warning while parsing [stdin] 17795] Error loading module API::Email - Can't locate Cpanel/API/Email.pm in @INC (you may need to install the Cpanel::API::Email module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0 /opt/cpanel/perl5/530/site_lib/x86_64-linux-64int /opt/cpanel/perl5/530/site_lib) at (eval 21) line 1. BEGIN failed--compilation aborted at (eval 21) line 1.
Sergio0 -
It's possible @cPSamuel but I wouldn't have done it. I have made no mods to any templates on this server. Regular as clockwork though the errors are churned out twice per day 12 hours apart so there's a cron job or something calling a script. crontab -l shows no entries for the times the errors start. 0 -
Helllo again @bloatedstoat Thanks for your update. I recommend you submit a ticket using the link in my signature. While reviewing our past support requests and documentation for errors including "Error loading module API::Email" I did not find any conclusive details that would apply in your scenario. This is worthy of further investigation so we can help you get to the bottom of the issue. 0 -
@cPSamuel will do, thanks mate, I'll pop the ticket id in here once I have it. 0 -
A ticket has been opened. ID: 93495450 0 -
@Secmas @cPSamuel Although my ticket has yet to be analysed I need to add that there were no errors in the log today, which is bizarre. The only thing I changed yesterday was the root password in preparation for the support ticket. @Secmas are you able to update your root password and see if this goes way? 0 -
This is definitely WHMCS. I updated the password within the whmcs settings and bingo the log file was filled with errors again. WHMCS Version: 7.10.2 PHP Version 7.3.18 08/06/2020 01:40 Automated Task: Starting Tenant Usage Metrics 08/06/2020 13:40 Automated Task: Starting Tenant Usage Metrics 0 -
What password did you change in WHMCS, the users cPanel password or the server password under server definitions? 0 -
I updated the server password first. Errors vanished. This server hosts our whmcs. Then in whmcs I went into "Setup > Products/Services > Servers" and updated the root password for the server. Errors returned. I've tracked it down to these tasks running - they match the cpanel error log. 08/06/2020 01:40 Automated Task: Starting Tenant Usage Metrics 08/06/2020 13:40 Automated Task: Starting Tenant Usage Metrics I have currently set the whmcs module to debug to try and see what's going on, the next run is a 4 hours away so once I have more I'll update this thread. 0 -
I will wait to see your next post. Sergio 0 -
@bloatedstoat Did you manage to solve this issue? Today I got again the same errors. If you fixed it, Would you be kind to write the steps to fix it? Regards, Sergio 0 -
Hi @Secmas , I have yet to get to the bottom of this, been dealing with more urgent issues, my apologies. You say though "today I got the same errors", which seems to suggest they went away for a while and then returned, is that the case? Thanks. 0 -
No, I have continuously this issue and today wanted to know if there was a solution to this yet. 0 -
Just a follow up... It is not WHMCS as I have a few servers that are not related in any way to WHMCS and also them shows the same issue. Once again, trying to find out if it is WHMCS, I will post more info when I have it. 0 -
Am getting the same log errors, was this problem ever resolved? 0 -
Not in my case @kernow, although I am convinced it's WHMCS. When I changed the execution time of php -q /home/pathto/whmcs_crons/cron.php cron job the errors followed the new time and the logs were still flooded with errors. I also tried php -q /home/pathto/whmcs_crons/cron.php skip --TenantUsageMetrics, the thinking being that it might solve the issue as there are a lot of references to stats in the errors. Nope. I have just learned to live with it for now. 0 -
my fault., sorry! wrong forum. 0 -
Erm, @Secmas that string does not appear at all in my original post showing the verbose errors in the logs sent hourly by way of CSF's logwatch, in fact it appears to have no relation at all to this thread unless I'm missing something? As such, I beg to differ with you. When I changed the cron execution time for whmcs the errors followed it and repeated every 12 hours. It is undoubtedly (in my case) something to do with whmcs. 0 -
@kernow, you running whmcs on the server you're seeing errors on? 0 -
When I changed the cron execution time for whmcs the errors followed it and repeated every 12 hours. It is undoubtedly (in my case) something to do with whmcs.
Yes that's how often I see it, every 12 hours so I guess it is a whmcs config problem as we updated whmcs recently and the log error is still there.0 -
@kernow, you running whmcs on the server you're seeing errors on?
Yes different whmcs versions on different OS servers with the same errors on all. Updating whmcs didn't fix it either.0
Please sign in to leave a comment.
Comments
28 comments