Exception 无法在本地运行Sonatype Nexus

Exception 无法在本地运行Sonatype Nexus,exception,localhost,repository,nexus,sonatype,Exception,Localhost,Repository,Nexus,Sonatype,复制步骤 下载了nexus-3.3.0-01-win64.zip 在D驱动器中解压缩zip文件 cd-D:/nexus-3.3.0-01-win64/nexus-3.3.0-01/bin nexus.exe/run 预期结果: 已启动Nexus存储库管理器3.3.0-01 实际结果: 2017-06-15 10:41:53,104+0800 ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer -

复制步骤

  • 下载了nexus-3.3.0-01-win64.zip
  • 在D驱动器中解压缩zip文件
  • cd-D:/nexus-3.3.0-01-win64/nexus-3.3.0-01/bin
  • nexus.exe/run

    预期结果:

  • 已启动Nexus存储库管理器3.3.0-01

    实际结果:

    2017-06-15 10:41:53,104+0800 ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Failed to start    
    java.net.BindException: Address already in use: bind
            at sun.nio.ch.Net.bind0(Native Method) [na:1.8.0_102]
            at sun.nio.ch.Net.bind(Unknown Source) [na:1.8.0_102]
            at sun.nio.ch.Net.bind(Unknown Source) [na:1.8.0_102]
            at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) [na:1.8.0_102]
            at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) [na:1.8.0_102]
            at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326) [org.eclipse.jetty.server:9.3.7.v20160115]
            at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) [org.eclipse.jetty.server:9.3.7.v20160115]
            at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244) [org.eclipse.jetty.server:9.3.7.v20160115]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [org.eclipse.jetty.util:9.3.7.v20160115]
            at org.eclipse.jetty.server.Server.doStart(Server.java:384) [org.eclipse.jetty.server:9.3.7.v20160115]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [org.eclipse.jetty.util:9.3.7.v20160115]
            at org.sonatype.nexus.bootstrap.jetty.JettyServer$JettyMainThread.run(JettyServer.java:274) [org.sonatype.nexus.bootstrap:3.3.0.01]
    
    答案已在作者的评论中给出。把它加在这里 答案是可以接受的

    java.net.BindException
    表示进程无法侦听给定端口,因为该端口已被占用(通常由现有进程占用)。在nexus启动的情况下,它表示其他进程正在侦听此端口

    您可以找到该进程并终止它。在MS Windows上,可以通过如下运行
    netstat
    tasklist
    来发现这一点(假设端口8081是其尝试绑定的位置,第一个命令给出pid 2216):


    或者,您可以更改nexus尝试侦听的端口,该端口在文件
    \sonatype work\nexus3\nexus.properties

    中指定。另一个程序正在使用该端口。编辑sonatype work/nexus3/nexus.properties并为nexus选择一个不同的端口进行侦听。非常感谢@rseddon,这对我来说很有用。
    netstat -ano | findStr "8081"
    tasklist /fi "pid eq 2216"