location = precedence breakage

kyleb nginx-forum at nginx.us
Wed Dec 16 20:38:17 MSK 2009


On Wed, 16 Dec 2009 10:01:00 -0500, Igor Sysoev  wrote:

> What is the "socket error" ?

The kind produced by sending packets to non-existent host, as caused by bone-headed stupid mistake I made.  Not that it helps, but I deeply apologize to have wasted your time.

In case of curiosity or desire to know truth:

CGI hardcoded hostname for URLs.  (Mistake #1: Bad/lazy design.)  Old test server had entry in hosts file, thus lookup returned IP address instead of NXDOMAIN.  New test server has different name/ip.  When I test following dummy links from base page, user-agent waits awhile, then says ``socket error'' (actual cause: TCP SYN goes out, nothing comes back).

Since only difference (I thought) is in nginx version and two nginx.conf location blocks, I focus on that without looking at hostname in address bar.  (More mistakes:  Snap judgments and failure to attend too-obvious details.)  I spend about 10-20 minutes trying all different nginx options, then hit mailing list.

I find error after you ask what socket error is, and try different user-agent from different host with more debugging ability.  No entry in hosts file there; now I get NXDOMAIN, which points me to error.  I fix CGI, and everything works perfectly.  nginx is innocent.

I am very severe against people for exactly this kind of mistake.  I hang my head in shame, now.  At least you should know the truth (painful as it is for me to say it), and not waste any more valuable time on it.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,30889,30951#msg-30951




More information about the nginx mailing list