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.

Please Help With cURL Error (7):

Discussion in 'General Discussion' started by najib12, Dec 28, 2014.

  1. najib12

    najib12 Registered

    Joined:
    Dec 28, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello All, I've problem with cURL,
    Code:
    cURL Error (7): Failed to connect to xxxxxx.io port 80: No route to host 
    May someone give me clue and advice to fix that error

    Very Thank you
     
  2. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Are you doing this from command line? If so, try to make sure you can resolve xxxxxx.io.

    nslookup xxxxxx.io (or even ping xxxxxx.io)

    Are you able to resolve the name to an IP?

    - Scott
     
  3. najib12

    najib12 Registered

    Joined:
    Dec 28, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for reply,
    Here's reply:

    - - - Updated - - -

    And Why it work okay when I'm test call from another server
     
  4. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    If it works from another server, it's possible that there is a firewall problem, either on your server, or at the other server.

    The ping test was mainly to see if you could do a proper DNS lookup. I am guessing you were able to do the DNS lookup, because your server then tried to ping whatever IP it resolved to. So, I do not think it's a DNS issue now.

    Not sure if you have traceroute enabled on your server, but you could also try "traceroute xxxxxx.io" and see where it stops.

    - Scott
     
  5. najib12

    najib12 Registered

    Joined:
    Dec 28, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Scrott,
    May you compare domain .io/test/t/check .php with project .domain .com/test/dlm2 .php?
    Hope you can advice me...

    Thank you
     
    #5 najib12, Dec 29, 2014
    Last edited by a moderator: Dec 29, 2014
  6. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    When you simply browse to: domain.io/test/t/check.php

    It shows the script and in the script it says "Failed to connect to domain.io port 80: No route to host"

    So, I don't think it's a cURL problem. The script itself doesn't work.

    - Scott
     
    #6 sneader, Dec 29, 2014
    Last edited by a moderator: Dec 29, 2014
  7. najib12

    najib12 Registered

    Joined:
    Dec 28, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Scott, how about domain .io/test/t/check .php

    - - - Updated - - -

    Sorry I meant domain .io/test/t/x .php
     
    #7 najib12, Dec 29, 2014
    Last edited by a moderator: Dec 29, 2014
  8. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    domain.io/test/t/x.php results in the same error (but it doesn't show the script)

    "cURL Error (7): Failed to connect to domain.io port 80: No route to host"

    Look, before you worry about using cURL, just try to browse to it using your web browser. If your web browser can't make it work, then your cURL command isn't going to work, either.

    I don't need to test these in my browser... you can do this. :)

    - Scott
     
    #8 sneader, Dec 29, 2014
    Last edited by a moderator: Dec 29, 2014
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,706
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, it seems like there is a connection/firewall issue that's preventing access attempts to the domain name in question. It's less of an issue with cURL and more of an issue with the connection itself.

    Thank you.
     
Loading...

Share This Page