Open ohange opened 6 years ago
I think it would be far better to find why MariaDB exit ;)
Agreed, but this seems rather generic of a db corruption, which could be a matter of a power interruption, and likely not application related. (I could be wrong though!)
Here is the head of error.log for mysql. (I figure the first error is likely most important).
2018-07-11 21:10:10 1564472128 [ERROR] InnoDB: Space id and page n:o stored in the page read in are 4294967295:4294967295, should be 40:683!
2018-07-11 21:10:10 5d3ff340 InnoDB: Error: page 4294967295 log sequence number 18446744073709551615
InnoDB: is in the future! Current system log sequence number 5237477110.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2018-07-11 21:10:10 1564472128 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace flightairmap/aircraft_owner page [page id: space=40, page number=683]. You may have to recover from a backup.
2018-07-11 21:10:10 5d3ff340 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
True, this seems in really bad state... To install a new DB for FlightAirMap, you need to have a working MariaDB server (you may try to run mysqld_safe and remove the FAM DB, else if you only have FlightAirMap DB on your MariaDB, remove anything in /var/lib/mysql), then create FAM DB and user and run the install script again, if no table exists, they will be created.
Installation: Pi3, Raspibian Stretch, separate Pi from FlightAware receiver (using PiAware 3.5.3)
When I went to the IP of FAM, it loads but shows 0 aircraft. I thought that was odd, so I started poking around. Rebooted. Noticed this repeating pattern in /var/log/daemon.log:
Starting MariaDB database server... mariadb.service: Main process exited, code=killed, status=6/ABRT
Looking in var/log/mysql, I see a 7GB error.log file where this thing has been wedged for a few days and is generating tons of error output.
It's probably easier to reinstall a blank database than recover, and the installation is new enough that the value of the historical info is not really significant.
What's the best approach to take to lay down a fresh db and get FAM up and running again?