Yes, please if you can (else I will do it).

Thanks !
Regards
JB

On 28/01/2022 11:05, Andre Schlegel-Tylla wrote:
Thank you.

Should I file a Jira ticket?

Regards
Andre

Am Fr., 28. Jan. 2022 um 10:34 Uhr schrieb Jean-Baptiste Onofré <[email protected] <mailto:[email protected]>>:

    Hi Andre,

    thanks for the update.

    Yeah, it seems to be a race condition where the config interceptor
    (overriding values with system properties and env variables) is started
    after some other services.

    Let me investigate a bit (probably finalizing interceptor start before
    features service).

    Regards
    JB

    On 28/01/2022 10:01, Andre Schlegel-Tylla wrote:
     > Hi JB,
     >
     > yes I have used Karaf 4.3.6 vanilla. I have repeated my tests by
     > deleting the data folder.
     >
     > I have repeated it again and got different results (now with
    deleting
     > the whole karaf and unpack the vanilla tar.gz again).
     >
     > I had used this:
     >
     > export ORG_APACHE_KARAF_SHELL_SSHPORT=18101
     > tar -xzf apache-karaf-4.3.6.tar.gz
     > apache-karaf-4.3.6/bin/karaf
     >
     >
     > * First time all went as expected; ports have been changed
     > * Second time I got this:
     >
     >    karaf-env-test tar -xzf apache-karaf-4.3.6.tar.gz
     >    karaf-env-test apache-karaf-4.3.6/bin/karaf
     >          __ __                  ____
     >         / //_/____ __________ _/ __/
     >        / ,<  / __ `/ ___/ __ `/ /_
     >       / /| |/ /_/ / /  / /_/ / __/
     >      /_/ |_|\__,_/_/   \__,_/_/
     >
     >    Apache Karaf (4.3.6)
     >
     > Hit '<tab>' for a list of available commands
     > and '[cmd] --help' for help on a specific command.
     > Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown
    Karaf.
     >
     > karaf@root()> Exception in thread "JMX Connector Thread
     >
    [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root
    <http://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root>
     > <http://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root
    <http://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root>>]"
     > java.lang.RuntimeException: Could not start JMX connector server
     > at
     >
    
org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:438)
     > at java.base/java.lang.Thread.run(Thread.java:829)
     > Caused by: java.io.IOException: Cannot bind to URL
     > [rmi://127.0.0.1:1099/karaf-root
    <http://127.0.0.1:1099/karaf-root> <http://127.0.0.1:1099/karaf-root
    <http://127.0.0.1:1099/karaf-root>>]:
     > javax.naming.CommunicationException [Root exception is
     > java.rmi.NoSuchObjectException: no such object in table]
     > at
     >
    
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:854)
     > at
     >
    
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:501)
     > at
     >
    
org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:421)
     > ... 1 more
     > Caused by: javax.naming.CommunicationException [Root exception is
     > java.rmi.NoSuchObjectException: no such object in table]
     > at
     >
    
jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:162)
     > at
     >
    
java.naming/com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:230)
     > at
    java.naming/javax.naming.InitialContext.bind(InitialContext.java:417)
     > at
     >
    
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:713)
     > at
     >
    
java.management.rmi/javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:496)
     > ... 2 more
     > Caused by: java.rmi.NoSuchObjectException: no such object in table
     > at
     >
    
java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
     > at
     >
    
java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
     > at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:380)
     > at
     >
    java.rmi/sun.rmi.registry.RegistryImpl_Stub.bind(RegistryImpl_Stub.java:73)
     > at
     >
    
jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:156)
     > ... 6 more
     >
     > * Third time there was no JMX error, ssh port was open on 8101
    not on
     > 18101 as expected. And the config result is this:
     > karaf@root()> config:list | grep Port
     >     jmxmpPort = 9999
     >     rmiRegistryPort = 11099
     >     rmiServerPort = 14444
     >     sshPort = 18101
     >
     > It seems to me that there are some timing issues.
     >
     > On our test installation which is done by a script in Jenkins we
    always
     > got the problem with the httpPort and sometimes also with the
    sshPort.
     >
     > Regards
     > Andre
     >
     >
     >
     > *ANDRE SCHLEGEL-TYLLA*/
     > Teamleiter Development/
     >
     >
     > *
     >
     > VIRTIMO AG*
     > Behrenstraße 18  | 10117 Berlin
     > Mobil: +49 175 67 853 74 | Fax: +49 30 55 574 40 99
     > [email protected]
    <mailto:[email protected]>
     > <mailto:[email protected]
    <mailto:[email protected]>> | www.virtimo.de
    <http://www.virtimo.de>
     > <http://www.virtimo.de/ <http://www.virtimo.de/>>
     >
     >
     > Registergericht: AG Berlin-Charlottenburg | HRB 131281 B | Sitz der
     > Gesellschaft: Berlin | USt-IdNr.: DE274491859
     > Vorstand: Christoph Fuchß, Dirk Breitkreuz, Tobias Weinert |
     > Vorsitzender des Aufsichtsrates: Prof. Dr. Stefan Stieglitz
     >
     >
     > Am Fr., 28. Jan. 2022 um 08:23 Uhr schrieb Jean-Baptiste Onofré
     > <[email protected] <mailto:[email protected]> <mailto:[email protected]
    <mailto:[email protected]>>>:
     >
     >     Hi Andre,
     >
     >     do you start with no data folder ?
     >
     >     I just tried and it works fine for me.
     >
     >     ConfigAdmin service has be started before SSH (which is the
    case by
     >     default).
     >
     >     Do you use a Karaf 4.3.6 vanilla ?
     >
     >     Regards
     >     JB
     >
     >     On 28/01/2022 07:18, Andre Schlegel-Tylla wrote:
     >      > Hello,
     >      >
     >      > We are using environment variables to override the karaf ports
     >      >
>  (https://karaf.apache.org/manual/latest/#_environment_variables_system_properties <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties> >  <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties>>
     >
     >      >
>  <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties> >  <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties <https://karaf.apache.org/manual/latest/#_environment_variables_system_properties>>>).
     >
     >      > We have some tests where we make a fresh installation with
    some
     >     changed
     >      > ports. In this case we have seen port conflicts with a
    parallel
     >     vanilla
     >      > installation on the same machine (ssh port and http port). It
     >     seems that
     >      > the override by the environment variables didn't work. After a
     >     restart
     >      > of the installation all was fine.
     >      >
     >      > I can reproduce the problem on my machine. I have
    downloaded the
     >      > current 4.3.6 release. Set there env vars:
     >      >
     >      > export ORG_APACHE_KARAF_SHELL_SSHPORT=18101
     >      > export ORG_APACHE_KARAF_MANAGEMENT_RMIREGISTRYPORT=11099
     >      > export ORG_APACHE_KARAF_MANAGEMENT_RMISERVERPORT=14444
     >      > export ORG_OPS4J_PAX_WEB_ORG_OSGI_SERVICE_HTTP_PORT=18181
     >      > export
    ORG_OPS4J_PAX_WEB_ORG_OSGI_SERVICE_HTTP_PORT_SECURE=18282
     >      >
     >      > When I start the fresh karaf (bin/karaf) the ssh port is
    open on
     >     8101
     >      > and not on 18101. When I stop the karaf and start again
    the ssh
     >     port is
     >      > open on 18101.
     >      >
     >      > Kind regards
     >      > Andre
     >

Reply via email to