gpt4 book ai didi

java - 启动 Neo4j 时出现名称或服务未知异常

转载 作者:行者123 更新时间:2023-11-30 03:55:14 24 4
gpt4 key购买 nike

我完全删除并再次安装 Neo4j 图形数据库。之后,当我尝试在 debian 服务器上启动 Neo4j 服务时出现异常:

Failed to get local hostname java.net.UnknownHostException: brain.kaankilic: brain.kaankilic: Name or service not known
at java.net.UnknownHostException: brain.kaankilic: brain.kaankilic: Name or service not known
at at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at at ch.qos.logback.core.util.ContextUtil.getLocalHostName(ContextUtil.java:32)
at at ch.qos.logback.core.util.ContextUtil.addHostNameAsProperty(ContextUtil.java:41)
at at ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:56)
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252)
at at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
at at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
at at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:121)
at at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:154)
at at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
at at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:132)
at at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:67)
at at org.neo4j.server.Bootstrapper.createConfigurator(Bootstrapper.java:215)
at at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:93)
at at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:57)
Caused by: java.net.UnknownHostException: brain.kaankilic: Name or service not known
at at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

如何解决这个问题?

感谢您的关注

最佳答案

尝试将 neo4j.propertiesneo4j-server.properties 中的 localhost 替换为 127.0.0.1

或者,您可以更改 /etc/hosts 中的设置。

关于java - 启动 Neo4j 时出现名称或服务未知异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23389304/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com