The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

addon with api2 not working

Discussion in 'cPanel Developers' started by smilesinblues, Jul 9, 2009.

  1. smilesinblues

    smilesinblues Member

    Joined:
    Nov 20, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    after spending a lot of time understanding how to call the API2 calls and which values to pass in URL to create an addon I got the XML output coming out fine but the addon domain does not work. Here is the error.

    Code:
    - <cpanelresult>
      <apiversion>2</apiversion> 
    - <data>
      <reason>Error from domain wrapper: .domain.tld could not be modified because it does not resolve to a valid IP address. Please ask the system admin to check their resolv.conf and their dns trust relationship Ignore any messages of success this can only result in failure!</reason> 
      <result>0</result> 
      </data>
      <func>addaddondomain</func> 
      <module>AddonDomain</module> 
      </cpanelresult>
    

    I am 100% sure the domain's DNS is already updated. Actually the domain was parked to the main domain but in order to test it I deleted it and tried to add as a an addon from my API2 call but it does not work. I then tried to add it as an addon from cpanel and it worked.

    Here is the call that I am making:

    https://domain.tld:2083/xml-api/cpa...us&dir=jaunty&subdomain=jaunty&pass=jhg8779hj

    Please help.

    Regards,
    Jaunty
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Your API2 call looks good, worked for me on my test server.

    As for when you added the addon domain in cPanel, can you just go back to the Addon Domains screen to make certain that the addon domain was added?
     
  3. smilesinblues

    smilesinblues Member

    Joined:
    Nov 20, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    thanks for the reply, I did check in the addon page from cpanel right after adding it and it was listed there.

    I had also checked it after trying with the api call but it was not listed on the cpanel addon page.

    Regards,
    Jaunty
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Is there anything in /usr/local/cpanel/logs/error_log that is relevant to your API2 call immediately after making that API2 call?
     
  5. smilesinblues

    smilesinblues Member

    Joined:
    Nov 20, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    here is what I see in the logs.

    Code:
    null user passed: info: Cpanel::Hulk
    null user passed: info: Cpanel::Hulk
    2009-07-10 08:34:23 info [cphulkd] [6571] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pid$
    2009-07-10 08:34:24 info [cphulkd] [6571] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 09:22:35 info [cphulkd] [22191] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:22:37 info [cphulkd] [22191] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 09:30:26 info [cphulkd] [24785] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:30:26 info [cphulkd] [24810] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:30:26 info [cphulkd] [24809] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:30:26 info [cphulkd] [24866] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:30:27 info [cphulkd] [24785] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 09:30:27 info [cphulkd] [24810] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 09:30:27 info [cphulkd] [24809] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 09:30:27 info [cphulkd] [24866] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    Unable to compress stream: Connection reset by peerInternal Error: "GET /webmail/x3/?login=1 HTTP/1.1" Unable to compress stream: Connection reset by peer
    Unable to compress stream: Broken pipeInternal Error: "GET /webmail/x3/?login=1 HTTP/1.1" Unable to compress stream: Broken pipe
    2009-07-10 09:32:11 info [cphulkd] [25329] Waiting for lock on /var/cpanel/cphulk.conf held by cPhulkd - processor - locking /var/cpanel/cphulk.conf with pi$
    2009-07-10 09:32:12 info [cphulkd] [25329] Lock file /var/cpanel/cphulk.conf.lock now gone, try to acquire
    2009-07-10 11:06:27 info [cphulkd] [21664] Waiting on invalid lock /var/cpanel/hulkdpass.lock for 60 seconds
    null user passed: info: Cpanel::Hulk
    null user passed: info: Cpanel::Hulk
    null user passed: info: Cpanel::Hulk
    null user passed: info: Cpanel::Hulk
    
    I think its worth mentioning here that I have the root access.

    Regards,
    Jaunty
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are you currently calling API2 from a script, or just via typing in the URLs into your web browser?
     
  7. smilesinblues

    smilesinblues Member

    Joined:
    Nov 20, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am directly typing the URL for testing, then we will deploy it into the main system.

    Regards,
    Jaunty
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What is your full cPanel version information?
     
  9. smilesinblues

    smilesinblues Member

    Joined:
    Nov 20, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel 11.24.4-S36281 - WHM 11.24.2 - X 3.9
    REDHAT Enterprise 5.2 i686 standard on
     
  10. Mofiz

    Mofiz Registered

    Joined:
    Jul 18, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1


    I think you should check the variables you are passing. All is okay but could you please check the <dir>/home/mejaunty/public_html/jaunty</dir>.
     
    #10 Mofiz, Jul 19, 2009
    Last edited: Jul 19, 2009
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Actually the above code provided would create the folder in /home/mejaunty/jaunty

    We found an issue in STABLE this morning with Fast Mode. Change xml_api_user to user and the API call will work.
     
Loading...

Share This Page