Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-02-2020 02:22 PM
I am in the community version and have a main database using the default 'neo4j' name, and I created a test db with the name 'test.db' under the director data/databases/test.db/. The way I switch between these 2 databaes is by changing this line in the conf/neo4j.conf:
# The name of the default database
#dbms.default_database=neo4j
dbms.default_database=test.db
I can always safely switch to 'neo4j', but when I tried to switch back to 'test.db', in the browser, it fails, giving this message:
Database 'test.db' is unavailable. Run :sysinfo for more info.
The output of :sysinfo is:
Store Sizes
ID Allocation
Page Cache
Transactions
which is not helpful. In the 'use database' menu, it indeed displays 'test.db' as the default db.
However, if I delete the data/databases/test.db/ and recreate it, it works fine.
11-03-2020 02:10 AM
This by itself might not be enough information to spot what's going on. Check the output in your debug.log file (same directory as neo4j.log) and see what it has to say about starting that database when you switch.
11-04-2020 01:25 PM
After I switched to the test.db database and neo4j restart, the debug log gives this:
2020-11-04 21:19:54.047+0000 WARN [o.n.k.a.p.GlobalProcedures] Failed to load `org.apache.commons.logging.impl.Log4JLogger` from plugin jar `/Users/congminmin/applications/neo4j-community-4.0.4/plugins/apoc-4.0.0.13-all.jar`: org/apa che/log4j/Priority
1064 2020-11-04 21:19:54.048+0000 WARN [o.n.k.a.p.GlobalProcedures] Failed to load `org.apache.commons.logging.impl.LogKitLogger` from plugin jar `/Users/congminmin/applications/neo4j-community-4.0.4/plugins/apoc-4.0.0.13-all.jar`: org/ap ache/log/Logger
1065 2020-11-04 21:19:54.564+0000 INFO [o.n.d.d.DefaultDatabaseManager] Creating 'test.db' database.
1066 2020-11-04 21:19:54.565+0000 INFO [o.n.d.d.DefaultDatabaseManager] Starting 'test.db' database.
1067 2020-11-04 21:19:54.576+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] [test.db] Selected RecordFormat:StandardV4_0[SF4.0.0] record format from store /Users/congminmin/applications/neo4j-community-4.0.4/data/databases/test.db
1068 2020-11-04 21:19:54.577+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] [test.db] Selected format 'RecordFormat:StandardV4_0[SF4.0.0]' for existing store /Users/congminmin/applications/neo4j-community-4.0.4/data/databases/test.db with f ormat 'RecordFormat:StandardV4_0[SF4.0.0]'
1069 2020-11-04 21:19:55.014+0000 WARN [o.n.k.d.Database] [test.db] Exception occurred while starting the database. Trying to stop already started components. Mismatching store id. Store StoreId: StoreId{creationTime=1604523722822, random Id=8282328604263151428, storeVersion=3471765337752883975, upgradeTime=1604523722822, upgradeTxId=1}. Transaction log StoreId: StoreId{creationTime=1603510735432, randomId=-8572583176468044877, storeVersion=3471765337752883975, upgrad eTime=1603510735432, upgradeTxId=1}
1070 java.lang.RuntimeException: Mismatching store id. Store StoreId: StoreId{creationTime=1604523722822, randomId=8282328604263151428, storeVersion=3471765337752883975, upgradeTime=1604523722822, upgradeTxId=1}. Transaction log StoreId: StoreId{creationTime=1603510735432, randomId=-8572583176468044877, storeVersion=3471765337752883975, upgradeTime=1603510735432, upgradeTxId=1}
1071 at org.neo4j.kernel.recovery.Recovery.validateStoreId(Recovery.java:386)
1072 at org.neo4j.kernel.database.Database.start(Database.java:377)
1073 at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:187)
1074 at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:132)
1075 at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64)
1076 at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39)
1077 at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124)
1078 at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138)
1079 at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
1080 at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
1081 at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
1082 at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
1083 at org.neo4j.server.database.CommunityGraphFactory.newDatabaseManagementService(CommunityGraphFactory.java:36)
1084 at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
1085 at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
1086 at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
1087 at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
1088 at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
1089 at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
1090 at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
1091 2020-11-04 21:19:55.015+0000 ERROR [o.n.d.d.DefaultDatabaseManager] Failed to start database: test.db An error occurred! Unable to start database with name `test.db`.
1092 org.neo4j.dbms.api.DatabaseManagementException: An error occurred! Unable to start database with name `test.db`.
1093 at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:191)
1094 at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:132)
1095 at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64)
1096 at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39)
1097 at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124)
1098 at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138)
1099 at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
1100 at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
1101 at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
1102 at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
1103 at org.neo4j.server.database.CommunityGraphFactory.newDatabaseManagementService(CommunityGraphFactory.java:36)
1104 at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
1105 at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
1106 at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
1107 at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
1108 at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
1109 at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
1110 at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
1111 Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Mismatching store id. Store StoreId: StoreId{creationTime=1604523722822, randomId=8282328604263151428, storeVersion=3471765337752883975, upgradeTime=1604523722822, up gradeTxId=1}. Transaction log StoreId: StoreId{creationTime=1603510735432, randomId=-8572583176468044877, storeVersion=3471765337752883975, upgradeTime=1603510735432, upgradeTxId=1}
1112 at org.neo4j.kernel.database.Database.start(Database.java:478)
1113 at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:187)
1114 ... 17 more
1115 Caused by: java.lang.RuntimeException: Mismatching store id. Store StoreId: StoreId{creationTime=1604523722822, randomId=8282328604263151428, storeVersion=3471765337752883975, upgradeTime=1604523722822, upgradeTxId=1}. Transaction lo g StoreId: StoreId{creationTime=1603510735432, randomId=-8572583176468044877, storeVersion=3471765337752883975, upgradeTime=1603510735432, upgradeTxId=1}
1116 at org.neo4j.kernel.recovery.Recovery.validateStoreId(Recovery.java:386)
1117 at org.neo4j.kernel.database.Database.start(Database.java:377)
1118 ... 18 more
1119 2020-11-04 21:20:00.084+0000 INFO [o.n.b.BoltServer] Bolt enabled on 0.0.0.0:7687.
1120 2020-11-04 21:20:00.098+0000 INFO [o.n.s.AbstractNeoServer$ServerComponentsLifecycleAdapter] [system] Starting web server
1121 2020-11-04 21:20:00.718+0000 INFO [o.n.s.AbstractNeoServer$ServerComponentsLifecycleAdapter] [system] Web server started.
~
~
~
~
While neo4j.log shows it's fine:
1 2020-11-04 21:19:41.638+0000 WARN The 'dbms.security.procedures.unrestricted' setting is overridden. Setting value changed from 'gbs.*' to 'gds.*,apoc.*'.
2 2020-11-04 21:19:41.641+0000 INFO Note that since you did not explicitly set the port in dbms.connector.bolt.advertised_address Neo4j automatically set it to 7687 to match dbms.connector.bolt.listen_address. This beh avior may change in the future and we recommend you to explicitly set it.
3 2020-11-04 21:19:41.644+0000 INFO ======== Neo4j 4.0.4 ========
4 2020-11-04 21:19:41.646+0000 INFO Starting...
5 2020-11-04 21:20:00.084+0000 INFO Bolt enabled on 0.0.0.0:7687.
6 2020-11-04 21:20:00.084+0000 INFO Started.
7 2020-11-04 21:20:00.717+0000 INFO Remote interface available at http://localhost:7474/
11-12-2020 10:00 AM
Neo4j Team: Have you seen similar errors reported before? The error message is above. This happens when I switch between two databases by changing the configuration entry:
#dbms.default_database=neo4j
dbms.default_database=test.db
I haven't found the exact reason for this. After switching, the database is up, and I created a new graph in it. Everything is fine. However, if I stop it and want to restart it, this error occurs. I use:
bin/neo4j start|restart|stop
to control the db.
My db version is 4.0.4 and on MacPro.
All the sessions of the conference are now available online