RuntimeError: (2013, 'Lost connection to MySQL

OceanBase社区版 kill -9 obsever后 重启集群遇到以下问题

[ERROR] [ERROR] oceanbase-ce-py_script_display-3.1.0 RuntimeError: (2013, ‘Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)’)

[2021-06-09 10:14:25] [63469308-c8c8-11eb-9923-00163e0edaa7] [DEBUG] Traceback (most recent call last):

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 732, in _read_bytes

data = self._rfile.read(num_bytes)

File “socket.py”, line 586, in readinto

ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “core.py”, line 878, in start_cluster

File “_plugin.py”, line 233, in __call__

File “_plugin.py”, line 207, in _new_func

File “/root/.obd/plugins/oceanbase-ce/3.1.0/display.py”, line 43, in display

raise e

File “/root/.obd/plugins/oceanbase-ce/3.1.0/display.py”, line 34, in display

cursor.execute(‘select * from oceanbase.__all_server’)

File “/usr/obd/lib/site-packages/pymysql/cursors.py”, line 148, in execute

result = self._query(query)

File “/usr/obd/lib/site-packages/pymysql/cursors.py”, line 310, in _query

conn.query(q)

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 548, in query

self._affected_rows = self._read_query_result(unbuffered=unbuffered)

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 775, in _read_query_result

result.read()

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 1156, in read

first_packet = self.connection._read_packet()

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 692, in _read_packet

packet_header = self._read_bytes(4)

File “/usr/obd/lib/site-packages/pymysql/connections.py”, line 740, in _read_bytes

“Lost connection to MySQL server during query (%s)” % (e,),

pymysql.err.OperationalError: (2013, ‘Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)’)

你可能碰到了这个问题:https://www.oceanbase.com/community/answer/detail?id=276,可以参考其中的解决方案。