Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log error when recv proxy info timeout #177

Merged
merged 4 commits into from Apr 20, 2023

Conversation

terry-xiaoyu
Copy link
Contributor

@terry-xiaoyu terry-xiaoyu commented Apr 20, 2023

Before the change:

2023-04-20T14:56:51.671735+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {invalid_proxy_info,<<"f\n">>}, offender: [{pid,<0.3192.0>},{name,connection},{mfargs,{emqx_connection,start_link,[[{listener_id,<<"mqtt:tcp:external">>},{deflate_options,[]},{max_conn_rate,1000},{active_n,100},{zone,external},{proxy_address_header,<<>>},{proxy_port_header,<<>>},{supported_subprotocols,[]}]]}}]

2023-04-20T14:57:01.348275+08:00 [error] supervisor: 'esockd_connection_sup - <0.2537.0>', errorContext: connection_shutdown, reason: {proxy_proto_timeout,5000}, offender: [{pid,<0.3194.0>},{name,connection},{mfargs,{emqx_connection,start_link,[[{listener_id,<<"mqtt:tcp:external">>},{deflate_options,[]},{max_conn_rate,1000},{active_n,100},{zone,external},{proxy_address_header,<<>>},{proxy_port_header,<<>>},{supported_subprotocols,[]}]]}}]

After the change:

2023-04-20T18:07:06.180134+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but received invalid proxy_protocol header, raw_bytes=<<"f\n">>

2023-04-20T18:10:17.205436+08:00 [error] [esockd_proxy_protocol] The listener 127.0.0.1:8883 is working in proxy protocol mode, but timed out while waiting for proxy_protocol header

@terry-xiaoyu terry-xiaoyu force-pushed the log-error-when-recv-proxy-info-timeout branch from 1c6ba77 to 200c0fb Compare April 20, 2023 09:18
src/esockd_proxy_protocol.erl Outdated Show resolved Hide resolved
src/esockd_proxy_protocol.erl Outdated Show resolved Hide resolved
src/esockd_proxy_protocol.erl Outdated Show resolved Hide resolved
src/esockd_proxy_protocol.erl Outdated Show resolved Hide resolved
src/esockd_proxy_protocol.erl Outdated Show resolved Hide resolved
@terry-xiaoyu terry-xiaoyu force-pushed the log-error-when-recv-proxy-info-timeout branch from f7daece to 90a556c Compare April 20, 2023 10:13
@terry-xiaoyu terry-xiaoyu force-pushed the log-error-when-recv-proxy-info-timeout branch from 90a556c to 304648b Compare April 20, 2023 10:22
@terry-xiaoyu terry-xiaoyu merged commit 903fb7d into bug_fixs/5.8.x Apr 20, 2023
7 checks passed
@terry-xiaoyu terry-xiaoyu deleted the log-error-when-recv-proxy-info-timeout branch April 20, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants