I had created a neo4j database, which was working perfectly.
But now, when i try to use the database created by me, using following command:
:USE foo;
it gives error:
Unable to get a routing table for database 'foo' because this database is unavailable
I tried checking the status of database using command :
SHOW DATABASE foo;
It shows the currentStatus of foo as "offline". I have tried starting the database using
START DATABASE foo;
but no luck!
Although, I can use default "neo4j" and "system" databases. Only the new database which I have created, dose not work now.
If someone knows the solution, please help.
I have finally managed to solve the issue. It was because of file permission of a file /var/lib/neo4j/data/transactions/foo/neostore.transaction.db.26
.
May be somehow the user neo4j lost access to this file. I looked into the debug log file, /var/log/neo4j/debug.log
and found exception message java.nio.file.AccessDeniedException: /var/lib/neo4j/data/transactions/foo/neostore.transaction.db.26
then I changed the file permission for neo4j user using command:
chown neo4j /var/lib/neo4j/data/transactions/foo//neostore.transaction.db.26
After this, i started the database and it worked