Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

UAPI SSL::installed_host

Discussion in 'cPanel Developers' started by alexis_, May 17, 2018.

  1. alexis_

    alexis_ Member

    Joined:
    Sep 13, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    Hello,

    I think I found a bug on the UAPI SSL::installed_host, it's doesn't work on my side, it always return the following error :

    Code:
    array(7) {
      ["errors"]=>
      array(1) {
        [0]=>
        string(81) "Unable to retrieve the certificate installed on IP address “xxx.xxx.xxx.xxx”: "
      }
      ["result"]=>
      NULL
      ["module"]=>
      string(3) "SSL"
      ["func"]=>
      string(14) "installed_host"
      ["metadata"]=>
      array(0) {
      }
      ["messages"]=>
      NULL
      ["status"]=>
      int(0)
    }
    
    I tested two differents codes because I wasn't sure if the domain was the real domain or the server name, but both return the same error :
    PHP:
    <?php
    $installedDomain 
    $this->cpanel->uapi('SSL''installed_host', ['domain' => 'o2-dev.mon-dev.xyz']);
    $installedDomain2 $this->cpanel->uapi('SSL''installed_host', ['domain' => 'o2-dev.fr']);
    var_dump($installedDomain);
    var_dump($installedDomain2);
    Right now, I must use the "installed_hosts" method to get all the SSL installed and then loop the result, I want to avoid that and use the "install_host" function.

    Here the result of the "installed_hosts" method, as you can see, the domain is listed :

    Code:
    array(7) {
      ["errors"]=>
      NULL
      ["result"]=>
      array(6) {
        [0]=>
        array(10) {
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["is_primary_on_ip"]=>
          int(1)
          ["certificate_text"]=>
          string(1171) "REDACTED"
          ["needs_sni"]=>
          int(0)
          ["servername"]=>
          string(11) "mon-dev.xyz"
          ["docroot"]=>
          string(24) "/home/mondev/public_html"
          ["certificate"]=>
          array(17) {
            ["not_before"]=>
            int(1525858022)
            ["validation_type"]=>
            NULL
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
            ["modulus_length"]=>
            int(2048)
            ["is_autossl"]=>
            int(0)
            ["issuer.organizationName"]=>
            NULL
            ["not_after"]=>
            int(1557394022)
            ["issuer.commonName"]=>
            string(11) "mon-dev.xyz"
            ["subject.commonName"]=>
            string(11) "mon-dev.xyz"
            ["issuer_text"]=>
            string(22) "commonName
    mon-dev.xyz"
            ["domains"]=>
            array(3) {
              [0]=>
              string(11) "mon-dev.xyz"
              [1]=>
              string(16) "mail.mon-dev.xyz"
              [2]=>
              string(15) "www.mon-dev.xyz"
            }
            ["subject_text"]=>
            string(22) "commonName
    mon-dev.xyz"
            ["modulus"]=>
            string(512) "b951c9a8527d3088b485ff6dcf48866e9805febdf89b94aeed4798b7cff4623a3c9325578a9af66269a1aead34a63d2f284bd2db6384c215c0f8871f605fc174aaac5ea79e19a23ca97ca8707979706572039bdbc9084fb04f6ed455dbeb9d33269689b653af49034c99ab90db448fe6a37bd78a5de5c9d6bd7ba33d0654abd29fe25ab3c533cd445ed1d99497aba27f1063a4ff9a96b2a3662220abc031a91e3ac0e6f89dc1d7868142bdaf52da7e9e2994cd022844fe9ba176181025af6c080df96a988c9db81a86342c311a78ae1d94d165bdbd531faeafa431e080bc5e17dd870301632cb2b3bb68385d110e52a0abf287734fb44d413da09aaf0051b973"
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
            ["id"]=>
            string(67) "mon_dev_xyz_b951c_1b973_1557394022_be591a4a32f3f9a323d4cdbc5ffcd86a"
            ["auto_ssl_provider"]=>
            string(0) ""
            ["is_self_signed"]=>
            int(1)
          }
          ["fqdns"]=>
          array(9) {
            [0]=>
            string(18) "cpanel.mon-dev.xyz"
            [1]=>
            string(16) "mail.mon-dev.xyz"
            [2]=>
            string(16) "mail.o2-dev.info"
            [3]=>
            string(11) "mon-dev.xyz"
            [4]=>
            string(11) "o2-dev.info"
            [5]=>
            string(19) "webdisk.mon-dev.xyz"
            [6]=>
            string(19) "webmail.mon-dev.xyz"
            [7]=>
            string(15) "www.mon-dev.xyz"
            [8]=>
            string(15) "www.o2-dev.info"
          }
          ["mail_sni_status"]=>
          int(1)
          ["domains"]=>
          array(2) {
            [0]=>
            string(11) "mon-dev.xyz"
            [1]=>
            string(11) "o2-dev.info"
          }
        }
        [1]=>
        array(10) {
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["is_primary_on_ip"]=>
          int(0)
          ["certificate_text"]=>
          string(1240) "REDACTED"
          ["servername"]=>
          string(18) "o2-dev.mon-dev.xyz"
          ["docroot"]=>
          string(22) "/home/mondev/o2-dev.fr"
          ["certificate"]=>
          array(17) {
            ["modulus"]=>
            string(512) "f2e2315e976dac755c1d86b734fdf5d508bdee511cdb409e59147d6fda7187656fe4cc38658098e5340946ac796a3a32e3ec4f5000053d2bd801bb8b51ccb6f62df299b7311db834afff054d188d90a78829b0c8adc6c846bb4cbc97ea26693064b08e66febccc4b427187e01601fee4976087017d39481444261cb9567ca5108445de8cb38e1735308c06bdcbfe2b074f552bc60972ef1be3cbd6376d31863991d8929dba8ed3d83bc7206f1d01902aa37d2f4989cb27eeb1bd3863aafa0f4b45bdef0446096f61b24bcaeb3452b3801321cf29f5e644d161849e220576ee8f81bd30342fe831ac33bc374e53fec7d685a24c271e0d777588923bd5f7e1d581"
            ["subject_text"]=>
            string(29) "commonName
    o2-dev.mon-dev.xyz"
            ["domains"]=>
            array(5) {
              [0]=>
              string(18) "o2-dev.mon-dev.xyz"
              [1]=>
              string(14) "mail.o2-dev.fr"
              [2]=>
              string(9) "o2-dev.fr"
              [3]=>
              string(13) "www.o2-dev.fr"
              [4]=>
              string(22) "www.o2-dev.mon-dev.xyz"
            }
            ["is_self_signed"]=>
            int(1)
            ["id"]=>
            string(74) "o2_dev_mon_dev_xyz_f2e23_1d581_1557819219_64e9e69939693e2ef70073ec75ca87e3"
            ["auto_ssl_provider"]=>
            string(0) ""
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
            ["modulus_length"]=>
            int(2048)
            ["validation_type"]=>
            NULL
            ["not_before"]=>
            int(1526283219)
            ["subject.commonName"]=>
            string(18) "o2-dev.mon-dev.xyz"
            ["issuer_text"]=>
            string(29) "commonName
    o2-dev.mon-dev.xyz"
            ["issuer.commonName"]=>
            string(18) "o2-dev.mon-dev.xyz"
            ["not_after"]=>
            int(1557819219)
            ["issuer.organizationName"]=>
            NULL
            ["is_autossl"]=>
            int(0)
          }
          ["needs_sni"]=>
          int(1)
          ["mail_sni_status"]=>
          int(1)
          ["domains"]=>
          array(2) {
            [0]=>
            string(9) "o2-dev.fr"
            [1]=>
            string(18) "o2-dev.mon-dev.xyz"
          }
          ["fqdns"]=>
          array(8) {
            [0]=>
            string(16) "cpanel.o2-dev.fr"
            [1]=>
            string(14) "mail.o2-dev.fr"
            [2]=>
            string(9) "o2-dev.fr"
            [3]=>
            string(18) "o2-dev.mon-dev.xyz"
            [4]=>
            string(17) "webdisk.o2-dev.fr"
            [5]=>
            string(17) "webmail.o2-dev.fr"
            [6]=>
            string(13) "www.o2-dev.fr"
            [7]=>
            string(22) "www.o2-dev.mon-dev.xyz"
          }
        }
        [2]=>
        array(10) {
          ["certificate_text"]=>
          string(1260) "REDACTED"
          ["is_primary_on_ip"]=>
          int(0)
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["fqdns"]=>
          array(8) {
            [0]=>
            string(17) "cpanel.o2-dev.org"
            [1]=>
            string(15) "mail.o2-dev.org"
            [2]=>
            string(10) "o2-dev.org"
            [3]=>
            string(21) "o2-devorg.mon-dev.xyz"
            [4]=>
            string(18) "webdisk.o2-dev.org"
            [5]=>
            string(18) "webmail.o2-dev.org"
            [6]=>
            string(14) "www.o2-dev.org"
            [7]=>
            string(25) "www.o2-devorg.mon-dev.xyz"
          }
          ["domains"]=>
          array(2) {
            [0]=>
            string(10) "o2-dev.org"
            [1]=>
            string(21) "o2-devorg.mon-dev.xyz"
          }
          ["mail_sni_status"]=>
          int(1)
          ["needs_sni"]=>
          int(1)
          ["certificate"]=>
          array(17) {
            ["issuer_text"]=>
            string(32) "commonName
    o2-devorg.mon-dev.xyz"
            ["subject.commonName"]=>
            string(21) "o2-devorg.mon-dev.xyz"
            ["issuer.commonName"]=>
            string(21) "o2-devorg.mon-dev.xyz"
            ["not_after"]=>
            int(1557819871)
            ["issuer.organizationName"]=>
            NULL
            ["is_autossl"]=>
            int(0)
            ["modulus_length"]=>
            int(2048)
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
            ["validation_type"]=>
            NULL
            ["not_before"]=>
            int(1526283871)
            ["is_self_signed"]=>
            int(1)
            ["auto_ssl_provider"]=>
            string(0) ""
            ["id"]=>
            string(77) "o2_devorg_mon_dev_xyz_d1b46_291ff_1557819871_3eca7aa2a71134da04b3a411b78c8b48"
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
            ["modulus"]=>
            string(512) "d1b46090e7665ef4a4ffb0c9cfc566f3c3f61642bb3e5b64eb226a852014b36b5d2a13526893b7e29cc2c1c4eeb1a20023dcb2a0c312b29241ef7bdc7566bf3009292829faed5d93d94b05e6c86990adcadc87896981e5487e093aed398111d81e591231102db79c0324f3fcc531d5e930ee11f46a0d1ccf70060ef8cea60fd7d1c21ae672ca2f3a403ecd6b378743e895ed8aef5eb6f894498242e101959b2fb7693bda73946fa1bc22c19c8ac8005e3d7eb3c12f9751339af697b52d04fb3d196c2b68a216b9e2809e43d8ddda61c4bd367098ccfbfca56af81a407a3848a02f36e79379e9a85a05444592b5075f45a0b004f7f5a7313e23962d2c9b8291ff"
            ["subject_text"]=>
            string(32) "commonName
    o2-devorg.mon-dev.xyz"
            ["domains"]=>
            array(5) {
              [0]=>
              string(21) "o2-devorg.mon-dev.xyz"
              [1]=>
              string(15) "mail.o2-dev.org"
              [2]=>
              string(10) "o2-dev.org"
              [3]=>
              string(14) "www.o2-dev.org"
              [4]=>
              string(25) "www.o2-devorg.mon-dev.xyz"
            }
          }
          ["docroot"]=>
          string(23) "/home/mondev/o2-dev.org"
          ["servername"]=>
          string(21) "o2-devorg.mon-dev.xyz"
        }
        [3]=>
        array(10) {
          ["certificate_text"]=>
          string(1252) "REDACTED"
          ["is_primary_on_ip"]=>
          int(0)
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["fqdns"]=>
          array(8) {
            [0]=>
            string(16) "cpanel.o2-dev.eu"
            [1]=>
            string(14) "mail.o2-dev.eu"
            [2]=>
            string(9) "o2-dev.eu"
            [3]=>
            string(20) "o2-deveu.mon-dev.xyz"
            [4]=>
            string(17) "webdisk.o2-dev.eu"
            [5]=>
            string(17) "webmail.o2-dev.eu"
            [6]=>
            string(13) "www.o2-dev.eu"
            [7]=>
            string(24) "www.o2-deveu.mon-dev.xyz"
          }
          ["domains"]=>
          array(2) {
            [0]=>
            string(9) "o2-dev.eu"
            [1]=>
            string(20) "o2-deveu.mon-dev.xyz"
          }
          ["mail_sni_status"]=>
          int(1)
          ["needs_sni"]=>
          int(1)
          ["docroot"]=>
          string(22) "/home/mondev/o2-dev.eu"
          ["certificate"]=>
          array(17) {
            ["modulus"]=>
            string(512) "aa7f9bd046943a4f0362a2d053f5c0317fa54deaacc80fb7985ba7535cac2b63de02173b9ebe6706191f1d6d1720a1fa397a3f1ad40e445a581f993123ef6f5f5b6d1acc7f928a54de8e984335f1065953f870ed2418944d4f27f10df16b90f9a8f4f8f87678de51f742f75e4c3027086d0a65ef30886a5d16f79feaed619b7d4a70b911f9375bfffb626857f0012bdd6b7c3708c59896d7b4b75dfa3f84650a48c72fb22e7d4764331e9f1edb3153a58c35012cf5a332657372ea3f0072e581454ab40b5bda0b680ccff561a59aebfecbbd997ab23d152ddc0013d113b2dc4347c3ed9f7b26edb756a298c56f13cab77c80c9934825374f174e5a972f4a85cd"
            ["subject_text"]=>
            string(31) "commonName
    o2-deveu.mon-dev.xyz"
            ["domains"]=>
            array(5) {
              [0]=>
              string(20) "o2-deveu.mon-dev.xyz"
              [1]=>
              string(14) "mail.o2-dev.eu"
              [2]=>
              string(9) "o2-dev.eu"
              [3]=>
              string(13) "www.o2-dev.eu"
              [4]=>
              string(24) "www.o2-deveu.mon-dev.xyz"
            }
            ["is_self_signed"]=>
            int(1)
            ["auto_ssl_provider"]=>
            string(0) ""
            ["id"]=>
            string(76) "o2_deveu_mon_dev_xyz_aa7f9_a85cd_1557819894_6638205213da452952d9b22f63e3affd"
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
            ["modulus_length"]=>
            int(2048)
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
            ["validation_type"]=>
            NULL
            ["not_before"]=>
            int(1526283894)
            ["issuer_text"]=>
            string(31) "commonName
    o2-deveu.mon-dev.xyz"
            ["subject.commonName"]=>
            string(20) "o2-deveu.mon-dev.xyz"
            ["issuer.commonName"]=>
            string(20) "o2-deveu.mon-dev.xyz"
            ["not_after"]=>
            int(1557819894)
            ["issuer.organizationName"]=>
            NULL
            ["is_autossl"]=>
            int(0)
          }
          ["servername"]=>
          string(20) "o2-deveu.mon-dev.xyz"
        }
        [4]=>
        array(10) {
          ["mail_sni_status"]=>
          int(1)
          ["domains"]=>
          array(1) {
            [0]=>
            string(24) "sous-domaine.mon-dev.xyz"
          }
          ["fqdns"]=>
          array(2) {
            [0]=>
            string(24) "sous-domaine.mon-dev.xyz"
            [1]=>
            string(28) "www.sous-domaine.mon-dev.xyz"
          }
          ["servername"]=>
          string(24) "sous-domaine.mon-dev.xyz"
          ["docroot"]=>
          string(37) "/home/mondev/sous-domaine.mon-dev.xyz"
          ["certificate"]=>
          array(17) {
            ["validation_type"]=>
            NULL
            ["not_before"]=>
            int(1526284254)
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
            ["modulus_length"]=>
            int(2048)
            ["issuer.commonName"]=>
            string(24) "sous-domaine.mon-dev.xyz"
            ["not_after"]=>
            int(1557820254)
            ["subject.commonName"]=>
            string(24) "sous-domaine.mon-dev.xyz"
            ["issuer_text"]=>
            string(35) "commonName
    sous-domaine.mon-dev.xyz"
            ["is_autossl"]=>
            int(0)
            ["issuer.organizationName"]=>
            NULL
            ["modulus"]=>
            string(512) "b97e2f43022f7dcf7388890d12edfa3a353616f0119815045354f45472e652783c0ad0608773c0b65c34d21559e37c812744270a72ace768363bcaff4e611f3d9f280ea7f24ae2ec7418f2891a51a1ecc095d7997b42c0280c37a8bd2d88a6ee0bf0007a9bdf4de38b922c38a3edfebe6abe62fc95c5ec5813df6fdfac51fa3465451f001f61e1e1f299781819f665dc61f40d11706a868d0d9610e510eb6c2b0d157abb1ad23fa9ae169d939c4016290539e0a6fae6e15c518a42d0214607db20e2e663c1d1bb07cc1b15dcd2149bd997180acb14fe411250cabae790ed42c861b147b42b8089d9acdba1f7e3a3e10cc62cbe543985d29bf13454af3b90f98f"
            ["subject_text"]=>
            string(35) "commonName
    sous-domaine.mon-dev.xyz"
            ["domains"]=>
            array(2) {
              [0]=>
              string(24) "sous-domaine.mon-dev.xyz"
              [1]=>
              string(28) "www.sous-domaine.mon-dev.xyz"
            }
            ["is_self_signed"]=>
            int(1)
            ["auto_ssl_provider"]=>
            string(0) ""
            ["id"]=>
            string(80) "sous_domaine_mon_dev_xyz_b97e2_0f98f_1557820254_a934c75a8f105ea7bc6573b73a29bdcc"
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
          }
          ["needs_sni"]=>
          int(1)
          ["certificate_text"]=>
          string(1219) "REDACTED"
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["is_primary_on_ip"]=>
          int(0)
        }
        [5]=>
        array(10) {
          ["mail_sni_status"]=>
          int(1)
          ["domains"]=>
          array(1) {
            [0]=>
            string(31) "deuxieme-sous-domaine.o2-dev.fr"
          }
          ["fqdns"]=>
          array(2) {
            [0]=>
            string(31) "deuxieme-sous-domaine.o2-dev.fr"
            [1]=>
            string(35) "www.deuxieme-sous-domaine.o2-dev.fr"
          }
          ["servername"]=>
          string(31) "deuxieme-sous-domaine.o2-dev.fr"
          ["certificate"]=>
          array(17) {
            ["is_self_signed"]=>
            int(1)
            ["auto_ssl_provider"]=>
            string(0) ""
            ["id"]=>
            string(87) "deuxieme_sous_domaine_o2_dev_fr_a9907_bac89_1557820267_46b65d9fef23c92e640aa752628a1c4b"
            ["auto_ssl_provider_display_name"]=>
            string(0) ""
            ["modulus"]=>
            string(512) "a99076d17e95679c3d3a4702cca59a08e134d135f4d13ab8a37ef7bea8379ab4ceddd7a65c1977dc6cd707aca5e634944e34f466e0f8a1c6d0f8dfeb1eac11b188c1b939ed59caaa19af063f0c42c7a4951295efcba30f1bb57b10b0254e2f131825f3c3bd5d3f6ebaaa74811026876a639e4a35af07f458b5a73e7c2435cdd90d69fca1e241c4400a70b425a87b92a86ed68060e439b43ba11e7cbb83c0977c0e5b28f9e35293b360180f8a31d550ac4caba2dffdb234c85a0a1f94ec7b1930070f0254f4a3a1e6357e8f0e7b2cc232ae44737a924cc8844aebd727b9f4d73cea919bb93a6a55e1172e8765b18ecb2817c58d136e6b096c7ad9c22e192bac89"
            ["subject_text"]=>
            string(42) "commonName
    deuxieme-sous-domaine.o2-dev.fr"
            ["domains"]=>
            array(2) {
              [0]=>
              string(31) "deuxieme-sous-domaine.o2-dev.fr"
              [1]=>
              string(35) "www.deuxieme-sous-domaine.o2-dev.fr"
            }
            ["issuer.commonName"]=>
            string(31) "deuxieme-sous-domaine.o2-dev.fr"
            ["not_after"]=>
            int(1557820267)
            ["issuer_text"]=>
            string(42) "commonName
    deuxieme-sous-domaine.o2-dev.fr"
            ["subject.commonName"]=>
            string(31) "deuxieme-sous-domaine.o2-dev.fr"
            ["is_autossl"]=>
            int(0)
            ["issuer.organizationName"]=>
            NULL
            ["validation_type"]=>
            NULL
            ["not_before"]=>
            int(1526284267)
            ["modulus_length"]=>
            int(2048)
            ["signature_algorithm"]=>
            string(23) "sha256WithRSAEncryption"
          }
          ["docroot"]=>
          string(44) "/home/mondev/deuxieme-sous-domaine.o2-dev.fr"
          ["needs_sni"]=>
          int(1)
          ["certificate_text"]=>
          string(1256) "REDACTED"
          ["ip"]=>
          string(14) "xxx.xxx.xxx.xxx"
          ["is_primary_on_ip"]=>
          int(0)
        }
      }
      ["module"]=>
      string(3) "SSL"
      ["func"]=>
      string(15) "installed_hosts"
      ["metadata"]=>
      array(1) {
        ["transformed"]=>
        int(1)
      }
      ["messages"]=>
      NULL
      ["status"]=>
      int(1)
    }
    

    Did i miss something or is it a bug ?

    Thank you,
    Alexis
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,855
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @alexis_


    Can you reply with the results of the API when run via CLI?
    Code:
    uapi --user=username SSL installed_host domain=example.com
    

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. alexis_

    alexis_ Member

    Joined:
    Sep 13, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    Hello,

    Here the result :

    Code:
    [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
     
    #3 alexis_, May 18, 2018
    Last edited: May 18, 2018
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,855
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    alexis_ likes this.
  5. alexis_

    alexis_ Member

    Joined:
    Sep 13, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    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
     
    cPanelLauren likes this.
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,855
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice