Apologies for my lack of knowledge, but I’m still new to Linux. I came in and our Librenms was not polling.
Validate.php says the DB schema is wrong and suggests the following:
- SET TIME_ZONE=’+00:00’;
- ALTER TABLE
notifications
CHANGEdatetime
datetime
timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:00’ ; - ALTER TABLE
users
CHANGEcreated_at
created_at
timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:01’ ;
I can restore the system to a point, but the issue is already started apparently. I can run ./poller-wrapper.py manually and it works, but shortly after the restore this issue crops up. After it does running ./poller-wrapper.py fails unless I add the <amount_of_workers> and even when I do it fails with the following:
2021-10-04 09:14:09,966 :: INFO :: Using pure python SQL client
2021-10-04 09:14:09,972 :: CRITICAL :: ERROR: Could not connect to MySQL database! Packet sequence number wrong - got 1 expected 0
Traceback (most recent call last):
File “./poller-wrapper.py”, line 57, in
wrapper.wrapper(
File “/opt/librenms/LibreNMS/wrapper.py”, line 463, in wrapper
db_connection = LibreNMS.DB(sconfig)
File “/opt/librenms/LibreNMS/init.py”, line 218, in init
self.connect()
File “/opt/librenms/LibreNMS/init.py”, line 249, in connect
conn = MySQLdb.connect(**args)
File “/usr/lib/python3/dist-packages/pymysql/init.py”, line 94, in Connect
return Connection(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pymysql/connections.py”, line 325, in init
self.connect()
File “/usr/lib/python3/dist-packages/pymysql/connections.py”, line 598, in connect
self._get_server_information()
File “/usr/lib/python3/dist-packages/pymysql/connections.py”, line 975, in _get_server_information
packet = self._read_packet()
File “/usr/lib/python3/dist-packages/pymysql/connections.py”, line 669, in _read_packet
raise err.InternalError(
pymysql.err.InternalError: Packet sequence number wrong - got 1 expected 0