Wget fails for a valid URL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Wget fails for a valid URL
# 1  
Old 02-24-2014
Question Wget fails for a valid URL

Wget Error Codes:
Code:
    0 No problems occurred.
    1 Generic error code.
    2 Parse error—for instance, when parsing command-line options, the .wgetrc or .netrc…
    3 File I/O error.
    4 Network failure.
    5 SSL verification failure.
    6 Username/password authentication failure.
    7 Protocol errors.
    8 Server issued an error response.

I get error code 8 instead of 0 with wget -q --no-check-certificate $url and no output..

Without the wget --no-check-certificate $url option below is the output received.

Code:
--2014-02-23 08:37:53--  https://cxyz:9443/Services/Account.jws
Resolving cxyz... 255.275.82.125
Connecting to cxyz|255.275.82.125|:9443... connected.
WARNING: cannot verify cxyz's certificate, issued by  `/C=US/O=xxxx./OU=xxxx/OU=Terms of use at https://www.verisign.com/rpa  (c)10/CN=VeriSign Class 3 Secure Server CA - G3':
  Self-signed certificate encountered.
HTTP request sent, awaiting response... 500 Server Error
2014-02-23 08:37:53 ERROR 500: Server Error.

Please suggest a fix !!

Error code 8.

How can i get error code 0 to appear for a invalid certificate URL because all i need to bother is if the URL exists or not.
# 2  
Old 02-24-2014
It seems that the server replies with 500 to the URL you're calling. Try calling the URL via browser and if you still get 500, you'll need to check the web server.
# 3  
Old 02-24-2014
The browser return is good. Here is the output from the browser.

Code:
  <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cer="http://heloz.com/Types/Public/ErrorResponse.xsd" encodingStyle=""><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Unknown Error</faultstring><detail><soap1:CSIApplicationException xmlns:soap1="http://heloz.com/Types/Public/SoapFaultDetails.xsd" xmlns:cng="http://heloz.com/Types/Public/CingularDataModel.xsd" xmlns="http://heloz.com/Types/Public/SoapFault.xsd"><cer:Response> <cng:code>900</cng:code> <cng:description>Unknown Error</cng:description> </cer:Response> <cer:ServiceProviderEntity> <cer:reportingServiceEntity>CSI</cer:reportingServiceEntity> <cer:faultDate>2014-02-24T05:44:50.066-06:00</cer:faultDate> <cer:faultSequenceNumber>1</cer:faultSequenceNumber> <cer:faultLevel>ERROR</cer:faultLevel> <cer:faultCode>90000000001</cer:faultCode> <cer:faultDescription>Unknown Error</cer:faultDescription> <cer:ServiceProviderRawError> <cer:code>900</cer:code> <cer:description>Unknown Error</cer:description> </cer:ServiceProviderRawError> </cer:ServiceProviderEntity> </soap1:CSIApplicationException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

All that matters to me is if the URL exists (reachable) or not.

Kindly help find a solution !!
# 4  
Old 02-24-2014
It seems that it returns an error via browser too. It that's OK for you just handle error code 8 as a success ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Regex for a valid URL

Hi guys, What is the regex to check for only valid URL from a file using grep? (2 Replies)
Discussion started by: Meeran Rizvi
2 Replies

2. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies

3. Shell Programming and Scripting

Read URL data from UNIX-CLI without Wget,CURL,w3m,LWP

Hi Experts, Problem statement : We have an URL for which we need to read the data and get parsed inside the shell scripts.My Aix has very limited perl utility, i cant install any utility as well. Precisely, wget,cURL,Lynx,w3m and Lwp cant be used as i got these utilities only when i googled it.... (12 Replies)
Discussion started by: scott_cog
12 Replies

4. UNIX for Dummies Questions & Answers

Read URL data from UNIX without wget,curl,lynx,w3m.

Hi Experts, Problem statement : We have an URL for which we need to read the data and get parsed inside the shell scripts. My Aix has very limited perl utility, i cant install any utility as well. Precisely, wget,cURL,Lynx,w3m and Lwp cant be used as i got these utilities only when i googled... (0 Replies)
Discussion started by: scott_cog
0 Replies

5. UNIX for Dummies Questions & Answers

Launch a URL,validate username and password using wget or curl

Hi All, I want to launch "ex: http://gmail.com" from the cmd window and validate the credentials with username and password, is it possible? I have found something like this "wget --http-user=USER' --http-password=PASSWORD http://gmail.com" am new to this and unable to find a solution, i... (0 Replies)
Discussion started by: harsha85
0 Replies

6. UNIX for Dummies Questions & Answers

Awk: print all URL addresses between iframe tags without repeating an already printed URL

Here is what I have so far: find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}' Here is an example content of a PHP or HTM(HTML) file: <iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies

7. Linux

downlading using wget fails

I'm trying to build Thrift library..It downloads some files from the Maven repo during the build process. It failed while downloading a file called "ivy-2.2.0.jar" Then I downloaded that file using my browser and I succeeded. After that I tried to download the same file using wget but it failed.... (13 Replies)
Discussion started by: xyzt
13 Replies

8. Shell Programming and Scripting

how to judge wether a url is valid or not using awk

rt 3ks:confused: (6 Replies)
Discussion started by: rainboisterous
6 Replies

9. Shell Programming and Scripting

wget to check an URL

I all, I wrote an script which starts a Weblogic server and waits until its loaded to deploy several apps. The way I checked was something like: while ; do wget --spider <URL>:<port>/console > /dev/null 2>&1 rc=$? done This works perfectly because it's an HTML site and when server is... (2 Replies)
Discussion started by: AlbertGM
2 Replies

10. Shell Programming and Scripting

How to get the page size (of a url) using wget

Hi , I am trying to get page size of a url(e.g.,www.example.com) using wget command.Any thoughts what are the parameters i need to send with wget to get the size alone? Regards, Raj (1 Reply)
Discussion started by: rajbal
1 Replies
Login or Register to Ask a Question