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

[defect]: unhandled MySQL timeout #5417

Open
majagw opened this issue Sep 4, 2024 · 0 comments
Open

[defect]: unhandled MySQL timeout #5417

majagw opened this issue Sep 4, 2024 · 0 comments
Labels
defect category: a defect or misbehaviour

Comments

@majagw
Copy link

majagw commented Sep 4, 2024

What type of defect/bug is this?

Unexpected behaviour (obvious or verified by project member)

How can the issue be reproduced?

On FR 3.2.6 and mysqld 8.0.39 (Ubuntu 24.04) I observe
ERROR: rlm_sql_mysql: ERROR 4031 (The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.)

it happens when MySQL wait_timeout and interactive_timeout is over

While digging for the reason I stumbled upon the information that there is a new return code in MySQL 8 for connection timeout, it is ER_CLIENT_INTERACTION_TIMEOUT. This code isn't handled in FR yet.

I've added it to src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c
in sql_check_error and it seems to cure the problem

@@ -385,6 +385,7 @@
if (sql_errno > 0) switch (sql_errno) {
case CR_SERVER_GONE_ERROR:
case CR_SERVER_LOST:

  • case ER_CLIENT_INTERACTION_TIMEOUT:
    case -1:
    return RLM_SQL_RECONNECT;

Log output from the FreeRADIUS daemon

ERROR: rlm_sql_mysql: ERROR 4031 (The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.)

Relevant log output from client utilities

No response

Backtrace from LLDB or GDB

No response

@majagw majagw added the defect category: a defect or misbehaviour label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect category: a defect or misbehaviour
Projects
None yet
Development

No branches or pull requests

1 participant