no access_log logging for UDP streams
Roman Arutyunyan
arut at nginx.com
Wed Feb 14 13:59:49 UTC 2018
Hi David,
On Tue, Feb 13, 2018 at 01:01:03PM -0800, David Kewley wrote:
> I'm using nginx 1.12.1 to proxy TCP and UDP streams. I have in my stream {}
> stanza:
>
> log_format test '$time_local';
>
> access_log /var/log/nginx/stream-access.log test buffer=64k flush=1s;
> error_log /var/log/nginx/stream-info.log info;
>
>
> Both TCP and UDP streams log to /var/log/nginx/stream-info.log. Only TCP
> streams are logged in /var/log/nginx/stream-access.log; UDP streams are not.
>
> FWIW, client application behavior and tcpdump both show that the upstream
> UDP server is sending a response that makes it through nginx proxy to the
> client just fine.
>
> Is this lack of UDP stream access_log logging expected, or should I open a
> new bug?
>
> If you need to see more details to show exactly what I'm doing, let me know
> which details would be helpful.
Probably your UDP session is not considered finished by nginx.
Did you specify proxy_responses and proxy_timeout in your config?
If proxy_responses is unspecified and proxy_timeout is large, it may take a
long time for a UDP session to expire and be logged.
--
Roman Arutyunyan
More information about the nginx
mailing list