Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --deploy-hook cpanel_uapi warning: No such file or directory #6228

Open
izmeez opened this issue Feb 10, 2025 · 1 comment
Open

The --deploy-hook cpanel_uapi warning: No such file or directory #6228

izmeez opened this issue Feb 10, 2025 · 1 comment

Comments

@izmeez
Copy link

izmeez commented Feb 10, 2025

This is essentially a cosmetic issue, it does not limit how the script works.

After a certificate is created it can be deployed to cpanel with command line:
acme.sh --deploy --deploy-hook cpanel_uapi -d example.com

Subsequently, when certificates are renewed the deploy hook works and cpanel is updated to use the renewed certificates.

A certificate can be created by either:

  1. Using the -d option for each domain.
  2. By first creating a CSR and then using the --signcsr --csr option.

When the second method is used, each time cron renews and deploys a certificate it outputs:

/home/user/.acme.sh/deploy/cpanel_uapi.sh: line 37: /home/user/.acme.sh/example.com/example.com.key: No such file or directory

Followed by several lines of warnings:

[2025-01-26 00:23:13 -0500] warn [Internal Warning while parsing unknown 1709225] Use of uninitialized value in goto at /var/cpanel/perl5/lib/NcCustomHooks/SSL.pm line 32.
at /var/cpanel/perl5/lib/NcCustomHooks/SSL.pm line 32.
NcCustomHooks::SSL::get_api_client("/var/cpanel/perl5/lib/NcCustomHooks/.hAPIcPanel.conf") called at /var/cpanel/perl5/lib/NcCustomHooks/SSL.pm line 100
NcCustomHooks::SSL::NotifyChanges(HASH(0x3d54338), HASH(0x3d543b0)) called at /usr/local/cpanel/Cpanel/Hooks.pm line 563
eval {...} called at /usr/local/cpanel/Cpanel/Hooks.pm line 561
Cpanel::Hooks::_exec_module("main", HASH(0x3d431e0), HASH(0x3d54338), HASH(0x3d543b0)) called at /usr/local/cpanel/Cpanel/Hooks.pm line 376
Cpanel::Hooks::_exec_hook("main", HASH(0x3d431e0), HASH(0x3d54338), HASH(0x3d543b0)) called at /usr/local/cpanel/Cpanel/Hooks.pm line 276
eval {...} called at /usr/local/cpanel/Cpanel/Hooks.pm line 271
Cpanel::Hooks::hook(HASH(0x3d54338), HASH(0x176cf80)) called at /usr/local/cpanel/Cpanel/EventHandler.pm line 146
Cpanel::EventHandler::_uapi_std_hook("SSL", "install_ssl", Cpanel::Args=HASH(0x3894e28), Cpanel::Result=HASH(0x3bf9b98), "post") called at /usr/local/cpanel/Cpanel/EventHandler.pm line 123
Cpanel::EventHandler::post_api("SSL", "install_ssl", Cpanel::Args=HASH(0x3894e28), Cpanel::Result=HASH(0x3bf9b98)) called at /usr/local/cpanel/Cpanel/API.pm line 260
Cpanel::API::execute("SSL", "install_ssl", HASH(0x3bf99b8)) called at /usr/local/cpanel/Cpanel/API.pm line 654
Cpanel::API::run_api_mode(HASH(0x3bf99b8)) called at uapi.pl line 307
main::script() called at uapi.pl line 139

[2025-01-26 00:23:13 -0500] warn [uapi] Use of uninitialized value in concatenation (.) or string at /var/cpanel/perl5/lib/NameCheap/RestApiClient.pm line 31.

This does not happen when the first method above is used because the acme.sh script finds the key file in the ~/.acme.sh/ directories, whereas with the second method the key file is added to cpanel when the CSR is created and it is not necessary for deployment of the certificate when it is renewed.

Seen on v3.1.0 and previous versions.

Copy link

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

@izmeez izmeez changed the title The --deploy-hook cpanel_uapi warning no such file or directory The --deploy-hook cpanel_uapi warning: No such file or directory Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant