Skip to main content

UAPI SSL::installed_host

Comments

5 comments

  • cPanelLauren
    Hi @alexis_ Can you reply with the results of the API when run via CLI? uapi --user=username SSL installed_host domain=example.com
    Thanks!
    0
  • alexis_
    Hello, Here the result : [root@kebab ~]# uapi --user=mondev SSL installed_host domain=o2-dev.fr [2018-05-18 18:57:07 +0200] warn [uapi] Cpanel::Wrap::send_cpwrapd_request adminbin Cpanel/ssl/FETCHINSTALLEDCERT: exit 5: namespace=[Cpanel] module=[ssl] function=[FETCHINSTALLEDCERT]: raw_response=[{"error":1,"version":"2.4","timeout":0,"statusmsg":"You do not control the IP address xxx.xxx.xxx.xxx on this server.","mode":"full","action":"fetch","status":1,"exit_code":1280}] at /usr/local/cpanel/Cpanel/Wrap.pm line 123, <$socket> line 1. Cpanel::Wrap::send_cpwrapd_request("function", "FETCHINSTALLEDCERT", "data", HASH(0x2a8d380), "no_cperror", 1, "action", "fetch", ...) called at /usr/local/cpanel/Cpanel/Wrap.pm line 64 Cpanel::Wrap::send_cpwrapd_request_no_cperror("namespace", "Cpanel", "module", "ssl", "function", "FETCHINSTALLEDCERT", "data", HASH(0x2a8d380), ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 296 Cpanel::AdminBin::_adminfetch("module", "ssl", "function", "FETCHINSTALLEDCERT", "format", "storable", "cache_check_files", "", ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 176 Cpanel::AdminBin::fetch_adminbin_nocache_with_status("ssl", undef, "FETCHINSTALLEDCERT", "storable", HASH(0x2a8d380)) called at /usr/local/cpanel/Cpanel/API/SSL.pm line 1382 Cpanel::API::SSL::installed_host(Cpanel::Args=HASH(0x2a8a738), Cpanel::Result=HASH(0x2a8a1f8)) called at /usr/local/cpanel/Cpanel/API.pm line 274 Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 345 eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 345 Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x2a8a1f8), CODE(0x2a8a978)) called at /usr/local/cpanel/Cpanel/API.pm line 274 Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x2a8a738), Cpanel::Result=HASH(0x2a8a1f8), "SSL", "installed_host") called at /usr/local/cpanel/Cpanel/API.pm line 136 Cpanel::API::execute("SSL", "installed_host", HASH(0x2a89f88)) called at /usr/local/cpanel/Cpanel/API.pm line 543 Cpanel::API::run_api_mode(HASH(0x2a89f88)) called at uapi.pl line 262 main::script() called at uapi.pl line 84 warn [uapi] Cpanel::Wrap::send_cpwrapd_request adminbin Cpanel/ssl/FETCHINSTALLEDCERT: exit 5: namespace=[Cpanel] module=[ssl] function=[FETCHINSTALLEDCERT]: raw_response=[{"error":1,"version":"2.4","timeout":0,"statusmsg":"You do not control the IP address xxx.xxx.xxx.xxx on this server.","mode":"full","action":"fetch","status":1,"exit_code":1280}] [2018-05-18 18:57:07 +0200] warn [uapi] Cpanel::Wrap::send_cpwrapd_request error: namespace=[Cpanel] module=[ssl] function=[FETCHINSTALLEDCERT]: statusmsg=[You do not control the IP address xxx.xxx.xxx.xxx on this server.] at /usr/local/cpanel/Cpanel/Wrap.pm line 132, <$socket> line 1. Cpanel::Wrap::send_cpwrapd_request("function", "FETCHINSTALLEDCERT", "data", HASH(0x2a8d380), "no_cperror", 1, "action", "fetch", ...) called at /usr/local/cpanel/Cpanel/Wrap.pm line 64 Cpanel::Wrap::send_cpwrapd_request_no_cperror("namespace", "Cpanel", "module", "ssl", "function", "FETCHINSTALLEDCERT", "data", HASH(0x2a8d380), ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 296 Cpanel::AdminBin::_adminfetch("module", "ssl", "function", "FETCHINSTALLEDCERT", "format", "storable", "cache_check_files", "", ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 176 Cpanel::AdminBin::fetch_adminbin_nocache_with_status("ssl", undef, "FETCHINSTALLEDCERT", "storable", HASH(0x2a8d380)) called at /usr/local/cpanel/Cpanel/API/SSL.pm line 1382 Cpanel::API::SSL::installed_host(Cpanel::Args=HASH(0x2a8a738), Cpanel::Result=HASH(0x2a8a1f8)) called at /usr/local/cpanel/Cpanel/API.pm line 274 Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 345 eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 345 Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x2a8a1f8), CODE(0x2a8a978)) called at /usr/local/cpanel/Cpanel/API.pm line 274 Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x2a8a738), Cpanel::Result=HASH(0x2a8a1f8), "SSL", "installed_host") called at /usr/local/cpanel/Cpanel/API.pm line 136 Cpanel::API::execute("SSL", "installed_host", HASH(0x2a89f88)) called at /usr/local/cpanel/Cpanel/API.pm line 543 Cpanel::API::run_api_mode(HASH(0x2a89f88)) called at uapi.pl line 262 main::script() called at uapi.pl line 84 warn [uapi] Cpanel::Wrap::send_cpwrapd_request error: namespace=[Cpanel] module=[ssl] function=[FETCHINSTALLEDCERT]: statusmsg=[You do not control the IP address xxx.xxx.xxx.xxx on this server.] --- apiversion: 3 func: installed_host module: SSL result: data: ~ errors: - "Unable to retrieve the certificate installed on IP address "xxx.xxx.xxx.xxx": " messages: ~ metadata: {} status: 0 warnings: ~
    Good to known that the CLI command give more information about the error ! Thank you for your assistance, Alexis
    0
  • cPanelLauren
    HI @alexis_ Does the account have a dedicated IP address? That function is specifically for hosts that have a dedicated IP. The installed_hosts function will work for hosts without a dedicated IP. I realize that this is not specified in our documentation and as such, I've opened a request to have the documentation updated Thanks!
    0
  • alexis_
    Hello @cPanelLauren, Thanks for the anwser and clarification, you are absolutely right, this domain don't have a dedicated IP address. I guess I will continue with the installed_hostS method and loop over the result : not a big deal. I'm happy to have contributed, indirectly, a little bit, on the documentation :) Have a nice day, Alexis
    0
  • cPanelLauren
    HI @alexis_ You definitely brought it to our attention that the description of the function wasn't clear, thank you for that. I'm glad the installed_hosts function will work for you as well. Thanks!
    0

Please sign in to leave a comment.