Welcome! Log In Create A New Profile

Advanced

(no subject)

Posted by pritam chavan 
pritam chavan
(no subject)
February 26, 2018 08:10AM
Hi All,

I am using open source NGINX as reverse proxy. There are certain URL which
have URL parameters.

I am getting following error while accessing this URL.

2018/02/22 15:11:08 [error] 1606#0: *21 upstream sent invalid chunked
response while reading upstream, client: 10.109.1.4, server:
XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"

2018/02/22 15:11:47 [error] 1606#0: *24 upstream sent invalid chunked
response while reading upstream, client: 10.109.1.4, server:
XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"

The nginx.conf for above is

# 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 /var/run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.

include /usr/share/nginx/modules/*.conf;



events {

worker_connections 1024;

}

http {

client_body_buffer_size 10M;

server {

listen 8030;

server_name xxx.xxxxxxxx.com;



location /bsg/ltp/live {

proxy_pass http://localhost:8041/bsg/ltp/live;

}

location /bsg/ltp/ {

proxy_pass http://localhost:8041/bsg/ltp/;

}

location /bsg/ltp/live/$arg_name {

proxy_pass http://localhost:8041;

}

location /bsg/ltp/live/$arg_name/$arg_name {

proxy_pass http://localhost:8041;

}

location /bsg/ltp/closing {

proxy_pass http://localhost:8041/bsg/ltp/closing;

}

location /bsg/ltp/closing/$arg_name {

proxy_pass http://localhost:8041;

}

location /bsg/ltp/closing/$arg_name/$arg_name {

proxy_pass http://localhost:8041;

}

location /bsg/scrips {

proxy_pass http://localhost:8042/bsg/scrips;

}

location /bsg/scrips/find/isin/$arg_name {

proxy_pass http://localhost:8042;

}

location /bsg/scrips/find/bse-code/$arg_name {

proxy_pass http://localhost:8042;

}

location /bsg/scrips/find/nse-symbol/$arg_name {

proxy_pass http://localhost:8042;

}

location /bsg/scrips/find/group/$arg_name {

proxy_pass http://localhost:8042;

}



location /bsg/ucm/pincode/$arg_name {

proxy_pass http://localhost:8043;

}

location /bsg/ucm/ifscode/$arg_name {

proxy_pass http://localhost:8043;

}

location ucic/customerid {

proxy_pass http://localhost:8044/ucic/customerid;

}



}

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 informationi

nclude /etc/nginx/conf.d/*.conf;

}

Thanks & Regards,

Pritam Chavan.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: your mail
February 26, 2018 02:10PM
Hello!

On Mon, Feb 26, 2018 at 12:35:15PM +0530, pritam chavan wrote:

> Hi All,
>
> I am using open source NGINX as reverse proxy. There are certain URL which
> have URL parameters.
>
> I am getting following error while accessing this URL.
>
> 2018/02/22 15:11:08 [error] 1606#0: *21 upstream sent invalid chunked
> response while reading upstream, client: 10.109.1.4, server:
> XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
> http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"
>
> 2018/02/22 15:11:47 [error] 1606#0: *24 upstream sent invalid chunked
> response while reading upstream, client: 10.109.1.4, server:
> XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
> http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"

The message suggests the backend is broken and returns an invalid
response with broken chunked transfer encoding. Check your
backend.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Pritam Chavan
RE: your mail
February 27, 2018 08:10AM
Hi Maxim,

First of all thanks for your reply.

I have checked my backend system It is working fine. If I hit same url
without nginx reverse proxy its giving proper output.
Example: For following configuration

location /bsg/ltp/live/$arg_name/$arg_name {
proxy_pass http://localhost:8041;
}

If I hit above url without nginx reverse proxy then its giving proper
output.

Thanks & Regards,
Pritam Chavan.



Pritam Chavan
-----------------------------------------------------------------------------------------------------------------------------------------------
Disclaimer: This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. http://www.edelweissfin.com/Portals/0/documents/miscellaneous/Disclaimer.pdf

-----Original Message-----
From: nginx [mailto:[email protected]] On Behalf Of Maxim Dounin
Sent: 26 February 2018 18:35
To: nginx@nginx.org
Subject: Re: your mail

Hello!

On Mon, Feb 26, 2018 at 12:35:15PM +0530, pritam chavan wrote:

> Hi All,
>
> I am using open source NGINX as reverse proxy. There are certain URL
> which have URL parameters.
>
> I am getting following error while accessing this URL.
>
> 2018/02/22 15:11:08 [error] 1606#0: *21 upstream sent invalid chunked
> response while reading upstream, client: 10.109.1.4, server:
> XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
> http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"
>
> 2018/02/22 15:11:47 [error] 1606#0: *24 upstream sent invalid chunked
> response while reading upstream, client: 10.109.1.4, server:
> XXX.XXXXXXXX.com, request: "GET /bsg/scrips HTTP/1.1", upstream: "
> http://127.0.0.1:8042/bsg/scrips";, host: "XXX.XXXXXXXX.com:8030"

The message suggests the backend is broken and returns an invalid response
with broken chunked transfer encoding. Check your backend.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Francis Daly
Re: your mail
February 27, 2018 09:30AM
On Tue, Feb 27, 2018 at 12:29:54PM +0530, Pritam Chavan wrote:

Hi there,

> I have checked my backend system It is working fine. If I hit same url
> without nginx reverse proxy its giving proper output.
> Example: For following configuration
>
> location /bsg/ltp/live/$arg_name/$arg_name {
> proxy_pass http://localhost:8041;
> }

For info, you are almost certainly not actually using that location{} block.

$variables are not expanded in "location" directives.

It may well be that your :8041 backend is working fine; but the error
message you showed was about your :8042 backend; and as far as nginx
was concerned:

upstream sent invalid chunked response

> If I hit above url without nginx reverse proxy then its giving proper
> output.

How do you know?

Can you use something like "tcpdump" to show the traffic from the backend
when nginx reports a problem, and when things work correctly?

Perhaps that will show what the difference is.

In the logs you provided, the request was "GET /bsg/scrips"; does nginx
always report a problem when you make that request?

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login