<div dir="ltr">looks like i have got the issue. Any requests comes from the ip located in geo.conf will be forwarded to a domain whose ip resolve into 110.93.X.X. Now when a request comes from the ip 110.93.X.X , nginx somehow unable to proxy_pass this prefix(110.93.X.X) it to the ip 110.93.X.X and shows the bad gateway error.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 9:57 AM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Issue will only resolve once i remove <a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a> US; from geo.conf. <br>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 9:55 AM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I removed /24 on per your suggestion and also used different code for override but the issue persists. Modified geo.conf :-<br>

<br><a href="http://39.49.59.0/24" target="_blank">39.49.59.0/24</a> PK;<br><a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a> US;<div><br>
<a href="http://117.20.16.0/20" target="_blank">117.20.16.0/20</a> TW;<br><a href="http://119.63.128.0/20" target="_blank">119.63.128.0/20</a> TW;<br><a href="http://202.163.104.6/32" target="_blank">202.163.104.6/32</a> ARY;<br>

<a href="http://203.124.63.0/24" target="_blank">203.124.63.0/24</a> CM;<br>
<a href="http://221.132.112.0/21" target="_blank">221.132.112.0/21</a> TW;<br><br></div><a href="http://110.93.192.0/24" target="_blank">110.93.192.0/24</a> TW; is not added now.<br></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jun 20, 2014 at 1:12 AM, Steve Wilson <span dir="ltr"><<a href="mailto:lists-nginx@swsystem.co.uk" target="_blank">lists-nginx@swsystem.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    These 2 overlap<br>
    <br>
    <a href="http://110.93.192.0/24" target="_blank">110.93.192.0/24</a> TW;<br>
    <a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a> TW;<br>
    <br>
    The /24 is within the /18. In this instance you want to remove the
    /24.<br>
    <br>
    It might be worth investigating if you've got any others that
    overlap. I think you can probably override with a different country
    code but using the same makes no sense.<span><font color="#888888"><br>
    <br>
    Steve.</font></span><div><div><br>
    <br>
    <div>On 19/06/14 21:06, shahzaib shahzaib
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>For testing purpose, i have added only few
                    prefixes :-<br>
                    <br>
                  </div>
                  geo {<br>
                </div>
                default 0;<br>
              </div>
              include geo.conf;<br>
              }<br>
              <br>
            </div>
            geo.conf <br>
            <br>
            <a href="http://39.49.59.0/24" target="_blank">39.49.59.0/24</a>
            PK;<br>
            <a href="http://110.93.192.0/24" target="_blank">110.93.192.0/24</a>
            TW;<br>
            <a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a>
            TW;<br>
            <a href="http://117.20.16.0/20" target="_blank">117.20.16.0/20</a>
            TW;<br>
            <a href="http://119.63.128.0/20" target="_blank">119.63.128.0/20</a>
            TW;<br>
            <a href="http://202.163.104.6/32" target="_blank">202.163.104.6/32</a>
            ARY;<br>
            <a href="http://203.124.63.0/24" target="_blank">203.124.63.0/24</a>
            CM;<br>
            <a href="http://221.132.112.0/21" target="_blank">221.132.112.0/21</a>
            TW;<br>
            <br>
            <br>
          </div>
          Now, whenever some ip from the list send request, nginx reply
          with gateway timeout :-<br>
          <br>
          curl -I  <a href="http://files.com/files/videos/2014/06/10/14023918368e3411-240.mp4" target="_blank">http://files.com/files/videos/2014/06/10/14023918368e3411-240.mp4</a><br>
          HTTP/1.1 504 Gateway Time-out<br>
          Server: nginx<br>
          Date: Thu, 19 Jun 2014 19:59:50 GMT<br>
          Content-Type: text/html<br>
          Content-Length: 176<br>
          Connection: keep-alive<br>
          <br>
        </div>
        In order to resolve this error, i have to manually remove a
        network from the file which is <a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a> TW;<br>
        <br>
        <div>
          <div>What so suspicious with this prefix <a href="http://110.93.192.0/18" target="_blank">110.93.192.0/18</a>
            TW ? Why it is causing to crash every other requests ?<br>
            <br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Fri, Jun 20, 2014 at 12:07 AM, Jonathan Matthews <span dir="ltr"><<a href="mailto:contact@jpluscplusm.com" target="_blank">contact@jpluscplusm.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>On 19 June 2014 19:59, shahzaib shahzaib <<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>>
              wrote:<br>
              > We've added 2000+ ip prefixes in a file "geo.conf"
              included in nginx vhost<br>
              > by using ngx-http_geo_module and received the
              following warning :-<br>
              ><br>
              > 2014/06/19 23:52:46 [warn] 1633#0: duplicate network
              "<a href="http://103.24.96.0/22" target="_blank">103.24.96.0/22</a>",<br>
              > value: "tw", old value: "tw" in
              /usr/local/nginx/conf/geo.conf:40<br>
              <br>
            </div>
            What makes you think that this error message is incorrect?<br>
            If it's correct and you have a duplicate entry, resolving
            the problem<br>
            should be pretty simple ...<br>
            <br>
            _______________________________________________<br>
            nginx mailing list<br>
            <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
            <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
nginx mailing list
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>