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.

under NAT server wget cronjob fail to a local url

Discussion in 'General Discussion' started by ilConfa, Jul 24, 2014.

  1. ilConfa

    ilConfa Registered

    Joined:
    Jul 24, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Guys,

    I have a big problem with the cronjob, my centos64 server is under NAT, and if I schedule a "wget" command to a local url (the url is on the same server), the command fail with timeout error,

    4623425528---PuTTY.png

    same command to an external url (but identical file) work perfectly (the url is on the other server)

    46234255282---PuTTY.png

    I think the problem is the server IP, because is not the public IP (46.234.255.28) but is the private IP, obviously I can't add public IP because this is the gateway IP address,

    46234255283---PuTTY.png

    any idea?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Have you tried adding an entry to your /etc/hosts file pointing the domain name to a local IP address to see if that makes a difference?

    Thank you.
     
  3. ilConfa

    ilConfa Registered

    Joined:
    Jul 24, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    yes I tried, but the only result is a resolution 127.0.0.1 instead of a public ip, but the timeout error persists.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. ilConfa

    ilConfa Registered

    Joined:
    Jul 24, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    yes, and it works,

    Code:
    /usr/local/bin/php -q /home/trilogy/public_html/helloworld.php
    but I thought that the error of wget could be a problem for the normal functioning of cPanel, if not, I will continue to use this method.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It should not result in any issues with cPanel, but keep in mind that a 1:1 NAT environment is only supported if it was detected during the initial cPanel installation. You can find documentation on this here:

    1:1 NAT

    Thank you.
     
  7. ilConfa

    ilConfa Registered

    Joined:
    Jul 24, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ok Michael, Thank you for support!
     
Loading...

Share This Page