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!

WGET cronjob not working

Discussion in 'General Discussion' started by MuhammadObaid, Aug 8, 2018.

Tags:
  1. MuhammadObaid

    MuhammadObaid Registered

    Joined:
    Aug 8, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Karachi
    cPanel Access Level:
    Website Owner
    In cpanel I am trying to setup cronjob command as follows

    wget http://ec2-xx-xx-xxx-x.compute-1.amazonaws.com:8000/data.csv -o public_html/data.csv

    But I am getting following error

    Connecting to ec2-xx-xx-xxx-x.compute-1.amazonaws.com (ec2-xx-xx-xxx-x.compute-1.amazonaws.com)|xx.xx.xx.x|:8000... failed: Connection refused.

    When I access that aws url using curl or wget on my local computer it works fine without any problem and fetches required files but in cpanel it is not working .
     
  2. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    191
    Likes Received:
    15
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Have you opened port 8000 TCP outgoing in your firewall?
     
  3. MuhammadObaid

    MuhammadObaid Registered

    Joined:
    Aug 8, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Karachi
    cPanel Access Level:
    Website Owner
  4. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    191
    Likes Received:
    15
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    On the source server.
     
  5. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    968
    Likes Received:
    380
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Given that you can successfully connect to the amazonaws.com server from your local computer using curl or wget; demonstrates that their system is working and accepting connections on port 8000, and has not blocked the curl or wget protocols.

    You will need to look at 2 possibilities: (I would suggest you do these in the order that they are written)

    1) On YOUR cPanel server ensure that port 8000 is open (You mark your Access Level as a Website Owner, so you may need to ask for help from your web host or server operator if you do not have root or WHM access)

    2) Ensure that your cPanel server IP has not been blocked on the amazonaws.com server. (You will have to contact the operator of the amazonaws.com server to look and see if your cPanel server IP has been added to any block lists by mistake.)

    Hope this helps
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,409
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @MuhammadObaid,

    The advice noted in the quote above is solid. As a website owner without root access to the server, contacting your web hosting provider is likely a good first step when troubleshooting this issue.

    Thank you.
     
    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