SOLVED [CPANEL-23007] MultiPHP Manager "API Failure" failed to find domain

ItsMattSon

Well-Known Member
Sep 5, 2016
182
38
103
Perth
cPanel Access Level
Root Administrator
Hi cPanel,

Would you know why a red warning prompt pops up every time I enter the MultiPHP Manager in WHM?

I used to have a domain called prod.domain.com.au but not anymore. For some reason, it seems to think I do and tries to find it?

Any ideas?

API failure: Failed to find the domain(s): “prod.domain.com.au”. at /usr/local/cpanel/Cpanel/PHP/Config.pm line 255. Cpanel::PHP::Config::_get_php_config_for_domains(0, ARRAY(0x4304958)) called at /usr/local/cpanel/Cpanel/PHP/Config.pm line 275 Cpanel::PHP::Config::get_php_config_for_domains(ARRAY(0x4304958)) called at /usr/local/cpanel/Cpanel/PHPFPM/Inventory.pm line 55 Cpanel::PHPFPM::Inventory::get_inventory() called at /usr/local/cpanel/Cpanel/PHPFPM/Utils.pm line 216 Cpanel::PHPFPM::Utils::get_fpm_enabled_domains() called at /usr/local/cpanel/Cpanel/PHPFPM/Utils.pm line 156 Cpanel::PHPFPM::Utils::get_fpm_count_and_utilization() called at /usr/local/cpanel/Whostmgr/API/1/Lang/PHP.pm line 526 Whostmgr::API::1::Lang::PHP::get_fpm_count_and_utilization(HASH(0x29dc028), HASH(0x4053df8), HASH(0x4061d98)) called at whostmgr/bin/xml-api.pl line 3109 whostmgr::bin::xml_api::__ANON__(HASH(0x4053df8), HASH(0x29dc028), HASH(0x4061d98), CODE(0x4044a60)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 219 Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 99 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 90
 

ItsMattSon

Well-Known Member
Sep 5, 2016
182
38
103
Perth
cPanel Access Level
Root Administrator
Hi @cPanelMichael,

It seems to have stopped the error in question, but now I get something else entirely haha. This is the part I followed

After looking in "/var/cpanel/userdata/<user>" I found 2 files of interest:
  • <user>.example.com.php-fpm.cache
  • <user>.example.com.php-fpm.yaml
So I removed the prod.domain.com.au .cache and .yaml and reloaded the MultiPHP Manager and the red API Failure notice didn't come up again so I thought it was all sorted, and then this showed up in a yellow "Acknowledge" bubble:

Your system contains an old PHP-FPM configuration. To update your PHP-FPM configuration, read our Configure or Disable PHP-FPM with User Pools for EasyApache 4 documentation.
Attached screenshot in case that helps. Don't want to hit Acknowledge, I'm afraid that will simply silence the issue?

Have tried restarting server, updating system, turning off/on domains using PHP-FPM. Not sure what is next..

Thanks in advance!
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello Matt,

You can use the following command to search for orphaned PHP-FPM configuration files:

Code:
/scripts/php_fpm_config --check
I've seen this happen in the past when an orphaned PHP-FPM configuration file exists in the /opt/cpanel/ea-php$$/root/etc/php-fpm.d/ directory.

Thank you.
 

ItsMattSon

Well-Known Member
Sep 5, 2016
182
38
103
Perth
cPanel Access Level
Root Administrator
Hi @cPanelMichael,

Thanks! That did the trick! No more old configuration error :)

The output had this, so I deleted the file.

Orphaned Files (PHP FPM Config files without the cPanel YAML file)
/opt/cpanel/ea-php70/root/etc/php-fpm.d/prod.domain.com.au.conf

Much appreciated! I'm all sorted now.
 
  • Like
Reactions: cPanelMichael

thewebexpert

Member
May 6, 2013
9
1
53
cPanel Access Level
Root Administrator
This happened to me as well! thank you for the post! fixed the problem.... I believe it was because the domain was expired and posted away, but the client parked a new domain on top of the old one .... leaving leftovers ....
 
  • Like
Reactions: cPanelMichael

uk01

Well-Known Member
Dec 31, 2009
206
19
68
This has happened to me too. An account was migrated between a couple of servers, I think the domain was previously modified as we used the website set up for another site.

IN our case there was no file in /var/cpanel/userdata/<user> as the user had been terminated, but php fpm did not work because of the red error panel.

The only way I could solve it temporarily is actually add the sub domain as an account xxxx.domain.com so it created this on the server and stopped the error
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hi @uk01,

We have a couple of internal cases open to help address this issue going forward.

1. CPANEL-23006 is open to ensure a more useful error message appears in the MultiPHP Manager UI when an orphaned configuration file exists in /var/cpanel/userdata/.

2. CPANEL-23007 is open to determine how ensure MultiPHP Manager still works when an orphaned configuration file exists in /var/cpanel/userdata/.

I'll update this thread with more information on the status of these two cases as it becomes available.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello,

To update, as of cPanel & WHM version 76, MultiPHP Manager should remain functional when an orphaned configuration file exists in /var/cpanel/userdata/.

Thank you.