Wget retry on 500 internal error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Wget retry on 500 internal error
# 1  
Old 01-22-2014
Wget retry on 500 internal error

Hello Guys,
I am trying to generate static site, I have perl script that wget the url, so the problem is sometimes wget has 500 internal error, this is failing to get that page. So I am thinking of retrying that url with 500 response.
system $command = 'wget ... -i inputfile -o outfile"
Is there a way we can capture the response and retry it or any option within wget to retry after timeout? Help appreciated.
# 2  
Old 01-23-2014
wget with 500 error

You can not capture the exact error data when
Code:
wget url

returns 500

You should examine the server log files, typically Apache error.log and access.log.

While debugging your server (scripts?) you might consider setting a higher debug level, https://httpd.apache.org/docs/1.3/logs.html

---------- Post updated 23-01-14 at 01:01 AM ---------- Previous update was 22-01-14 at 07:06 PM ----------

And there is a trick, which is not without weird dangers:


Edit http.conf
Instead of logging to /logs

log to /htdocs

Restart server.

Now you may

Code:
wget url/error.log


Last edited by hadewych; 01-23-2014 at 02:06 AM.. Reason: adding trick
# 3  
Old 01-23-2014
wget doesn't seem to have any options for 'retry after 500 server error', but you should at least be able to tell that wget has failed by its return code or, failing that, its failure to create a file. A script could handle this but it seems like you're feeding this into some other non-shell system.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Unrecovered read error No retry

We encountered these error 2 times(e.g. Solaris 10 with NetWorker installed) with in the month of August, but we couldn't pin point the root cause, it might be bad sector, bad cable or software incompatibility? Do you experience these issue or please share your understanding about this? Thanks... (0 Replies)
Discussion started by: B@S
0 Replies

2. UNIX for Advanced & Expert Users

How to manipulate the conditions between every retry in wget?

Hi , When i hit the URL using WGET command ,it is retrying according to the number of retry we mentioned along with Wget command. my expectation : 1) If 1st try is failed and iam retrying again before 2nd retry i have to check for "xxxxxxx" entry in the log file. 2) If "XXXXXXX" entry is... (4 Replies)
Discussion started by: vinothsekark
4 Replies

3. Shell Programming and Scripting

500 internal server error

Hi, I need a quick help from GURUs of PERL. I moved a website to a new location and got an error "Internal Server Error" instead of specific error. As i don't know PERL so i don't know how to fix it. Can anybody help me to fix this error or to generate a specific error which i can... (3 Replies)
Discussion started by: shahzad79
3 Replies

4. Shell Programming and Scripting

Fill the values between -500 to 500 -awk

input -200 2.4 0 2.6 30 2.8 output -500 0 -499 0 -488 0 .......... .......... .... -200 2.4 .... ... 0 2.6 (6 Replies)
Discussion started by: quincyjones
6 Replies

5. Web Development

weird 500 Internal server error

Hi All, I am seeking some help. While trying to access my website: EDITED (hosted on private server somewhere - don't want to publicize names) - I have a weird behaviour: I can always get to the site - but some applications get a 500 Internal error. If I use FireBug (mozilla addon) I can... (2 Replies)
Discussion started by: saariko
2 Replies

6. UNIX for Advanced & Expert Users

Forwarding internal internet packets to internal webserver using iptables

Hi, I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication. Can... (1 Reply)
Discussion started by: mshindo
1 Replies

7. Shell Programming and Scripting

500 Internal Server Error

:)Hi, I am working on perl-cgi script which i wrote on unix server, and now i want to run it from windows. Have put DNS entry, sybase and apache is running... But still I am getting 500 Internal Server Error!!! what could be the reason? (2 Replies)
Discussion started by: darshakraut
2 Replies

8. UNIX for Advanced & Expert Users

Enomem in Journal Retry Error

Hi, Does anyone seen this error before.. kernel: ENOMEM in journal_alloc_journal_head, retrying. I encounter this problem on IBM eServers where when the above error appears usually the machine is dead or hanged. Unless a hard reboot is been done. Is this something have to do with the memory... (1 Reply)
Discussion started by: killerserv
1 Replies
Login or Register to Ask a Question