HTTP => https Issues

Hi everyone.

During my test migration of our Artifactory to Nexus “which run pretty easy” the passage from http to https seems to give me hard time…

Can someone tell me what is going on… probably an error on my end but I don’t find it !

Thanks

The doc I have folow anbd I use the Nexus v3.28.0-01 OSS version at the moment and ti’s on windows…

https://help.sonatype.com/repomanager3/system-configuration/configuring-ssl#ConfiguringSSL-InboundSSL-ConfiguringtoServeContentviaHTTPS

  • Configuring SSL
    • How to Enable the HTTPS Connector

###################################
############## Run OK #############
###################################
Unzip / first run OK.

C:\Nexus3\nexus-3.28.0-01\bin>.\nexus.exe /run

C:\Nexus3\nexus-3.28.0-01\bin>.\nexus.exe /run
2020-12-04 10:53:51,199+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.pax.logging.NexusLogActivator - start
2020-12-04 10:53:51,964+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.features.internal.FeaturesWrapper - Fast FeaturesService starting
2020-12-04 10:53:53,714+0100 WARN [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4JInitialiser - Your logging framework class org.ops4j.pax.logging.slf4j.Slf4jLogger is not known - if it needs access to the standard println methods on the console you will need to register it by calling registerLoggingSystemPackage
2020-12-04 10:53:53,714+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Package org.ops4j.pax.logging.slf4j registered; all classes within it or subpackages of it will be allowed to print to System.out and System.err
2020-12-04 10:53:53,730+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Replaced standard System.out and System.err PrintStreams with SLF4JPrintStreams
2020-12-04 10:53:53,730+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Redirected System.out and System.err to SLF4J for this context
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - Properties:
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-host=‘0.0.0.0’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-port=‘8081’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - fabric.etc=‘C:\Nexus3\nexus-3.28.0-01/etc/fabric’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - jetty.etc=‘C:\Nexus3\nexus-3.28.0-01/etc/jetty’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.base=‘C:\Nexus3\nexus-3.28.0-01’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.data=‘C:\Nexus3\sonatype-work\nexus3’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.etc=‘C:\Nexus3\nexus-3.28.0-01\etc\karaf’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.home=‘C:\Nexus3\nexus-3.28.0-01’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.instances=‘C:\Nexus3\sonatype-work\nexus3\instances’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - logback.etc=‘C:\Nexus3\nexus-3.28.0-01\etc\logback’
2020-12-04 10:53:53,745+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-args=‘C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty.xml,C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty-http.xml,C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty-requestlog.xml’
2020-12-04 10:53:53,761+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-context-path=’/’
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-edition=‘nexus-pro-edition’
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-features=‘nexus-pro-feature’
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus.hazelcast.discovery.isEnabled=‘true’
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - ssl.etc=‘C:\Nexus3\nexus-3.28.0-01/etc/ssl’
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - Java: 1.8.0_252, OpenJDK 64-Bit Server VM, Azul Systems, Inc., 25.252-b14
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - OS: Windows Server 2016, 10.0, amd64
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - User: bdedieu, en, C:\Users\bdedieu
2020-12-04 10:53:53,824+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - CWD: C:\Nexus3\nexus-3.28.0-01
2020-12-04 10:53:54,136+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - TMP: C:\Nexus3\sonatype-work\nexus3\tmp
2020-12-04 10:53:54,136+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Starting
2020-12-04 10:53:54,152+0100 INFO [FelixStartLevel] *SYSTEM org.eclipse.jetty.util.log - Logging initialized @ 6305ms to org.eclipse.jetty.util.log.Slf4jLog
2020-12-04 10:53:54,167+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty.xml
2020-12-04 10:53:54,558+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty-http.xml
2020-12-04 10:53:54,620+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty-requestlog.xml
2020-12-04 10:53:54,667+0100 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Starting: Server@4bb3ba88{STOPPED}[9.4.30.v20200611]
2020-12-04 10:53:54,667+0100 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - jetty-9.4.30.v20200611; built: 2020-06-11T12:34:51.929Z; git: 271836e4c1f4612f12b7bb13ef5a92a927634b0d; jvm 1.8.0_252-b14
2020-12-04 10:58:38,001+0100 INFO [jetty-main-1] *SYSTEM com.softwarementors.extjs.djn.servlet.DirectJNgineServlet - Servlet GLOBAL configuration: registryConfiguratorClass=
2020-12-04 10:58:38,033+0100 INFO [jetty-main-1] *SYSTEM com.softwarementors.extjs.djn.jscodegen.CodeFileGenerator - Creating source files for APIs…
2020-12-04 10:58:38,345+0100 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.siesta.SiestaServlet - JAX-RS RuntimeDelegate: org.sonatype.nexus.siesta.internal.resteasy.SisuResteasyProviderFactory@1c2b868f
2020-12-04 10:58:38,392+0100 INFO [jetty-main-1] *SYSTEM org.jboss.resteasy.plugins.validation.i18n - RESTEASY008550: Unable to find CDI supporting ValidatorFactory. Using default ValidatorFactory
2020-12-04 10:58:39,939+0100 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.siesta.SiestaServlet - Initialized
2020-12-04 10:58:39,955+0100 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Initialized
2020-12-04 10:58:40,001+0100 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@4c9b541d{Sonatype Nexus,/,file:///C:/Nexus3/nexus-3.28.0-01/public/,AVAILABLE}
2020-12-04 10:58:40,048+0100 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@62ad8c83{HTTP/1.1, (http/1.1)}{0.0.0.0:8081}
2020-12-04 10:58:40,048+0100 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - Started @ 292203ms
2020-12-04 10:58:40,064+0100 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer -

Started Sonatype Nexus OSS 3.28.0-01


Test http://test-nexus.fr:8081

OK

###################################
############# jkStore #############
###################################

c:\Program Files\Java\jre1.8.0_271\bin>.\keytool.exe -genkeypair -keystore keystore.jks -storepass MyP@ss -alias test-nexus .fr -keyalg RSA -keysize 2048 -validity 5000 -keypass MyP@ss -dname “CN=*.test-nexus.fr, OU=testnet, O=dev .net, L=ICI, ST=IDF, C=FR” -ext “SAN=DNS:test-nexus.fr,DNS:clm.test-nexus.fr,DNS:repo.test-nexus.fr,DNS:www.test-nexus.fr”

Warning:
Le fichier de clés JKS utilise un format propriétaire. Il est recommandé de migrer vers PKCS12, qui est un format standard de l’industrie en utilisant “keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.jks -deststoretype pkcs12”.

c:\Program Files\Java\jre1.8.0_271\bin> cp keystore.jks c:\Nexus3\nexus-3.28.0-01\bin\ssl\

###################################
############ JettyConf ############
###################################
C:\Nexus3\nexus-3.28.0-01\etc\jetty\jetty-https.xml

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty /configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">

  <!--
 ==== HTTPS ====
  Set the following inside nexus.properties:
  application-port-ssl: the port to listen for https connections
    -->
  
    <Ref refid="httpConfig">
      <Set name="secureScheme">https</Set>
      <Set name="securePort"><Property name="application-port-ssl" /></Set>
    </Ref>

    <New id="httpsConfig" class="org.eclipse.jetty.server.HttpConfiguration">
      <Arg><Ref refid="httpConfig"/></Arg>
      <Call name="addCustomizer">
        <Arg>
          <New id="secureRequestCustomizer"     class="org.eclipse.jetty.server.SecureRequestCustomizer">
            <!-- 7776000 seconds = 90 days -->
            <Set name="stsMaxAge"><Property name="jetty.https.stsMaxAge" default="7776000"/>    </Set>
            <Set name="stsIncludeSubDomains"><Property name="jetty.https.stsIncludeSubDomains"       default="false"/></Set>
            <Set name="sniHostCheck"><Property name="jetty.https.sniHostCheck" default="false"/>      </Set>
          </New>
        </Arg>
      </Call>
    </New>

    <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
      <Set name="certAlias">jetty</Set>
      <Set name="KeyStorePath"><Property name="ssl.etc"/>/keystore.jks</Set>
      <Set name="KeyStorePassword">MyP@ss</Set>
      <Set name="KeyManagerPassword">MyP@ss</Set>
      <Set name="TrustStorePath"><Property name="ssl.etc"/>/keystore.jks</Set>
      <Set name="TrustStorePassword">MyP@ss</Set>
      <Set name="EndpointIdentificationAlgorithm"></Set>
      <Set name="NeedClientAuth"><Property name="jetty.ssl.needClientAuth" default="false"</Set>
      <Set name="WantClientAuth"><Property name="jetty.ssl.wantClientAuth" default="false"/></Set>
      <Set name="ExcludeCipherSuites">

###################################
######## Nexux.properties #########
###################################
C:\Nexus3\sonatype-work\nexus3\etc\nexus.properties

Jetty section

application-port=8443
ssl.etc=${karaf.data}/etc/ssl

application-host=0.0.0.0

nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-https.xml,${jetty.etc}/jetty-requestlog.xml

nexus-context-path=/

Nexus section

nexus-edition=nexus-pro-edition

nexus-features=\

nexus-pro-feature

nexus.hazelcast.discovery.isEnabled=true

###################################
############ Run Error ############
###################################

C:\Nexus3\nexus-3.28.0-01\bin>.\nexus.exe /run
2020-12-04 10:30:47,437+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.pax.logging.NexusLogActivator - start
2020-12-04 10:30:48,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.features.internal.FeaturesWrapper - Fast FeaturesService starting
2020-12-04 10:30:50,265+0100 WARN [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4JInitialiser - Your logging framework class org.ops4j.pax.logging.slf4j.Slf4jLogger is not known - if it needs access to the standard println methods on the console you will need to register it by calling registerLoggingSystemPackage
2020-12-04 10:30:50,280+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Package org.ops4j.pax.logging.slf4j registered; all classes within it or subpackages of it will be allowed to print to System.out and System.err
2020-12-04 10:30:50,280+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Replaced standard System.out and System.err PrintStreams with SLF4JPrintStreams
2020-12-04 10:30:50,280+0100 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Redirected System.out and System.err to SLF4J for this context
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - Properties:
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-host=‘0.0.0.0’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-port=‘8443’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - fabric.etc=‘C:\Nexus3\nexus-3.28.0-01/etc/fabric’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - jetty.etc=‘C:\Nexus3\nexus-3.28.0-01/etc/jetty’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.base=‘C:\Nexus3\nexus-3.28.0-01’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.data=‘C:\Nexus3\sonatype-work\nexus3’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.etc=‘C:\Nexus3\nexus-3.28.0-01\etc\karaf’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.home=‘C:\Nexus3\nexus-3.28.0-01’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.instances=‘C:\Nexus3\sonatype-work\nexus3\instances’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - logback.etc=‘C:\Nexus3\nexus-3.28.0-01\etc\logback’
2020-12-04 10:30:50,296+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-args=‘C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty.xml,C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty-https.xml,C:\Nexus3\nexus-3.28.0-01/etc/jetty/jetty-requestlog.xml’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-context-path=’/’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-edition=‘nexus-pro-edition’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-features=‘nexus-pro-feature’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus.hazelcast.discovery.isEnabled=‘true’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - ssl.etc=‘C:\Nexus3\sonatype-work\nexus3/etc/ssl’
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - Java: 1.8.0_252, OpenJDK 64-Bit Server VM, Azul Systems, Inc., 25.252-b14
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - OS: Windows Server 2016, 10.0, amd64
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - User: testuser, en, C:\Users\testuser
2020-12-04 10:30:50,312+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - CWD: C:\Nexus3\nexus-3.28.0-01
2020-12-04 10:30:50,327+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - TMP: C:\Nexus3\sonatype-work\nexus3\tmp
2020-12-04 10:30:50,327+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Starting
2020-12-04 10:30:50,343+0100 INFO [FelixStartLevel] *SYSTEM org.eclipse.jetty.util.log - Logging initialized @8519ms to org.eclipse.jetty.util.log.Slf4jLog
2020-12-04 10:30:50,343+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty.xml
2020-12-04 10:30:50,671+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty-https.xml
2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at
2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at https
2020-12-04 10:30:50,702+0100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Start failed
java.lang.NoSuchMethodException: class org.eclipse.jetty.server.HttpConfiguration.setSecurePort(class java.lang.Object). Found setters for int
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:763)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:530)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(XmlConfiguration.java:1084)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:551)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:489)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:401)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.doStart(JettyServer.java:168)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.lambda$0(JettyServer.java:117)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.start(JettyServer.java:115)
at org.sonatype.nexus.bootstrap.Launcher.start(Launcher.java:131)
at org.sonatype.nexus.bootstrap.Launcher.startAsync(Launcher.java:127)
at org.sonatype.nexus.bootstrap.osgi.LauncherActivator.start(LauncherActivator.java:67)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.server.HttpConfiguration.setSecurePort(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:622)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: TYPE
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:635)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: securePort
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:650)
… 18 common frames omitted
Suppressed: java.lang.IllegalArgumentException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.invokeMethod(XmlConfiguration.java:786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:700)
… 18 common frames omitted
Suppressed: java.lang.NoSuchMethodException: java.lang.Integer.(java.lang.Object)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:746)
… 18 common frames omitted
2020-12-04 10:30:50,702+0100 ERROR [FelixStartLevel] *SYSTEM Felix - Bundle org.sonatype.nexus.bootstrap [70] Error starting mvn:org.sonatype.nexus/nexus-bootstrap/3.28.0-01 (org.osgi.framework.BundleException: Activator start error in bundle org.sonatype.nexus.bootstrap [70].)
org.osgi.framework.BundleException: Activator start error in bundle org.sonatype.nexus.bootstrap [70].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2290)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: class org.eclipse.jetty.server.HttpConfiguration.setSecurePort(class java.lang.Object). Found setters for int
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:763)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:530)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(XmlConfiguration.java:1084)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:551)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:489)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:401)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.doStart(JettyServer.java:168)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.lambda$0(JettyServer.java:117)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.start(JettyServer.java:115)
at org.sonatype.nexus.bootstrap.Launcher.start(Launcher.java:131)
at org.sonatype.nexus.bootstrap.Launcher.startAsync(Launcher.java:127)
at org.sonatype.nexus.bootstrap.osgi.LauncherActivator.start(LauncherActivator.java:67)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
… 4 common frames omitted
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.server.HttpConfiguration.setSecurePort(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:622)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: TYPE
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:635)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: securePort
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:650)
… 18 common frames omitted
Suppressed: java.lang.IllegalArgumentException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.invokeMethod(XmlConfiguration.java:786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:700)
… 18 common frames omitted
Suppressed: java.lang.NoSuchMethodException: java.lang.Integer.(java.lang.Object)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:746)
… 18 common frames omitted
2020-12-04 10:30:50,702+0100 ERROR [FelixDispatchQueue] *SYSTEM org.osgi.framework.FrameworkEvent - FrameworkEvent ERROR
org.osgi.framework.BundleException: Activator start error in bundle org.sonatype.nexus.bootstrap [70].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2290)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: class org.eclipse.jetty.server.HttpConfiguration.setSecurePort(class java.lang.Object). Found setters for int
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:763)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:530)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(XmlConfiguration.java:1084)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:551)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:489)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:401)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.doStart(JettyServer.java:168)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.lambda$0(JettyServer.java:117)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonatype.nexus.bootstrap.jetty.JettyServer.start(JettyServer.java:115)
at org.sonatype.nexus.bootstrap.Launcher.start(Launcher.java:131)
at org.sonatype.nexus.bootstrap.Launcher.startAsync(Launcher.java:127)
at org.sonatype.nexus.bootstrap.osgi.LauncherActivator.start(LauncherActivator.java:67)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
… 4 common frames omitted
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.server.HttpConfiguration.setSecurePort(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:622)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: TYPE
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:635)
… 18 common frames omitted
Suppressed: java.lang.NoSuchFieldException: securePort
at java.lang.Class.getField(Class.java:1703)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:650)
… 18 common frames omitted
Suppressed: java.lang.IllegalArgumentException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.invokeMethod(XmlConfiguration.java:786)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:700)
… 18 common frames omitted
Suppressed: java.lang.NoSuchMethodException: java.lang.Integer.(java.lang.Object)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:746)
… 18 common frames omitted

C:\Nexus3\nexus-3.28.0-01\bin>

It’s not clear to me from your post, does the instance run without https?
The error doesn’t look like an https error, it looks like a bundle failed to load.
This would make sense if you’re OSS as your config says PRO.
If you’re a licensed pro user, try installing your license. Also if you’re a licensed pro user, did you contact support? You are paying for that :slight_smile:

Hi Joe TOM, thanks you for your reply.

I agree with you my post is a bit messy, I wanted to put much information as possible but was not able to ordonate that as I wanted it.

  • In did, it’s work without the https configuration.

  • It’s not a https ERROR, I agree, but it failed start wen loading “jetty-https.xml”

The only modification on this file is my keystore password that I add.

Blockquote
2020-12-04 10:30:50,671+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty-https.xml
2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at
2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at https
2020-12-04 10:30:50,702+0100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Start failed

  • I maybe bownload the wrong file “OSS or PRO version” How cane I know about it ?

I re-download it and try it agane.
frome here : Download Nexus Repository OSS | Sonatype

So the error and your description lend me to believe that you have a configuration error with the jetty-https file.
I do not see that material attached (sorry if I missed)…that may be because there’s passwords and sensitive data in there.
Thus, you may try extracting the file and reconfiguring from scratch.

Note, in NXRM3 there’s no pro vs oss download. If you had a trial at one time that expired on your machine, it may have a license around somewhere. If you never had a pro license that configuration makes no sense…but redownloading may resolve that as well.
If you’re on a VM and you can, try a fresh VM, that’d workaround both issues. If you have no issues there maybe then you can compare.

2 cents.

In did, all failed when it load jetty-https.xml but I just added my password in it.

###################################
############# Run Error ##############
###################################
org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/C:/Nexus3/nexus-3.28.0-01/etc/jetty/jetty-https.xml

Blockquote2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at
2020-12-04 10:30:50,687+0100 WARN [FelixStartLevel] *SYSTEM org.eclipse.jetty.xml.XmlConfiguration - Config error at https
2020-12-04 10:30:50,702+0100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Start failed

###################################
############# JettyConf ##############
###################################
C:\Nexus3\nexus-3.28.0-01\etc\jetty\jetty-https.xml

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty /configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">

  <!--
 ==== HTTPS ====
  Set the following inside nexus.properties:
  application-port-ssl: the port to listen for https connections
    -->
  
    <Ref refid="httpConfig">
      <Set name="secureScheme">https</Set>
      <Set name="securePort"><Property name="application-port-ssl" /></Set>
    </Ref>

    <New id="httpsConfig" class="org.eclipse.jetty.server.HttpConfiguration">
      <Arg><Ref refid="httpConfig"/></Arg>
      <Call name="addCustomizer">
        <Arg>
          <New id="secureRequestCustomizer"     class="org.eclipse.jetty.server.SecureRequestCustomizer">
            <!-- 7776000 seconds = 90 days -->
            <Set name="stsMaxAge"><Property name="jetty.https.stsMaxAge" default="7776000"/>    </Set>
            <Set name="stsIncludeSubDomains"><Property name="jetty.https.stsIncludeSubDomains"       default="false"/></Set>
            <Set name="sniHostCheck"><Property name="jetty.https.sniHostCheck" default="false"/>      </Set>
          </New>
        </Arg>
      </Call>
    </New>

    <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
      <Set name="certAlias">jetty</Set>
      <Set name="KeyStorePath"><Property name="ssl.etc"/>/keystore.jks</Set>
      <Set name="KeyStorePassword">MyP@ss</Set>
      <Set name="KeyManagerPassword">MyP@ss</Set>
      <Set name="TrustStorePath"><Property name="ssl.etc"/>/keystore.jks</Set>
      <Set name="TrustStorePassword">MyP@ss</Set>
      <Set name="EndpointIdentificationAlgorithm"></Set>
      <Set name="NeedClientAuth"><Property name="jetty.ssl.needClientAuth" default="false"</Set>
      <Set name="WantClientAuth"><Property name="jetty.ssl.wantClientAuth" default="false"/></Set>
      <Set name="ExcludeCipherSuites">

I don’t really have anything else to add, I know this is working in 3.28 in general, so it’s something specific to your config.
If an option you could try another keystore with the default password (of password) and no file changes.
Or maybe someone else has ideas.

That’s a good idea, Thank’s.

Just one last question !!

To enable the Nexus HTTPS connector concerning the public/private key

I just :
generate public private key pair using keytool :

keytool -genkeypair -keystore keystore.jks -storepass password -alias example.com \ -keyalg RSA -keysize 2048 -validity 5000 -keypass password \ -dname 'CN=*.example.com, OU=Sonatype, O=Sonatype, L=Unspecified, ST=Unspecified, C=US' \ -ext 'SAN=DNS:nexus.example.com,DNS:clm.example.com,DNS:repo.example.com,DNS:www.example.com'

And :
place it in $data-dir/etc/ssl/keystore.jks

I am not sure your company needs and I am not that familiar with the tool but when I test this, I use “keytool -keystore keystore.jks -alias jetty -genkey -keyalg RSA” and just fill everything in manually.
If you have the ability, may try the simple version first before adding all those additional variables. But hopefully you know what you need.

Your location looks right, I usually just do it from that directory so I don’t need to move anything afterwords.
I also can say if it was misplaced, you’d get a not found error, so I don’t think the issue is related to placement.

Hope that helps,
Joe

I encountered the exact same problem- and found the solution. For anybody that has the same problem has @bop4hell or me, here you go:

You have to add the line “application-port-ssl=8443” to the nexus.properties config (It was the port 8443 for me, but you should obviously use your prefered port).

The problem here is that the application is loading the jetty-https.xml file, that searches for the property ‘application-port-ssl’ as the securePort in the nexus.properties:

<Ref refid="httpConfig">
    <Set name="secureScheme">https</Set>
    <Set name="securePort"><Property name="application-port-ssl" /></Set>
</Ref>

Since your default nexus.properties does not include the ‘application-port-ssl’ line, the application throws an error on startup.

1 Like