Results 1 to 22 of 22
  1. #1
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117

    CURL Error: 7 - couldn't connect to host - NetEarthOne Domain Sync

    Hello everyone,

    I'm trying to fix an issue with our WHMCS where we are getting "CURL Error: 7 - couldn't connect to host" every time the WHMCS NetEarthOne Domain Syncronisation runs.

    I did a google on this and I found that the server IP needs to be entered in the "Settings > API section" area in netearthone. I have already done that, however we are still getting the same error message.

    Can someone please give me some general ideas as to what could be wrong?

    Thanks

    Daniel

    PS we are running WHMCS Version: 4.5.1

  2. #2
    Join Date
    Jan 2011
    Posts
    453
    Hello,

    Did you check whether PHP is compiled with curl or not? If not, you need to recompile PHP to enable the curl module.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  3. #3
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Hello,

    Yes curl is turned on in php. I even did a version check in WHMCS to make sure that it is working and it is. Also I did an upgrade on wordpress the other day so I'm sure that curl is turned on.

    Thanks

    Daniel

  4. #4
    Join Date
    Jan 2011
    Posts
    453
    Hello,

    I got the below given info from WHMCS docs.

    Server Command Error - Curl Error - Couldn't connect to host (7)

    This response means you have a firewall blocking the connection. The port being used depends on what module you are using but for cPanel it would be 2086/2087, Plesk 8443, DirectAdmin 2222, etc...

    Can you check this? If you are still having issues simply open a support ticket to WHMCS.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  5. #5
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Hello,

    Yes I did see that, however I didn't think that would affect it. Port 2086/2087 is open on our firewall since we use cpanel. I wonder if NetEarthOne got ports that need to be opened.

    Thanks

    Daniel

  6. #6
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Update:

    Just got the next email:

    -----------------------------
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host

    Updated xxxxxxx expiry to 16/05/2012
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    Error for xxxxxxx: CURL Error: 7 - couldn't connect to host
    So it worked for one domain but not the others? No that not the full email, all the other domains listed is giving the "CURL Error: 7 - couldn't connect to host" error

    I have opened a ticket to WHMCS, just waiting for then to get back to me

    Thanks

    Daniel

  7. #7
    It's either your firewall or your resolvers cannot resolve the domain you are attempting to connect to or your connecting IP hasnt been added to your API IP access list (which was recently introduced - which is likely to be the case here)

  8. #8
    Join Date
    Jan 2011
    Posts
    453
    Hello Daniel,

    Please don't forget to post the fix here.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  9. #9
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Ok,

    WHMCS support got back to me and sent 2 links, and I'm like been there done that (I didn't say that in my reply)

    Please see our release notes regarding the LogicBoxes modules (Reseller Club, NetEarthOne etc) @ http://wiki.whmcs.com/Version_4.5_Re...#Release_Notes & http://wiki.whmcs.com/ResellerClub#C...ub_.28v_4.5.29
    IH-Chris,

    Can you please tell me how I can test this from the server? What IP adress / url should I ping and what port should I have open in the firewall?

    Also does anyone know how long it should take for the API IP access list to take affect?

    Thanks

    Daniel

  10. #10
    Did you add your IP to the trusted IP list?

  11. #11
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Yes I did add the server IP to the trusted list

    Thanks

    Daniel

  12. #12
    Join Date
    Jun 2003
    Location
    Sheffield
    Posts
    810
    Try adding your server's primary IP address to the API whitelist too.
    WHMCS
    The Complete Client Management, Billing & Support System
    Documentation | Help Guides

  13. #13
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    117
    Ok,

    I got it worked out. Don't ask how I did it, but I somehow manage to put the wrong IP address in the API whitelist. I had every bit of the IP right bar the very last number. I put xxx.xxx.xxx.x6 but it should have been xxx.xxx.xxx.x4.

    Thanks for you help guys

    Daniel

  14. #14
    Join Date
    Jan 2011
    Posts
    453
    Hello Daniel,

    It is good to hear that the issue is sorted out and thanks for sharing the fix.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  15. #15
    Thanks for the information. We was having the same issue as well.

  16. #16
    I want to make sure I understand I was at the right place.

    I logged into my NetEarth One Account, clicked on

    Settings> API

    Scrolled to the bottom then added my IP address of my server.

    It gave me a message that said it will be added within the next 30 minutes.

    Did I do that correctly?

  17. #17
    I waited 30 minutes and still I get the error????

  18. #18
    Hi All,

    This is down to a few different reasons :
    1. Your server is blocking outgoing 443 (https)
    2. The IP you have added to NEO is not the correct one.
    3. You didnt want the magic 30 mins :p

    Pop along to live chat, we are here to help and there is a file you can upload to your server to check the IP to add to NEO.

    Chris
    NetEarth One
    ICANN Accredited Registrar, https://reseller.netearthone.com
    Full UK support, 7 days a week 365 days a year!

  19. #19
    i have the same problem. Mine if i manually execute the sync file, all are updated without error. If it is on cron job, it will just gives error after the 10th domain. CURL Error: 7 - couldn't connect to host

  20. #20
    I have been trying to find where to edit the API access list, but so far no success. Can someone point me in the right direction here?

    Is there documentation on this somewhere I am missing by chance or is this just for netearthone domain sync?

  21. #21
    Quote Originally Posted by Byrd View Post
    I have been trying to find where to edit the API access list, but so far no success. Can someone point me in the right direction here?

    Is there documentation on this somewhere I am missing by chance or is this just for netearthone domain sync?
    Add the server IP to NEO >> Settings >> API. It is for the whole LogicBoxes platform. You may also need to add the IP that your WHMCS is installed on as well (if different).

    Thats it :-)
    NetEarth One
    ICANN Accredited Registrar, https://reseller.netearthone.com
    Full UK support, 7 days a week 365 days a year!

  22. #22
    Dears,

    I am newbie in web hosting business, and i got same error as

    "FAILED: (Curl Error) couldn't connect to host - code: 7"

    can any help me how to fix this problem?

Similar Threads

  1. Module Create Failed: Error: (Curl Error) couldn't connect to host - code: 7
    By zomex in forum Hosting Software and Control Panels
    Replies: 6
    Last Post: 11-13-2010, 03:07 PM
  2. WHMCS Curl ERROR: name lookup timed out error
    By datamansystem in forum Programming Discussion
    Replies: 1
    Last Post: 02-19-2007, 11:26 AM
  3. Exim SMTP Sync Error
    By devonblzx in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-04-2007, 02:08 PM
  4. curl: (6) Couldn't resolve host
    By FULLAMHRD in forum Hosting Security and Technology
    Replies: 2
    Last Post: 07-15-2005, 07:14 AM
  5. very odd mysql error (sync)
    By popdirt in forum Programming Discussion
    Replies: 0
    Last Post: 10-24-2004, 06:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •