问题
I've got a very strange problem.
There's a cron job on the server to run a script daily:
wget -O /dev/null --timeout=300 --tries=1 "http://website.com/script"
It was all working well since about two weeks ago, I started receiving errors:
--2016-07-13 09:45:01-- http://website.com/script
Resolving website.com (website.com)... 11.22.33.44
Connecting to website.com (website.com)|11.22.33.44|:80... failed: Connection timed out.
Giving up.
These are some information for this question:
- The cron job is on the same server of http://website.com hosted.
- I can access the script (http://website.com/script) correctly from browser on my desktop.
- The server is CentOS 7, with WHM and cPanel installed.
Anyone know what could be the issue? or how do I suppose to identify the issue?
Thanks
回答1:
If the website is up try a different command.
*/10 * * * * /usr/bin/wget
-q -O temp.txt http://website.com/script
回答2:
Try adding -H
wget -H -O /dev/null --timeout=300 --tries=1 "http://website.com/script"
来源:https://stackoverflow.com/questions/38428635/wget-connection-timed-out-on-same-server