$upstream_addr containing the same ip twice

Hello,
I have just 1 backend server being reverse-proxied through nginx. The
access log lists this one request for which the $upstream_addr has the
same ip:port twice. Is this a bug ?

::ffff:10.255.255.248:51947 - - [18/Feb/2015:19:52:43 -0600] “GET /
HTTP/1.1” 302 454 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;
rv:35.0) Gecko/20100101 Firefox/35.0” "a.b.c.d:e, a.b.c.d:e "

This is how the the log_format is defined
log_format upstream '$remote_addr:$remote_port - $remote_user
[$time_local] ’
'"$request" $status $bytes_sent ’
‘"$http_referer" “$http_user_agent” “$upstream_addr”’;

Thanks
-Kunal

Hello!

On Wed, Feb 18, 2015 at 09:03:47PM -0600, Kunal P. wrote:

Hello,
I have just 1 backend server being reverse-proxied through nginx. The access log
lists this one request for which the $upstream_addr has the same ip:port twice. Is
this a bug ?

::ffff:10.255.255.248:51947 - - [18/Feb/2015:19:52:43 -0600] “GET / HTTP/1.1”
302 454 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101
Firefox/35.0” "a.b.c.d:e, a.b.c.d:e "

This is how the the log_format is defined
log_format upstream '$remote_addr:$remote_port - $remote_user [$time_local] ’
'“$request” $status $bytes_sent ’
‘“$http_referer” “$http_user_agent” “$upstream_addr”’;

This can legitimately happen, e.g., if you configure an upstream
with multiple servers with the same IP address.


Maxim D.
http://nginx.org/

I have just one server configured with a single Ip address but I still
see
this.

Thanks
-Kunal

Hello!

On Thu, Feb 19, 2015 at 08:49:33AM -0800, Kunal P. wrote:

I have just one server configured with a single Ip address but I still see
this.

The example case mentioned isn’t the only case when this can
happen legitimately.


Maxim D.
http://nginx.org/

Can you please tell me other such cases where this could happen ? Can’t
think of any in my scenario atleast.

Thanks
-Kunal

----- Original Message -----
From: “Maxim D.” [email protected]
To: [email protected]
Sent: Thursday, February 19, 2015 9:23:16 AM
Subject: Re: $upstream_addr containing the same ip twice

Hello!

On Thu, Feb 19, 2015 at 08:49:33AM -0800, Kunal P. wrote:

I have just one server configured with a single Ip address but I still see
this.

The example case mentioned isn’t the only case when this can
happen legitimately.


Maxim D.
http://nginx.org/


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Hello!

On Thu, Feb 19, 2015 at 12:11:58PM -0600, Kunal P. wrote:

Can you please tell me other such cases where this could happen ?

E.g., this can also happen when using an upstream{} with keepalive
connections cache configured.

Can’t think of any in my scenario atleast.

It’s only who knows your scenario. If you think this is not
legitimate in your case, you may consider providing the
information outlined here:


Maxim D.
http://nginx.org/