Nexus / Jetty doesn't want to start anymore: Unresolved address

nexus https
nexus install ssl certificate

We have a Nexus server which worked fine until friday. Nexus was stopped and since we are unable to start it again but I can't figure out why ?

I think it's a Jetty problem. Here is the stack strace:

jvm 1    | 2012-08-13 09:31:10 WARN  [er_start_runner] - org.mortbay.log - failed SelectChannelConnector@*:8080
jvm 1    | java.net.SocketException: Unresolved address
jvm 1    |  at sun.nio.ch.Net.translateToSocketException(Net.java:58)
jvm 1    |  at sun.nio.ch.Net.translateException(Net.java:84)
jvm 1    |  at sun.nio.ch.Net.translateException(Net.java:90)
jvm 1    |  at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
jvm 1    |  at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)

The configuration is (jetty.xml):

<Configure id="Server" class="org.mortbay.jetty.Server">
    <Call name="addConnector">
        <Arg>
            <New class="org.mortbay.jetty.nio.SelectChannelConnector">
              <Set name="host">${application-host}</Set>
              <Set name="port">${application-port}</Set>
            </New>
        </Arg>
    </Call>

    <Set name="handler">
      <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection">
          <!-- The following configuration is REQUIRED, and MUST BE FIRST. 
               It makes the Plexus container available for use in the Nexus webapp. -->
          <Call name="addLifeCycleListener">
              <Arg>
                <New class="org.sonatype.plexus.jetty.custom.InjectExistingPlexusListener" />
              </Arg>
          </Call>

          <!-- The following configuration disables JSP taglib support, the validation of which
               slows down Jetty's startup significantly. -->
          <Call name="addLifeCycleListener">
              <Arg>
                <New class="org.sonatype.plexus.jetty.custom.DisableTagLibsListener" />
              </Arg>
          </Call>
      </New>
    </Set>

    <New id="NexusWebAppContext" class="org.mortbay.jetty.webapp.WebAppContext">
      <Arg><Ref id="Contexts"/></Arg>
      <Arg>${webapp}</Arg>
      <Arg>${webapp-context-path}</Arg>
      <Set name="extractWAR">false</Set>
    </New>

    <Set name="stopAtShutdown">true</Set>
    <Set name="sendServerVersion">true</Set>
    <Set name="sendDateHeader">true</Set>
    <Set name="gracefulShutdown">1000</Set>
</Configure>

and the plexus.properties:

application-port=8081
application-host=0.0.0.0
runtime=${basedir}/runtime
apps=${runtime}/apps
nexus-work=${basedir}/../../data/nexus/sonatype-work/nexus
nexus-app=${runtime}/apps/nexus
webapp=${runtime}/apps/nexus/webapp
webapp-context-path=/nexus
security-xml-file=${nexus-work}/conf/security.xml
application-conf=${nexus-work}/conf
runtime-tmp=${runtime}/tmp

# If this file is present, it will be used to configure Jetty.
jetty.xml=${basedir}/conf/jetty.xml

# Uncomment this to use the debug js files
#index.template.file=templates/index-debug.vm

Nexus version is 1.9.2.3

I can't understand: why it wants to start a connector at port 8080 (while I only set port 8081) and what means the address * (and why not 0.0.0.0) ? And of course why it doesn't want to start anymore ?

Thanks a lot for all your ideas!

Unable to setup SSL for Nexus, Next step created jks file in /nexus-3.3.2-02/etc/ssl and have updated /nexus-3.3.​2-02/etc/jetty/jetty-https.xml to the keystore path absolute path. Jetty users are used to providing a list of jetty XML config files which are merged to form the final configuration. As an advanced configuration option, Nexus now supports this merging concept in it's launcher code as of Nexus 2.8. How it Works

I had a similar issue. Jetty was running inside docker container (jetty:9.3.24-jre8). You need to comment out line about http.host in start.ini:

#jetty.http.host='0.0.0.0'

Network interfaces get mixed up for some reason.

nexus-public/jetty-https.xml at master · sonatype/nexus-public · GitHub, xml. Find file Copy path. Fetching contributors… Cannot retrieve contributors at this time. Big News, We’ve Just Launched Sonatype Learn! Check out Nexus Repository Manager Basics, Introduction to DevSecOps, and many other free self-paced online courses. Using Secure Socket Layer (SSL) communication with the repository manager is an important security feature and a recommended best practice. Secure communication can be inbound or

Solved!

The file jetty.xml had only the 'r' permission which is not enough: it must have the 'x' permission too. So Jetty was unable to read the file jetty.xml and in that case it tries to start a default connector on '*:8080' => * is not resolvable (I don't know why they used * instead of 0.0.0.0 ???)

So it was a configuration issue.

nexus-public/jetty.xml at master · sonatype/nexus-public · GitHub, xml. Find file Copy path. Fetching contributors… Cannot retrieve contributors at this time. If it contains more than one as above, and none of the other certificates are in the Java trust store used by the Java process running Maven, then the only workarounds are to explicitly import the server certificate into the default truststore or have the Nexus server certificate chain be signed by a public certificate authority already in the

Running Nexus Sonatype over Jetty, This tutorial covers the procedure for deploying the Nexus repository on a Jetty 6 web server. Download Nexus war file. Nexus is distributed as a  if jetty is trying to start on 8080 then the glue between jetty and nexus is apparently having issues, so not a jetty issue per-se.. You can start it up with -DDEBUG=true for more information about what jetty is doing if that helps. – jesse mcconnell Aug 13 '12 at 12:35

Nexus / Jetty doesn't want to start anymore: Unresolved address , I cannot comment on the 8080 vs 8081 issue, but as for the SocketException The SocketException: unresolved address is usually due to  THIS IS NOT THE DOCUMENTATION YOU ARE LOOKING FOR!!!!! All development and stable releases are being performed with Jetty 9 and Jetty 10. This is an overview of how to configure SSL for Jetty, which uses Sun's reference implementation for the Java Secure Sockets Extension (JSSE). Configuring SSL can be a confusing experience of keys

Maven: The Definitive Guide: The Definitive Guide, Nexus is based on Jetty, which is a very highperformance servlet container based on Java NIO. From a performance perspective, there is no reason for you not  A lightweight overhaul of both the vanilla Skyrim carriage system and Dawnguard's ferry system. Realistic and bug-free. If you want to upload this mod to another site, ask me first. If you want to use assets from this file, ask me and I can make them available to you. You can use them as you please. You can edit this mod for personal use, but

Comments
  • if jetty is trying to start on 8080 then the glue between jetty and nexus is apparently having issues, so not a jetty issue per-se.. You can start it up with -DDEBUG=true for more information about what jetty is doing if that helps.
  • I marked my answer as the accepted answer because it solved my issue. But your answer is really good to find if it works fine or not.
  • There must have been something else, otherwise it's just stupid. Besides it doesn't work. :P
  • In my case the problem was that in .xml files a host 0.0.0.0 was apparently treated as specific interface and not as "listen to all interfaces". Leaving the field empty did the trick. (all that assumes that you have wiped your start.ini file and are using jetty 9.0
  • This solution makes no sense. jetty.xml file is not executable.