Hi Volker,

it's weird: I don't think the framework feature trigger a whole refresh.

Do you use the default featuresBoot in etc/org.apache.karaf.features.cfg ?

Regards
JB

On 05/11/2016 09:47 AM, Althaus, Volker wrote:
Hi,

we upgraded from Karaf 4.0.4 to 4.0.5 and now we have a
non-deterministic start behavior with our custom log appenders which
lead to multiple error-like output on the console.

We implemented our appender regarding to

http://blog.nanthrax.net/2012/12/create-custom-log4j-appender-for-karaf-and-pax-logging/
and

http://karaf.apache.org/manual/latest/#_advanced_configuration (Custom
appenders section)

startup.properties:

-----------------------

mvn\:org.ops4j.pax.logging/pax-logging-api/1.8.5 = 8

mvn\:org.ops4j.pax.logging/pax-logging-service/1.8.5 = 8

mvn\:my.group/my.logging.fragment/1.0 = 8

(No behavior change if the fragment is moved before the service bundle
as mentioned in the second link).

MANIFEST.MF:

------------------

…

Bundle-SymbolicName: my.logging.fragment

Fragment-Host: org.ops4j.pax.logging.pax-logging-service

…

Now an example first start output is:

$ > karaf.bat

The specified feature: 'instance' version '4.0.5' is already installed

The specified feature: 'package' version '4.0.5' is already installed

The specified feature: 'log' version '4.0.5' is already installed

The specified feature: 'ssh' version '4.0.5' is already installed

The specified feature: 'aries-blueprint' version '4.0.5' is already
installed

The specified feature: 'framework' version '4.0.5' is already installed

The specified feature: 'system' version '4.0.5' is already installed

The specified feature: 'feature' version '4.0.5' is already installed

The specified feature: 'shell' version '4.0.5' is already installed

The specified feature: 'management' version '4.0.5' is already installed

The specified feature: 'service' version '4.0.5' is already installed

The specified feature: 'jaas' version '4.0.5' is already installed

The specified feature: 'shell-compat' version '4.0.5' is already installed

The specified feature: 'deployer' version '4.0.5' is already installed

The specified feature: 'diagnostic' version '4.0.5' is already installed

The specified feature: 'wrap' version '0.0.0' is already installed

The specified feature: 'bundle' version '4.0.5' is already installed

The specified feature: 'config' version '4.0.5' is already installed

The specified feature: 'kar' version '4.0.5' is already installed

The specified feature: 'instance' version '4.0.5' is already installed

The specified feature: 'package' version '4.0.5' is already installed

The specified feature: 'log' version '4.0.5' is already installed

The specified feature: 'ssh' version '4.0.5' is already installed

The specified feature: 'aries-blueprint' version '4.0.5' is already
installed

The specified feature: 'framework' version '4.0.5' is already installed

The specified feature: 'system' version '4.0.5' is already installed

The specified feature: 'feature' version '4.0.5' is already installed

The specified feature: 'shell' version '4.0.5' is already installed

The specified feature: 'management' version '4.0.5' is already installed

The specified feature: 'service' version '4.0.5' is already installed

The specified feature: 'jaas' version '4.0.5' is already installed

The specified feature: 'shell-compat' version '4.0.5' is already installed

The specified feature: 'deployer' version '4.0.5' is already installed

The specified feature: 'diagnostic' version '4.0.5' is already installed

The specified feature: 'wrap' version '0.0.0' is already installed

The specified feature: 'bundle' version '4.0.5' is already installed

The specified feature: 'config' version '4.0.5' is already installed

The specified feature: 'kar' version '4.0.5' is already installed

         __ __                  ____

        / //_/____ __________ _/ __/

       / ,<  / __ `/ ___/ __ `/ /_

      / /| |/ /_/ / /  / /_/ / __/

     /_/ |_|\__,_/_/   \__,_/_/

   Apache Karaf (4.0.5)

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()>

         __ __                  ____

        / //_/____ __________ _/ __/

       / ,<  / __ `/ ___/ __ `/ /_

      / /| |/ /_/ / /  / /_/ / __/

     /_/ |_|\__,_/_/   \__,_/_/

   Apache Karaf (4.0.5)

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()>

Not a copy’n’paste mistake – really duplicated output.

As this did not happen in Karaf 2, 3 and 4.0.4 I think this could be bug
in the new boot feature “framework” which has been added in 4.0.5.

It seems that the whole core is restarted when the custom logging
fragment is there.

Do you agree with me and should I raise a Jira issue for that? And in
case this is a bug – do you have an idea for a workaround? Or could it
be an implementation mistake of the appender?

We ship a custom distribution to our customers and this behavior is a
no-go because they could think that something failed even at the end the
application has started correctly.

It does not make a good impression when the customers are faced with
some strange messages even at the first start.

TIA & Regards

   Volker


CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711
7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.com
Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen,
Oelsnitz, Ratingen, Saarbruecken
Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt
Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des
Aufsichtsrats), Hubert Leypoldt, Andreas Karrer
Bankverbindungen:
Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166
1040 00 SWIFT-CODE : DEUTDESS,
Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532
0155 00 SWIFT-Code : COBADEFF600,
Registergericht: Amtsgericht Stuttgart
Handelsregister: HRB Nr. 19117
Umsatzsteuer: ID-Nr. DE 147 862 777

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to