【问题标题】:Cannot run Sonatype Nexus in local无法在本地运行 Sonatype Nexus
【发布时间】:2018-07-19 19:37:05
【问题描述】:

复制步骤

  1. 下载了nexus-3.3.0-01-win64.zip
  2. 解压D盘中的zip文件
  3. cd D:/nexus-3.3.0-01-win64/nexus-3.3.0-01/bin
  4. nexus.exe /运行

    预期结果:

启动 Nexus Repository Manager 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]

【问题讨论】:

  • 端口nexus 已配置为在其上运行,正被另一个程序使用。编辑 sonatype-work/nexus3/nexus.properties 并选择一个不同的端口供 Nexus 监听。
  • 非常感谢@rseddon,这对我有用。

标签: exception localhost repository nexus sonatype


【解决方案1】:

@rseddon 已经在 cmets 中给出了答案。在这里添加它 答案可以被接受。

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

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

netstat -ano | findStr "8081"
tasklist /fi "pid eq 2216"

或者您可以更改连接尝试侦听的端口,该端口在文件<installDir>\sonatype-work\nexus3\nexus.properties 中指定。

【讨论】:

    猜你喜欢
    • 2016-05-11
    • 1970-01-01
    • 1970-01-01
    • 2014-07-05
    • 2012-08-22
    • 2019-02-22
    • 2015-05-18
    • 2016-08-03
    • 2017-07-01
    相关资源
    最近更新 更多