无法启动sonatype nexus 2.0.2

时间:2012-03-15 05:30:03

标签: maven nexus

我在linux上运行nexus-2.0.2, 关注nexus, 我试图启动nexus, 使用命令: ./bin/nexus控制台, 然后我得到了这些输出错误:(在win7下可以)

Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | 2012-03-15 11:44:21.375:INFO:oejs.Server:jetty-7.5.4.v20111024
jvm 1    | 2012-03-15 11:44:21.419:INFO:ospjc.DisableTagLibsListener:Disabling TLD support for: null (context path: /nexus)
jvm 1    | Starting Jetty...
jvm 1    | 2012-03-15 11:44:21.972:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/nexus,file:/opt/download/nexus-2.0.2/nexus/},./nexus
jvm 1    | java.io.IOException: Stream closed.
jvm 1    |  at java.util.zip.ZipInputStream.getNextEntry(libgcj.so.10)
jvm 1    |  at java.util.jar.JarInputStream.getNextEntry(libgcj.so.10)
jvm 1    |  at java.util.jar.JarInputStream.getNextJarEntry(libgcj.so.10)
jvm 1    |  at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:152)
jvm 1    |  at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82)
jvm 1    |  at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64)
jvm 1    |  at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:78)
jvm 1    |  at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:78)
jvm 1    |  at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
jvm 1    |  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
jvm 1    |  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
jvm 1    |  at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
jvm 1    |  at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
jvm 1    |  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
jvm 1    |  at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
jvm 1    |  at org.eclipse.jetty.server.Server.doStart(Server.java:261)
jvm 1    |  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
jvm 1    |  at org.sonatype.plexus.jetty.Jetty7$JettyWrapperThread.run(Jetty7.java:142)
jvm 1    | 2012-03-15 11:44:21.992:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8889 STARTING

2 个答案:

答案 0 :(得分:0)

通常,这些IO相关问题是访问权限问题,有时只是不受支持的Java版本。确保使用Oracle Java 6或7. OpenJDK可能根据版本而有效,但生产系统不正式支持。

答案 1 :(得分:0)

有时unix系统可以包含几个(JVM)

如何检查:

$ which java

/usr/bin/java

请检查此JVM的版本

java --version

java version "1.5.0"
gij (GNU libgcj) version 4.4.5

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

这是因为$ PATH包含某种“搜索路径顺序”。你可以很容易地改变它。

假设您已安装了另一个版本的JVM + JDK

(例如)的路径:

/usr/lib/jvm/java-6-sun-1.6.0.21

接下来你应该管理PATH。请添加路径到JVM的bin文件夹 例如:

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.21 
export PATH=$JAVA_HOME/bin:$PATH

建议:将此命令添加到.profile文件中。这有助于您在重新启动后确保使用正确的JVM。

最后你可以开始:

./bin/nexus console