neo4j-devtools / neo4j-desktop

The Neo4j Graph Platform, on your desktop OS.
19 stars 1 forks source link

Starting database fails with neo4j version > 4, uncaught in promise: undefined #88

Closed ed42311 closed 4 years ago

ed42311 commented 4 years ago

Recently updated from 1.2.?

Environment:

Screen Shot 2020-07-09 at 2 09 57 PM Screen Shot 2020-07-09 at 2 10 10 PM

Expected

Can start a graph instance locally with neo4j version greater than 4

Actual

Fails with error ( tested with a project that already exists )

Screen Shot 2020-07-09 at 11 25 23 AM

Fails with error ( tested with neo4j 4.1.0 in new project )

Screen Shot 2020-07-09 at 2 16 41 PM

Works in cases

ed42311 commented 4 years ago

from logs:

2020-07-09 20:19:46.228+0000 INFO  Starting...
2020-07-09 20:19:58.708+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@4d7a64ca' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@4d7a64ca' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@4d7a64ca' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
    at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:164)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
    at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@4d7a64ca' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
    ... 3 more
Caused by: java.lang.RuntimeException: Error starting database server at /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases
    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:167)
    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
    at com.neo4j.server.database.EnterpriseGraphFactory.newDatabaseManagementService(EnterpriseGraphFactory.java:38)
    at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.LockerLifecycleAdapter@57c03d88' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
    ... 9 more
Caused by: org.neo4j.kernel.internal.locker.FileLockException: Lock file has been locked by another process: /Users/contextcue/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-d64cb035-684d-472a-827a-1d783bff94e4/installation-4.0.4/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
    at org.neo4j.kernel.internal.locker.Locker.storeLockException(Locker.java:176)
    at org.neo4j.kernel.internal.locker.Locker.checkLock(Locker.java:96)
    at org.neo4j.kernel.internal.locker.GlobalFileLocker.checkLock(GlobalFileLocker.java:58)
    at org.neo4j.kernel.internal.locker.GlobalLocker.checkLock(GlobalLocker.java:28)
    at org.neo4j.kernel.internal.locker.LockerLifecycleAdapter.start(LockerLifecycleAdapter.java:36)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    ... 11 more
2020-07-09 20:19:58.708+

deleted store_lock and retry

Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'Server[backup-server]' was successfully initialized, but failed to start. Please see the attached cause exception "Address already in use".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
    ... 9 more
Caused by: java.net.BindException: Address already in use
    at java.base/sun.nio.ch.Net.bind0(Native Method)
    at java.base/sun.nio.ch.Net.bind(Net.java:455)
    at java.base/sun.nio.ch.Net.bind(Net.java:447)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
    at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
    at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
    at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
ed42311 commented 4 years ago

ps -e | grep neo4j

searched for neo4j processes and kill ed them

restarted neo4j desktop

thanks @johnymontana

nglgzz commented 4 years ago

@ed42311 from the error and logs it looks like the Neo4j process is already running when Desktop is started, as you mentioned searching for the running process and stopping it should fix this. Another way would be to run ./bin/neo4j stop from the DBMS directory (provided you know which one is running).

Closing this as it seems solved, but feel free to add a comment if it's not.