Skip to main content

[CPANEL-22800] Wrong path to uapi used in auto-deployment Git hook

Comments

16 comments

  • 24x7server
    Hi, How exactly you are doing all this push thing. Provide more details to investigate it further. What command you are executing?
    0
  • Mikey12345
    Also having the same issue with a .cpanel.yml deployment setup to cp some files around. after running 'git push' on my local machine to the cpanel repo i get the following: remote: Recieved update on checked-out branch, queueing deployment. remote: [2018-09-10 20:34:04 +0100] warn [uapi] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 114. remote: Cpanel::XML::cpanel_exec_fast(HASH(0x8975b0), HASH(0x14e5a48)) called at bin/apitool.pl line 206 remote: bin::apitool::_run_cpanel_function("yaml", HASH(0x8975b0), HASH(0x14e53a0)) called at bin/apitool.pl line 146 remote: bin::apitool::_cpanel_api_handler(__CPANEL_HIDDEN__, HASH(0x14e53a0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, ARRAY(0x897b20)) called at bin/apitool.pl line 108 remote: bin::apitool::run("VersionControlDeployment", "create", "repository_root=/home/supertest/repositories/superrepo"...) called at bin/apitool.pl line 37 remote: Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 209.
    0
  • Asmit khadka
    I am following this documentation; Guide to Git - Host Git Repositories on a cPanel Account - cPanel Knowledge Base - cPanel Documentation I cloned the repo and after I make the changes and try to push it, I got the error. But the thing is that it gives the error when I make changes for the first time. If I again push it, no error is shown. Additionally, if I make any changes and again try to push it, it gives me error. $ git add . $ git commit -am "Changes comment" $ git push origin master
    As I said before, if I disable cagefs it works fine.
    0
  • Umanga Deep Shrestha
    Hello, I have been trying to automatically deploy the files after pushing my commit but unfortunately my knowledge on .cpanel.yml is not clear. I have used this code on .cpanel.yml as mentioned in the documentation --- deployment: tasks: - export DEPLOYPATH=/home/monkeyde/public_html/ - /bin/cp index.html $DEPLOYPATH - /bin/cp style.css $DEPLOYPATH I get this error while pushing my local changes, {15:44}[2.2.5]~/workspace/cprepo:master ? ? git push cpanel Counting objects: 3, done. Delta compression using up to 8 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 303 bytes | 0 bytes/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: Recieved update on checked-out branch, queueing deployment. remote: [2018-09-11 11:59:14 +0200] warn [uapi] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 114. remote: Cpanel::XML::cpanel_exec_fast(HASH(0x8975b0), HASH(0x1e90680)) called at bin/apitool.pl line 206 remote: bin::apitool::_run_cpanel_function("yaml", HASH(0x8975b0), HASH(0x1e902f0)) called at bin/apitool.pl line 146 remote: bin::apitool::_cpanel_api_handler(__CPANEL_HIDDEN__, HASH(0x1e902f0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, ARRAY(0x897b20)) called at bin/apitool.pl line 108 remote: bin::apitool::run("VersionControlDeployment", "create", "repository_root=/home/monkeyde/cprepo") called at bin/apitool.pl line 37 remote: Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 209. To ssh://monkeydenim.com:2222/home/monkeyde/cprepo e343f9b..5dcad90 master -> master
    0
  • Umanga Deep Shrestha
    I am facing the same issue here. I noticed a case sensitive here in this line as posted by both @Asmit khadka and @Mikey12345 remote: [2018-09-10 20:34:04 +0100] warn [uapi] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 114.
    /usr/local/cpanel/cpanel /usr/local/cpanel/Cpanel/XML.pm The second line cpanel has a uppercase Cpanel.
    0
  • cPanelMichael
    Hello, Internal case CPANEL-22800 is open to address an issue where the post-receive Git hook used for auto-deployment makes use of the wrong path to the UAPI binary. This causes auto-deployments to fail when using CageFS. I'll monitor this case and update this thread with more information as it becomes available. In the meantime, the temporary workaround is to modify the /usr/local/cpanel/3rdparty/share/git-cpanel/deployment/hooks/post-receive file so that it looks like this: #!/bin/sh # post-receive Copyright 2018 cPanel, Inc. # All rights reserved. # copyright@cpanel.net http://cpanel.net # This code is subject to the cPanel license. Unauthorized copying is prohibited branch=$(/usr/local/cpanel/3rdparty/bin/git branch | awk '$1 == "*"{print $2}') while read oldrev newrev ref do if [ "x$ref" == "xrefs/heads/$branch" ] then echo "Recieved update on checked-out branch, queueing deployment." (cd .. ; /usr/bin/uapi VersionControlDeployment create repository_root=$PWD) fi done < /dev/stdin
    Then, run the following command: cagefsctl --remount-all
    Thank you.
    0
  • Umanga Deep Shrestha
    Hello @cPanelMichael , How long would it take to resolve this problem ?
    0
  • cPanelMichael
    How long would it take to resolve this problem ?

    Hello @Umanga Deep Shrestha, The case was picked up by the Development team associated with the feature, but we don't yet have a specific time frame on a solution. I'll update this thread as soon as that information is available. Thank you.
    0
  • Artemu78
    hey guys, is there any news in issue solving?
    0
  • cPanelMichael
    hey guys, is there any news in issue solving?

    Hi @Artemu78, The solution is published as part of cPanel & WHM version 76, but keep in mind that version isn't yet ready for production servers (it's only released to the EDGE release tier at this time). We do have a backport request open to get the case published to version 74, but I don't have a specific time frame to offer on it's publication at this time. I'll update this thread as soon as new information is available. Thank you.
    0
  • Robin Jonsson
    When are you planning to fix this issue in version 74?
    0
  • cPanelMichael
    When are you planning to fix this issue in version 74?

    Hello Robin, I don't have a specific time frame to offer on the next version 74 publication, but note that cPanel & WHM version 76 is available in the CURRENT release tier at this time. 76 is tentatively planned for publication the the RELEASE tier in early November. Thank you.
    0
  • cPanelMichael
    Hello, To update, it doesn't look like this will make it out to cPanel & WHM version 74, however version 76 is nearing publication to the RELEASE tier (tentatively planned for publication within the next two weeks). Thank you.
    0
  • Berenger Z
    Hum. ? git push alternatif Total 0 (delta 0), reused 0 (delta 0) remote: Recieved update on checked-out branch, queueing deployment. remote: [2019-08-05 12:44:27 -0400] warn [uapi] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 111. remote: Cpanel::XML::cpanel_exec_fast(HASH(0x866e88), HASH(0xca3bd8)) called at bin/apitool.pl line 256 remote: bin::apitool::_run_cpanel_function("yaml", HASH(0x866e88), HASH(0xca3bf0)) called at bin/apitool.pl line 170 remote: bin::apitool::_cpanel_api_handler(HASH(0xcc36b8)) called at bin/apitool.pl line 123 remote: bin::apitool::run("VersionControlDeployment", "create", "repository_root=/home/***/repositories/wpkms") called at bin/apitool.pl line 38 remote: Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 259. To ssh://***/home/***/repositories/wpkms 9f34a15..138e806 master -> master
    CLOUDLINUX 7.6 hyper-v [alternatif] v80.0.23 This seems to be the exact same error, though my post-receive hook is exactly as the one you sent, cPanelMichael Any thoughts?
    0
  • cPanelMichael
    Hello @Berenger Z, Are you still facing this issue as of cPanel & WHM version 82? Thank you.
    0
  • MuNLoK
    Hello, We had this problem today with cPanel & WHM version 86.0.20, CloudLinux + CageFS: remote: Recieved update on checked-out branch, queueing deployment. remote: [2020-05-15 13:01:28 +0200] warn [uapi] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 110. remote: Cpanel::XML::cpanel_exec_fast(HASH(0x81b5b8), HASH(0x1dc6720)) called at bin/apitool.pl line 257 remote: bin::apitool::_run_cpanel_function("yaml", HASH(0x81b5b8), HASH(0x1db4680)) called at bin/apitool.pl line 171 remote: bin::apitool::_cpanel_api_handler(HASH(0x1dc69c0)) called at bin/apitool.pl line 124 remote: bin::apitool::run("VersionControlDeployment", "create", "repository_root=/home/***/framework") called at bin/apitool.pl line 39 remote: Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 260.
    Any solution? Thanks.
    0

Please sign in to leave a comment.