r/openstack • • Dec 12 '24

Nova Mariadb Connection Error

Whenever I try to create a instance in Nova it's stuck in build and the nova service disconnects from mariadb for some time, here are the logs

     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-12-12 11:13:48 IST; 1h 23min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 3247212 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 569 (limit: 2040014)
     Memory: 399.1M
        CPU: 1min 43.298s
     CGroup: /system.slice/mariadb.service
             └─3247212 /usr/sbin/mariadbd

Dec 12 12:36:26 alpha mariadbd[3247212]: 2024-12-12 12:36:26 2138 [Warning] Aborted connection 2138 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:34 alpha mariadbd[3247212]: 2024-12-12 12:36:34 2131 [Warning] Aborted connection 2131 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:34 alpha mariadbd[3247212]: 2024-12-12 12:36:34 2132 [Warning] Aborted connection 2132 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:34 alpha mariadbd[3247212]: 2024-12-12 12:36:34 2130 [Warning] Aborted connection 2130 to db: 'nova_cell0' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:35 alpha mariadbd[3247212]: 2024-12-12 12:36:35 2142 [Warning] Aborted connection 2142 to db: 'nova_cell0' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:37 alpha mariadbd[3247212]: 2024-12-12 12:36:37 2145 [Warning] Aborted connection 2145 to db: 'nova_cell0' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:37 alpha mariadbd[3247212]: 2024-12-12 12:36:37 2146 [Warning] Aborted connection 2146 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:37 alpha mariadbd[3247212]: 2024-12-12 12:36:37 2147 [Warning] Aborted connection 2147 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:37 alpha mariadbd[3247212]: 2024-12-12 12:36:37 2148 [Warning] Aborted connection 2148 to db: 'nova_cell0' user: 'nova' host: 'alpha' (Got an error reading communication packets)
Dec 12 12:36:37 alpha mariadbd[3247212]: 2024-12-12 12:36:37 2149 [Warning] Aborted connection 2149 to db: 'nova' user: 'nova' host: 'alpha' (Got an error reading communication packets) 

Nova-Scheduler logs

2024-12-12 10:32:30.741 3196626 ERROR nova.servicegroup.drivers.db [-] Unexpected error while reporting service status: oslo_db.exception.DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2024-12-12 10:32:30.741 3196626 ERROR nova.servicegroup.drivers.db Traceback (most recent call last):
2024-12-12 10:32:30.741 3196626 ERROR nova.servicegroup.drivers.db   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_po^C
root@alpha:~# tail -f /var/log/nova/nova-scheduler.log
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1156, in read
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines     first_packet = self.connection._read_packet()
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 692, in _read_packet
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines     packet_header = self._read_bytes(4)
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 748, in _read_bytes
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines     raise err.OperationalError(
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines oslo_db.exception.DBConnectionError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines [SQL: SELECT 1]
2024-12-12 12:36:22.374 3276257 ERROR oslo_db.sqlalchemy.engines (Background on this error at: https://sqlalche.me/e/14/e3q8)
2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/baitman_007 Dec 14 '24

I solved this by rolling back mariadb version.