The page you are looking for is temporarily unavailable. Please try again later. (HTTP Status code 499 and 504)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The page you are looking for is temporarily unavailable. Please try again later. (HTTP Status code 499 and 504)

Kaushal Shriyan
Hi,

I am running nginx version: nginx/1.16.1 on CentOS Linux release 7.8.2003 (Core). I have configured the below settings in /etc/nginx/nginx.conf.

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
    worker_connections 1024;
}
http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;
    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
     listen 80;
     location /test {
         proxy_set_header   X-Forwarded-For $remote_addr;
   proxy_set_header   Host $http_host;
   proxy_pass         https://vpc-test-search-9n18zc18u2ffd3n4ywapz7jkrde.us-west-1.es.amazonaws.com;
                }
     location /prod {
         proxy_set_header   X-Forwarded-For $remote_addr;
   proxy_set_header   Host $http_host;
   proxy_pass         https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com;
                }


        error_page 404 /404.html;
            location = /40x.html {
        }
        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
}

When I hit http://14.217.10.21/prod I am seeing the below issue in nginx access log (/var/log/nginx/access.log)

114.18.113.6 - - [23/Jul/2020:17:14:35 +0000] "GET /prod HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-" 

114.18.113.6 - - [23/Jul/2020:17:15:35 +0000] "GET /prod HTTP/1.1" 504 3693 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-"


image.png

Please let me know if you need any additional information. Any help will be highly appreciated. Thanks in Advance. I look forward to hearing from you.

Best Regards,

Kaushal


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: The page you are looking for is temporarily unavailable. Please try again later. (HTTP Status code 499 and 504)

Kaushal Shriyan


On Thu, 23 Jul 2020 at 22:50, Kaushal Shriyan <[hidden email]> wrote:
Hi,

I am running nginx version: nginx/1.16.1 on CentOS Linux release 7.8.2003 (Core). I have configured the below settings in /etc/nginx/nginx.conf.

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
    worker_connections 1024;
}
http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;
    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
     listen 80;
     location /test {
         proxy_set_header   X-Forwarded-For $remote_addr;
   proxy_set_header   Host $http_host;
   proxy_pass         https://vpc-test-search-9n18zc18u2ffd3n4ywapz7jkrde.us-west-1.es.amazonaws.com;
                }
     location /prod {
         proxy_set_header   X-Forwarded-For $remote_addr;
   proxy_set_header   Host $http_host;
   proxy_pass         https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com;
                }


        error_page 404 /404.html;
            location = /40x.html {
        }
        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
}

When I hit http://14.217.10.21/prod I am seeing the below issue in nginx access log (/var/log/nginx/access.log)

114.18.113.6 - - [23/Jul/2020:17:14:35 +0000] "GET /prod HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-" 

114.18.113.6 - - [23/Jul/2020:17:15:35 +0000] "GET /prod HTTP/1.1" 504 3693 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-"


image.png

Please let me know if you need any additional information. Any help will be highly appreciated. Thanks in Advance. I look forward to hearing from you.

Best Regards,

Kaushal 


Hi,

Checking in again if someone can pitch in for help regarding my earlier email to this mailing list.

Thanks in advance 

Best Regards,

Kaushal

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: The page you are looking for is temporarily unavailable. Please try again later. (HTTP Status code 499 and 504)

Francis Daly
In reply to this post by Kaushal Shriyan
On Thu, Jul 23, 2020 at 10:50:29PM +0530, Kaushal Shriyan wrote:

Hi there,

> >      location /prod {
> >          proxy_set_header   X-Forwarded-For $remote_addr;
> >    proxy_set_header   Host $http_host;
> >    proxy_pass
> > https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com
> > ;
> >                 }

> >         error_page 500 502 503 504 /50x.html;
> >             location = /50x.html {
> >         }

> When I hit http://14.217.10.21/prod <http://34.247.80.31/prod> I am seeing
> the below issue in nginx access log (/var/log/nginx/access.log)
>
> 114.18.113.6 - - [23/Jul/2020:17:14:35 +0000] "GET /prod HTTP/1.1" *499* 0
> "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" "-"

"499" there means that the client closed the connection with nginx before
nginx successfully sent things to the client.

There's nothing nginx can do about that, other than
break the nginx connection to upstream if you want it to
(http://nginx.org/r/proxy_ignore_client_abort).

> 114.18.113.6 - - [23/Jul/2020:17:15:35 +0000] "GET /prod HTTP/1.1" *504*
> 3693 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"
> "-"

"504" is Gateway Timeout: nginx failed to get an answer from the upstream
(https://vpc-prod-search-zvf8bfaabstcc6gi7sklqh7ll4.us-west-1.es.amazonaws.com)
for the request "/prod" in the time that it was allowed.

> [image: image.png]

That image presumably shows your /50x.html file, which you have configured
to be shown for any of the listed 500-series error codes.

For the 504 -- can you connect to that upstream from the nginx server? Is
there anything extra in the nginx error log? Does, for example, the
hostname resolve now to the same IP address that it resolved to when
nginx started?

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx