1

I am trying to use wget to debug and issue I am having. I have a remote machine from one server trying to reach query.json and it works fine, connects and downloads fine. I have another remote machine trying to reach the same location and I get this:

[root@test ~]# wget http://testsite.com/query.json
--20:49:55--  http://testsite.com/query.json
Resolving testsite.com... aaa.bbb.ccc.ddd
Connecting to testsite.com|aaa.bbb.ccc.ddd|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
20:49:55 ERROR 404: Not Found.

I have turned off the firewall temporary and that does not help. It looks like it is connecting to the machine (I have verified with traceroute that both machines are making it to the server), it just cant find the file, but I am sure it is there because it works with my other remote machine. Anyone know what could be causing this?

Thanks.

1
  • 1
    Silly question: If you open that url in a browser, do you get a 404? Aug 1, 2012 at 22:10

2 Answers 2

0

Check the HTTP server error logs - these often give more detail. Compare successful and unsuccessful entries in the HTTP server access logs.

2
  • The error log does not show any new logs. The access log shows a POST every time it is contacted by the working machine. Nothing shows up in the log when contacted by the non-working machine.
    – yellavon
    Aug 7, 2012 at 22:26
  • Even though the logs did not show an error, the access log allowed me to see it wasn't even hitting the machine. I found out in /etc/hosts I was resolving an incorrect hostname to the IP. Even though the message was sent to the correct IP, I guess the DNS did not like the incorrect hostname that may have been in the headers.
    – yellavon
    Aug 8, 2012 at 21:23
1

Thanks to RedGrittyBrick, the access log allowed me to see it wasn't even hitting the machine.

I found out in /etc/hosts I was resolving an incorrect hostname to the IP. Even though the message was sent to the correct IP, I guess the DNS did not like the incorrect hostname that may have been in the headers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .