Nexus启动失败:无法设置localhost

时间:2016-08-03 21:46:31

标签: macos dns localhost ehcache nexus

我正在尝试通过 homebrew 在MacOS上安装并运行Nexus。到目前为止装置很顺利。版本2.13已安装。

当我从nexus console开始时出现以下错误:

ERROR [jetty-main-1] *SYSTEM net.sf.ehcache.Cache - Unable to set localhost. 
This prevents creation of a GUID. Cause was: 
87.128.123.10.dyn.in-addr.arpa: 87.128.123.10.dyn.in-addr.arpa

java.net.UnknownHostException: 87.128.123.10.dyn.in-addr.arpa: 87.128.123.10.dyn.in-addr.arpa
    at java.net.InetAddress.getLocalHost(InetAddress.java:1475) ~[na:1.7.0_79]
    at net.sf.ehcache.Cache.<clinit>(Cache.java:217) ~[ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:303) [ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:219) [ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:648) [ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:407) [ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.CacheManager.init(CacheManager.java:357) [ehcache-core-2.5.1.jar:na]
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:242) [ehcache-core-2.5.1.jar:na]
    at org.sonatype.sisu.ehcache.CacheManagerComponentImpl.createCacheManager(CacheManagerComponentImpl.java:112) [nexus-ehcache-2.13.0-01.jar:2.13.0-01]
    at org.sonatype.sisu.ehcache.CacheManagerComponentImpl.<init>(CacheManagerComponentImpl.java:57) [nexus-ehcache-2.13.0-01.jar:2.13.0-01]
    at org.sonatype.sisu.ehcache.CacheManagerComponentImpl.<init>(CacheManagerComponentImpl.java:52) [nexus-ehcache-2.13.0-01.jar:2.13.0-01]
    at org.sonatype.sisu.ehcache.CacheManagerComponentImpl$$FastClassByGuice$$6e60c0a8.newInstance(<generated>) [sisu-guice-3.1.10.jar:2.13.0-01]
    ...

当我打开http://localhost:8081时,会向我显示此404错误页面:

Nexus error page

hostname命令输出:

  

87.128.123.10.dyn.in-addr.arpa

ifconfig en0命令输出:

  

en0:flags = 8863 UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST mtu 1500
    选项= 10B
    ...
    inet 10.123.128.87网络掩码0xfffffc00广播10.123.131.255
    nd6 options = 1
    媒体:自动选择(100baseTX)
    状态:有效

1 个答案:

答案 0 :(得分:1)

默认情况下,Nexus会在/ nexus上下文中运行,因此请尝试http://localhost:8081/nexus

Jetty返回404页面,因此应用服务器运行正常,一切都应该没问题。

如果localhost不起作用,请尝试使用您的IP号码或使用127.0.0.1