The error message you are encountering, "Caused by: java.lang.RuntimeException: Transaction logs are missing and recovery is not possible" indicates that the Neo4j database is unable to perform recovery due to missing transaction logs. Recovery is a process that ensures the database is in a consistent state after a crash or unexpected shutdown.
To resolve this issue, you can follow these steps:
- Restore from Backup: If you have a recent backup of the database, you can use it to restore the database to a known consistent state. Make sure to follow the proper backup and restore procedures.
- Check Transaction Log Files: Verify if there are any transaction log files (known as "neostore.transaction.db") available under the
/data/transactions/<databaseName>/directory. These log files are crucial for database recovery. If you have the required log files, you can attempt to restart the Neo4j services and see if the dbms can recover from these transaction logs.
- If Transaction log files are not present and you do not have a backup: In case you don't have the transaction log files and you do not have a healthy backup available then you can set the below configuration in neo4j.conf available under
<NEO4J_HOME>/conf/and restart the Neo4j services.
Once the database is up and running make sure that you remove the config from neo4j.conf and do a restart of the instance.