MuhammadObaid

Registered
Aug 8, 2018
2
0
1
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 .
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
472
113
UK
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
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.)
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.