当前位置:   article > 正文

Neo4j启动失败ERROR Failed to start Neo4j on localhost:7474.java.lang.RuntimeException: Error starting N_neo4j启动不了

neo4j启动不了

错误信息:

  1. (base) usr@MacBook-Air ~ % sudo neo4j console
  2. Password:
  3. Directories in use:
  4. home: /opt/homebrew/Cellar/neo4j/5.18.1/libexec
  5. config: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/conf
  6. logs: /opt/homebrew/var/log/neo4j
  7. plugins: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/plugins
  8. import: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/import
  9. data: /opt/homebrew/var/neo4j/data
  10. certificates: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/certificates
  11. licenses: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/licenses
  12. run: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/run
  13. Starting Neo4j.
  14. 2024-03-24 06:18:20.098+0000 INFO Logging config in use: File '/opt/homebrew/Cellar/neo4j/5.18.1/libexec/conf/user-logs.xml'
  15. 2024-03-24 06:18:20.104+0000 INFO Starting...
  16. 2024-03-24 06:18:21.167+0000 INFO This instance is ServerId{38d38472} (38d38472-ceec-4589-bbf6-88df46eb87a2)
  17. 2024-03-24 06:18:21.516+0000 INFO ======== Neo4j 5.18.1 ========
  18. 2024-03-24 06:18:28.567+0000 ERROR Failed to start Neo4j on localhost:7474.
  19. java.lang.RuntimeException: Error starting Neo4j database server at /opt/homebrew/var/neo4j/data/databases
  20. at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:276) ~[neo4j-5.18.1.jar:5.18.1]
  21. at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:211) ~[neo4j-5.18.1.jar:5.18.1]
  22. at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:38) ~[neo4j-5.18.1.jar:5.18.1]
  23. at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:184) [neo4j-5.18.1.jar:5.18.1]
  24. at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:99) [neo4j-5.18.1.jar:5.18.1]
  25. at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:30) [neo4j-5.18.1.jar:5.18.1]
  26. Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.bolt.protocol.common.connector.netty.SocketNettyConnector@1a06ec24' was successfully initialized, but failed to start. Please see the attached cause exception "bind(..) failed: Address already in use".
  27. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:364) ~[neo4j-common-5.18.1.jar:5.18.1]
  28. at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.18.1.jar:5.18.1]
  29. at org.neo4j.bolt.BoltServer.start(BoltServer.java:354) ~[neo4j-bolt-5.18.1.jar:5.18.1]
  30. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.18.1.jar:5.18.1]
  31. at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.18.1.jar:5.18.1]
  32. at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:267) ~[neo4j-5.18.1.jar:5.18.1]
  33. ... 5 more
  34. Caused by: org.neo4j.configuration.helpers.PortBindException: An error occurred while trying to bind to the socket localhost/127.0.0.1:7687
  35. at org.neo4j.bolt.protocol.common.connector.netty.AbstractNettyConnector.start(AbstractNettyConnector.java:199) ~[neo4j-bolt-5.18.1.jar:5.18.1]
  36. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.18.1.jar:5.18.1]
  37. at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.18.1.jar:5.18.1]
  38. at org.neo4j.bolt.BoltServer.start(BoltServer.java:354) ~[neo4j-bolt-5.18.1.jar:5.18.1]
  39. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.18.1.jar:5.18.1]
  40. at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.18.1.jar:5.18.1]
  41. at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:267) ~[neo4j-5.18.1.jar:5.18.1]
  42. ... 5 more
  43. Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
  44. 2024-03-24 06:18:28.570+0000 INFO Neo4j Server shutdown initiated by request
  45. 2024-03-24 06:18:28.571+0000 INFO Stopped.
  46. Neo4j web server failed to start. See log for more info.
  47. Run with '--verbose' for a more detailed error message.

解决办法:

找了很多国内外的经验贴,有说权限不够加sudo的,也有说把/labs目录下的apoc-5.18.1-core.jar移动到/plugins目录下的(Facing Issue while installing 5.15 apoc - Desktop - Neo4j Online Community),但对我来说都没有用

最终的原因是端口7474已经有一个进程在运行了,把这个进程kill掉就可以了(Database failed to start, exited with status 'KILLED" - `Caused by: ... bind(..) failed: Address already in use` - Desktop - Neo4j Online Community

  1. (base) usr@MacBook-Air ~ % lsof -i :7474
  2. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
  3. Code\x20H 67013 usr 118u IPv4 0x88e6dff3e36ec84b 0t0 TCP localhost:7474 (LISTEN)
  4. (base) usr@MacBook-Air ~ % kill 67013
  5. (base) usr@MacBook-Air ~ % lsof -i :7474
  6. (base) usr@MacBook-Air ~ % sudo neo4j console
  7. Directories in use:
  8. home: /opt/homebrew/Cellar/neo4j/5.18.1/libexec
  9. config: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/conf
  10. logs: /opt/homebrew/var/log/neo4j
  11. plugins: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/plugins
  12. import: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/import
  13. data: /opt/homebrew/var/neo4j/data
  14. certificates: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/certificates
  15. licenses: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/licenses
  16. run: /opt/homebrew/Cellar/neo4j/5.18.1/libexec/run
  17. Starting Neo4j.
  18. 2024-03-24 06:22:05.901+0000 INFO Logging config in use: File '/opt/homebrew/Cellar/neo4j/5.18.1/libexec/conf/user-logs.xml'
  19. 2024-03-24 06:22:05.907+0000 INFO Starting...
  20. 2024-03-24 06:22:06.760+0000 INFO This instance is ServerId{38d38472} (38d38472-ceec-4589-bbf6-88df46eb87a2)
  21. 2024-03-24 06:22:07.114+0000 INFO ======== Neo4j 5.18.1 ========
  22. 2024-03-24 06:22:08.446+0000 INFO Bolt enabled on localhost:7687.
  23. 2024-03-24 06:22:08.784+0000 INFO HTTP enabled on localhost:7474.
  24. 2024-03-24 06:22:08.784+0000 INFO Remote interface available at http://localhost:7474/
  25. 2024-03-24 06:22:08.785+0000 INFO id: 1E401ADFCA86EEFC56F543E68E9D9A6BF22C149E054843C74785E1CCA20E57DF
  26. 2024-03-24 06:22:08.785+0000 INFO name: system
  27. 2024-03-24 06:22:08.785+0000 INFO creationDate: 2024-03-24T04:31:41.977Z
  28. 2024-03-24 06:22:08.785+0000 INFO Started.

顺利启动

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/681165
推荐阅读
相关标签
  

闽ICP备14008679号