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
[Bug]: Websockets upgrade request: HTTP 431: Request Header Fields Too Large with big cookies #2267
Comments
@DomasM Thanks. Can you try setting
👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
@ioolkos Thank you for help. I'm not sure what's my listener name, but anyway vernemq would not start with such setting, saying that it does not exist and suggesting listener.http.default.max_request_line_length, which I tried but it seems that did not change anything in actual behaviour, i.e. still 431.
|
@DomasM Thanks a lot for testing! A workaround is to update the
You could at least use this to test whether this really is about that specific setting. The default value for 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
@ioolkos Thank you again. I tried as suggested and while setting cowboy options seems to work, further requests still end with 431.
|
Hm, okay. What listeners do you have running ( 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
I suppose. Tried setting cowboy options for 8080, but it complained.
|
You don't have a listener 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
@DomasM were you able to make this work? Do you think we should expose the 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
Hi, I will be back to work tomorrow. Good catch regarding ip, I saw that
setting from vernrmq.conf has been applied to cowboy, so didn't check any
further.
Rrgarding header size - I think this propery should be exposed, and
possibly different default vale used, as there is very little value added
by broker by limiting cookie size. Cookie might easily come from quite a
different part of the application than mqqt connection initialization, and
cookie size might differ from one user to another, or as time passes, thus
causing seemingly unrelated issues for connection via websocket.
…On Mon, Mar 18, 2024, 15:28 ioolkos ***@***.***> wrote:
@DomasM <https://github.com/DomasM> were you able to make this work?
Do you think we should expose the max_header_value_length in vernemq.conf?
or to re-word the question: do you think the cookie size you used here
should be within a "normal" size window?
------------------------------
👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker)
requires a paid subscription.
—
Reply to this email directly, view it on GitHub
<#2267 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADG3FPVOIZUBN32G7XYGHNDYY3TX5AVCNFSM6AAAAABEWSFNFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBTHEYDKNJXHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@ioolkos I finally got it working by setting max_header_value_length for the correct listener. IP address of the listener changes from run to run, so the steps current solution is:
To have this working more properly maybe some copy-paste from #2161 would be enough to map max_header_value_length property too? |
@DomasM yes, same approach. In addition, we'd likely need to grab and apply the setting in 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
Environment
Current Behavior
I am trying to connect to verne broker from the browser via websocket using mqtt.js. Cookies are added to the Upgrade request by the browser, and these cookies are large. Connection attempt is refused with HTTP error 431. Once I delete the cookies via browser dev tools, connection succeeds.
Expected behaviour
Configuration, logs, error output, etc.
Code of Conduct
The text was updated successfully, but these errors were encountered: