2022-12-15 03:49:53 |
Chengen Du |
bug |
|
|
added bug |
2022-12-15 10:02:33 |
Chengen Du |
nominated for series |
|
Ubuntu Lunar |
|
2022-12-15 10:02:33 |
Chengen Du |
bug task added |
|
net-snmp (Ubuntu Lunar) |
|
2022-12-15 10:02:33 |
Chengen Du |
nominated for series |
|
Ubuntu Jammy |
|
2022-12-15 10:02:33 |
Chengen Du |
bug task added |
|
net-snmp (Ubuntu Jammy) |
|
2022-12-15 10:02:33 |
Chengen Du |
nominated for series |
|
Ubuntu Focal |
|
2022-12-15 10:02:33 |
Chengen Du |
bug task added |
|
net-snmp (Ubuntu Focal) |
|
2022-12-15 10:02:33 |
Chengen Du |
nominated for series |
|
Ubuntu Kinetic |
|
2022-12-15 10:02:33 |
Chengen Du |
bug task added |
|
net-snmp (Ubuntu Kinetic) |
|
2022-12-15 10:02:33 |
Chengen Du |
nominated for series |
|
Ubuntu Bionic |
|
2022-12-15 10:02:33 |
Chengen Du |
bug task added |
|
net-snmp (Ubuntu Bionic) |
|
2022-12-15 10:02:45 |
Chengen Du |
net-snmp (Ubuntu Bionic): assignee |
|
ChengEn, Du (chengendu) |
|
2022-12-15 10:02:48 |
Chengen Du |
net-snmp (Ubuntu Focal): assignee |
|
ChengEn, Du (chengendu) |
|
2022-12-15 10:02:57 |
Chengen Du |
net-snmp (Ubuntu Jammy): assignee |
|
ChengEn, Du (chengendu) |
|
2022-12-15 10:03:01 |
Chengen Du |
net-snmp (Ubuntu Kinetic): assignee |
|
ChengEn, Du (chengendu) |
|
2022-12-15 10:03:05 |
Chengen Du |
net-snmp (Ubuntu Lunar): assignee |
|
ChengEn, Du (chengendu) |
|
2022-12-15 10:04:31 |
Chengen Du |
tags |
|
sts |
|
2022-12-15 10:14:31 |
Chengen Du |
attachment added |
|
bionic_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5635717/+files/bionic_snmptrapd_mysql_reconnection.debdiff |
|
2022-12-15 10:15:07 |
Chengen Du |
attachment added |
|
focal_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5635718/+files/focal_snmptrapd_mysql_reconnection.debdiff |
|
2022-12-15 10:15:41 |
Chengen Du |
attachment added |
|
jammy_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5635719/+files/jammy_snmptrapd_mysql_reconnection.debdiff |
|
2022-12-15 10:16:57 |
Chengen Du |
attachment added |
|
kinetic_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5635720/+files/kinetic_snmptrapd_mysql_reconnection.debdiff |
|
2022-12-15 10:17:27 |
Chengen Du |
attachment added |
|
lunar_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5635721/+files/lunar_snmptrapd_mysql_reconnection.debdiff |
|
2022-12-15 10:18:50 |
Chengen Du |
net-snmp (Ubuntu Bionic): status |
New |
In Progress |
|
2022-12-15 10:18:55 |
Chengen Du |
net-snmp (Ubuntu Focal): status |
New |
In Progress |
|
2022-12-15 10:18:58 |
Chengen Du |
net-snmp (Ubuntu Jammy): status |
New |
In Progress |
|
2022-12-15 10:19:02 |
Chengen Du |
net-snmp (Ubuntu Kinetic): status |
New |
In Progress |
|
2022-12-15 10:19:06 |
Chengen Du |
net-snmp (Ubuntu Lunar): status |
New |
In Progress |
|
2022-12-15 10:24:48 |
Chengen Du |
tags |
sts |
bionic focal jammy kinetic lunar sts |
|
2022-12-15 12:24:49 |
Ubuntu Foundations Team Bug Bot |
tags |
bionic focal jammy kinetic lunar sts |
bionic focal jammy kinetic lunar patch sts |
|
2022-12-15 12:24:55 |
Ubuntu Foundations Team Bug Bot |
bug |
|
|
added subscriber Ubuntu Sponsors Team |
2023-01-10 01:13:50 |
Chengen Du |
tags |
bionic focal jammy kinetic lunar patch sts |
bionic focal jammy kinetic lunar patch sts sts-sponsor |
|
2023-01-11 20:01:30 |
Sergio Durigan Junior |
bug |
|
|
added subscriber Ubuntu Server |
2023-01-12 12:36:49 |
Mauricio Faria de Oliveira |
removed subscriber Ubuntu Sponsors Team |
|
|
|
2023-01-12 12:36:57 |
Mauricio Faria de Oliveira |
bug |
|
|
added subscriber SE SRU ("STS") Sponsors |
2023-01-12 12:37:08 |
Mauricio Faria de Oliveira |
tags |
bionic focal jammy kinetic lunar patch sts sts-sponsor |
bionic focal jammy kinetic lunar patch sts |
|
2023-02-07 09:26:26 |
Dariusz Gadomski |
tags |
bionic focal jammy kinetic lunar patch sts |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts |
|
2023-02-14 12:36:09 |
Dariusz Gadomski |
bug |
|
|
added subscriber Ubuntu Sponsors Team |
2023-02-17 06:00:13 |
Chengen Du |
attachment added |
|
bionic_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5647951/+files/bionic_snmptrapd_mysql_reconnection.debdiff |
|
2023-02-17 06:01:13 |
Chengen Du |
attachment added |
|
focal_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5647952/+files/focal_snmptrapd_mysql_reconnection.debdiff |
|
2023-02-17 06:01:56 |
Chengen Du |
attachment added |
|
jammy_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5647953/+files/jammy_snmptrapd_mysql_reconnection.debdiff |
|
2023-02-17 06:02:37 |
Chengen Du |
attachment added |
|
kinetic_snmptrapd_mysql_reconnection.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5647954/+files/kinetic_snmptrapd_mysql_reconnection.debdiff |
|
2023-02-17 06:04:38 |
Chengen Du |
attachment added |
|
lunar_snmptrapd_mysql_reconnection_build_error.debdiff https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1999711/+attachment/5647956/+files/lunar_snmptrapd_mysql_reconnection_build_error.debdiff |
|
2023-02-22 19:14:30 |
Andreas Hasenack |
bug |
|
|
added subscriber Andreas Hasenack |
2023-02-28 01:05:55 |
Launchpad Janitor |
net-snmp (Ubuntu Lunar): status |
In Progress |
Fix Released |
|
2023-03-02 16:26:59 |
Dariusz Gadomski |
bug |
|
|
added subscriber Dariusz Gadomski |
2023-03-10 02:30:16 |
Chengen Du |
description |
[Impact]
wait_timeout is the number of seconds the MySQL server waits for activity before closing the connection.
MySQL v8.0.24 writes the reason for the connection before closing it, and the client receives a more informative error message (ER_CLIENT_INTERACTION_TIMEOUT).
Snmptrapd does not handle this error code, so the connection will not reconnect to the MySQL server afterward.
[Test Plan]
1. Setup MySQL server and modify wait_timeout to 15 in /etc/MySQL/mysql.conf.d/mysqld.cnf
2. Setup snmptrapd and execute snmptrap command
3. Sleep 15 seconds and re-execute snmptrap command, then the connection will fail until the snmptrapd service restarted
[Where problems could occur]
Once the error happens, snmptrapd will keep the sql commands and resend it after reconnecting to the MySQL server.
The regression can be considered as low.
[Other Info] |
[Impact]
wait_timeout is the number of seconds the MySQL server waits for activity before closing the connection.
MySQL v8.0.24 writes the reason for the connection before closing it, and the client receives a more informative error message (ER_CLIENT_INTERACTION_TIMEOUT).
Snmptrapd does not handle this error code, so the connection will not reconnect to the MySQL server afterward.
[Test Plan]
1. Launch 2 VMs (1 for MySQL Server, 1 for snmptrapd client in focal)
2. Prepare the MySQL server
2-1. Installed mysql-server
# sudo apt install mysql-server
2-2. Configured it to require a root password
# systemctl stop mysql
# sudo systemctl set-environment MYSQLD_OPTS="--skip-networking --skip-grant-tables"
# sudo systemctl start mysql.service
# sudo mysql -u root
# mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
# mysql> USE mysql
Database changed
# mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'the-new-password';
Query OK, 0 rows affected (0.01 sec)
# mysql> quit;
# sudo systemctl unset-environment MYSQLD_OPTS
# sudo systemctl revert mysql
# sudo killall -u mysql
# sudo systemctl restart mysql.service
3. Connected to mysql and created the necessary user / database / tables for snmptrapd to work
# mysql -u root -p
# mysql> create database net_snmp;
Query OK, 1 row affected (0.02 sec)
# mysql> create user 'remotesnmp'@'%' identified by 'password';
Query OK, 0 rows affected (0.02 sec)
# mysql> grant all privileges on net_snmp.* to 'remotesnmp'@'%';
Query OK, 0 rows affected (0.15 sec)
# mysql> USE net_snmp;
Database changed
# mysql> DROP TABLE IF EXISTS notifications;
Query OK, 0 rows affected, 1 warning (0.01 sec)
# mysql> CREATE TABLE IF NOT EXISTS `notifications` (
# -> `trap_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
# -> `date_time` datetime NOT NULL,
# -> `host` varchar(255) NOT NULL,
# -> `auth` varchar(255) NOT NULL,
# -> `type`
# -> ENUM('get','getnext','response','set','trap','getbulk','inform','trap2','report') NOT NULL,
# -> `version` ENUM('v1','v2c', 'unsupported(v2u)','v3') NOT NULL,
# -> `request_id` int(11) unsigned NOT NULL,
# -> `snmpTrapOID` varchar(1024) NOT NULL,
# -> `transport` varchar(255) NOT NULL,
# -> `security_model` ENUM('snmpV1','snmpV2c','USM') NOT NULL,
# -> `v3msgid` int(11) unsigned,
# -> `v3security_level` ENUM('noAuthNoPriv','authNoPriv','authPriv'),
# -> `v3context_name` varchar(32),
# -> `v3context_engine` varchar(64),
# -> `v3security_name` varchar(32),
# -> `v3security_engine` varchar(64),
# -> PRIMARY KEY (`trap_id`)
# -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected, 3 warnings (0.04 sec)
# mysql> DROP TABLE IF EXISTS varbinds;
Query OK, 0 rows affected, 1 warning (0.00 sec)
# mysql> CREATE TABLE IF NOT EXISTS `varbinds` (
# -> `trap_id` int(11) unsigned NOT NULL default '0',
# -> `oid` varchar(1024) NOT NULL,
# -> `type` ENUM('boolean','integer','bit','octet','null','oid','ipaddress','counter','unsigned','timeticks','opaque','unused1','counter64','unused2') NOT NULL,
# -> `value` blob NOT NULL,
# -> KEY `trap_id` (`trap_id`)
# -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected, 1 warning (0.05 sec)
# mysql> exit
Bye
4. Edit the mysqld configuration file to let it bind to all network interfaces and also set wait_timeout:
# vi /etc/mysql/mysql.conf.d/mysqld.cnf
...
[mysqld]
#
# * Basic Settings
#
user = mysql
# pid-file = /var/run/mysqld/mysqld.pid
# socket = /var/run/mysqld/mysqld.sock
# port = 3306
# datadir = /var/lib/mysql
wait_timeout = 660
...
# systemctl restart mysql.service
5. Connect to the database and set the wait_timeout and interactive_timeout:
# mysql -u root -p
# mysql> SET interactive_timeout=660;
Query OK, 0 rows affected (0.00 sec)
# mysql> SET wait_timeout=660;
Query OK, 0 rows affected (0.00 sec)
# mysql> SHOW VARIABLES LIKE "%wait%";
+---------------------------------------------------+----------+
| Variable_name | Value |
+---------------------------------------------------+----------+
| innodb_lock_wait_timeout | 50 |
| innodb_log_wait_for_flush_spin_hwm | 400 |
| innodb_spin_wait_delay | 6 |
| innodb_spin_wait_pause_multiplier | 50 |
| lock_wait_timeout | 31536000 |
| mysqlx_wait_timeout | 28800 |
| performance_schema_events_waits_history_long_size | 10000 |
| performance_schema_events_waits_history_size | 10 |
| wait_timeout | 660 |
+---------------------------------------------------+----------+
9 rows in set (0.01 sec)
# mysql> quit
Bye
6. Prepare the snmptrapd clients:
6-1. Install the snmptrapd, mysql client:
# sudo apt-get install snmp snmpd snmptrapd snmp-mibs-downloader mysql-client-core-8.0
6-2.. Edit the client configuration file
# cat /etc/mysql/conf.d/mysql.cnf
[mysql]
user=remotesnmp
password=password
host=XXX.XX.XX.XXX
6-3. Test that you can connect to the database:
# mysql> use net_snmp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
# mysql> show tables;
+--------------------+
| Tables_in_net_snmp |
+--------------------+
| notifications |
| varbinds |
+--------------------+
2 rows in set (0.01 sec)
6-4. Setup the snmptrapd mysql credentials and add the wait_timeout:
# cat /etc/mysql/conf.d/snmptrapd.cnf
[snmptrapd]
user=remotesnmp
password=password
host=XXX.XX.XX.XXX
wait_timeout=660
7. Configure snmptrapd
# cat /etc/snmp/snmptrapd.conf
disableAuthorization yes
authCommunity log mytrapcommunity
traphandle default /usr/bin/logger
sqlMaxQueue 1
sqlSaveInterval 9
# sudo systemctl restart snmptrapd.service
8. Send a trap / sleep 660 / try to send a couple more traps:
We'll observe that trap 1 works, trap 2 and 3 fails with SQL Error 4031 (HY000): The client was disconnected by the server because of inactivity.
The problem will persist until we restart snmptrapd.
[Where problems could occur]
Once the error happens, snmptrapd will keep the sql commands and resend it after reconnecting to the MySQL server.
The regression can be considered as low.
[Other Info] |
|
2023-03-10 22:53:28 |
Steve Langasek |
net-snmp (Ubuntu Kinetic): status |
In Progress |
Fix Committed |
|
2023-03-10 22:53:30 |
Steve Langasek |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-03-10 22:53:31 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2023-03-10 22:53:35 |
Steve Langasek |
tags |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-kinetic |
|
2023-03-10 22:55:52 |
Steve Langasek |
net-snmp (Ubuntu Bionic): status |
In Progress |
Incomplete |
|
2023-03-10 22:56:21 |
Steve Langasek |
net-snmp (Ubuntu Jammy): status |
In Progress |
Fix Committed |
|
2023-03-10 22:56:27 |
Steve Langasek |
tags |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-kinetic |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-jammy verification-needed-kinetic |
|
2023-03-10 22:57:09 |
Steve Langasek |
net-snmp (Ubuntu Focal): status |
In Progress |
Fix Committed |
|
2023-03-10 22:57:16 |
Steve Langasek |
tags |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-jammy verification-needed-kinetic |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic |
|
2023-03-13 02:28:21 |
Chengen Du |
tags |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-done-focal verification-done-jammy verification-done-kinetic verification-needed |
|
2023-03-20 17:39:14 |
Launchpad Janitor |
net-snmp (Ubuntu Kinetic): status |
Fix Committed |
Fix Released |
|
2023-03-20 17:39:19 |
Ćukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2023-03-21 22:02:06 |
Launchpad Janitor |
net-snmp (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|
2023-03-22 07:51:50 |
Dariusz Gadomski |
tags |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-done-focal verification-done-jammy verification-done-kinetic verification-needed |
bionic focal jammy kinetic lunar patch se-sponsor-dgadomski sts verification-done verification-done-focal verification-done-jammy verification-done-kinetic |
|
2023-03-23 17:52:26 |
Launchpad Janitor |
net-snmp (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2023-03-28 10:22:02 |
Dariusz Gadomski |
bug task deleted |
net-snmp (Ubuntu Bionic) |
|
|