If a connection is aborted prior to authentication, then the only status variable that gets incremented is Aborted_connects. The Aborted_connects status variable gets incremented for a lot of reasons though, so there is no status variable that can be used to determine how many connections have gotten aborted prior to authentication.
You can reproduce this by doing something like using telnet to connect to the MariaDB port, and then killing the telnet process:
$ telnet 127.0.0.1 3306
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Y
5.5.5-10.1.38-MariaDB@TcxOay_?▒MFWbhc931>#4mysql_native_password^CConnection closed by foreign host
The only status variable that is incremented from this is Aborted_connects:
MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Aborted%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| Aborted_clients | 0 |
| Aborted_connects | 1 |
+------------------+-------+
2 rows in set (0.00 sec)
MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Access_denied%';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Access_denied_errors | 0 |
+----------------------+-------+
1 row in set (0.00 sec)
MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Connection_errors%';
+-----------------------------------+-------+
| Variable_name | Value |
+-----------------------------------+-------+
| Connection_errors_accept | 0 |
| Connection_errors_internal | 0 |
| Connection_errors_max_connections | 0 |
| Connection_errors_peer_address | 0 |
| Connection_errors_select | 0 |
| Connection_errors_tcpwrap | 0 |
+-----------------------------------+-------+
6 rows in set (0.00 sec)
Attachments
Issue Links
relates to
MDEV-19282Log more specific warning with log_warnings=2 if connection is aborted prior to authentication
Closed
MDEV-19469Connection timeout before Authentication does not show up as an error
Open
MDEV-19276If login fails when selecting a database, no warning is printed to the log with log_warnings=2
I do not think that we should change value and meaning of Aborted_connects , but just add new variable which will count aborted with no authentication additionally?
Oleksandr Byelkin
added a comment - I do not think that we should change value and meaning of Aborted_connects , but just add new variable which will count aborted with no authentication additionally?
What do you think about Aborted_connects_preauth? Aborted_nonauth_connects would work too though.
I agree with you about the behavior of Aborted_connects.
Geoff Montee (Inactive)
added a comment - What do you think about Aborted_connects_preauth? Aborted_nonauth_connects would work too though.
I agree with you about the behavior of Aborted_connects.
OK, the last question, does it matter if the connection closed with error or closed without an error?
The connection can be closed because of error (probably timeout belong here), because was killed or because actually connection closed, but we are only interested if it was closed unauthorized, correct?
Oleksandr Byelkin
added a comment - - edited OK, the last question, does it matter if the connection closed with error or closed without an error?
The connection can be closed because of error (probably timeout belong here), because was killed or because actually connection closed, but we are only interested if it was closed unauthorized, correct?
I don't think it should matter if the connection was closed with or without an error. I think this status variable should only be concerned with whether the connection was closed prior to performing authentication--regardless of whether an error was involved.
Geoff Montee (Inactive)
added a comment - I don't think it should matter if the connection was closed with or without an error. I think this status variable should only be concerned with whether the connection was closed prior to performing authentication--regardless of whether an error was involved.
Is Aborted_nonauth_connects a good name?