gerbenasd opened a new issue, #2741:
URL: https://github.com/apache/karaf/issues/2741

   (a minor upgrade did not show this problem to me, bu might also be 
problematic)
   
   Simplest example: changes to file org.ops4j.pax.logging.cfg
   
   This is also seen with changes to files in the deploy directory (using 
camel-blueprint).
   This might be problematic in other situations as well.
   
   Way to resovle problem is to
    - stop karaf
    - remove data directory
    - start karaf  (changes to org.ops4j.pax.logging.cfg are reflected 
correctly)
    (this requires rebuilding the karaf instance to you needs)
   
   
   ### EXAMPLE
   
   Unpack a fresh download (apache-karaf-4.4.11.zip)
   Start karaf.bat using JAVA_HOME=C:\opt\Java\jdk-11.0.27+6
   Changes to org.ops4j.pax.logging.cfg are tracked, e.g. changing filename 
repeatedly:
        log4j2.appender.rolling.fileName = ${karaf.log}/karaf.log
        log4j2.appender.rolling.fileName = ${karaf.log}/karaf1.log
        log4j2.appender.rolling.fileName = ${karaf.log}/karaf2.log
   
   Stop and start using JAVA_HOME=C:\opt\Java\jdk-17.0.14+7
   This already creates unresponsiveness. Even reverting back to previous jdk 
will not help anymore.
   
   changing filename is not detected anymore (log:tail will show nothing about 
that change)
        log4j2.appender.rolling.fileName = ${karaf.log}/karaf3.log
   
   the logfile will remain karaf2.log
   
   
   
   
   ### EXAMPLE LOG
   ###  UNDER JDK 11
   C:\opt\apache-karaf-4.4.11\bin>set JAVA
   JAVA_HOME=C:\opt\Java\jdk-11.0.27+6
   
   C:\opt\apache-karaf-4.4.11\bin>time
   The current time is: 13:48:27,43
   Enter the new time:
   
   C:\opt\apache-karaf-4.4.11\bin>karaf.bat
   karaf.bat: KARAF_LOG doesn't exist: 
"C:\opt\apache-karaf-4.4.11\bin\..\data\log"
   karaf.bat: Creating "C:\opt\apache-karaf-4.4.11\bin\..\data\log"
           __ __                  ____
          / //_/____ __________ _/ __/
         / ,<  / __ `/ ___/ __ `/ /_
        / /| |/ /_/ / /  / /_/ / __/
       /_/ |_|\__,_/_/   \__,_/_/
   
     Apache Karaf (4.4.11)
   
   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()>
   
   C:\opt\apache-karaf-4.4.11\bin>time
   The current time is: 13:49:28,71
   Enter the new time:
   
   
   ### UNDER JDK 17
   C:\opt\apache-karaf-4.4.11\bin>set JAVA
   JAVA_HOME=C:\opt\Java\jdk-17.0.14+7
   
   C:\opt\apache-karaf-4.4.11\bin>time
   The current time is: 13:50:05,24
   Enter the new time:
   
   C:\opt\apache-karaf-4.4.11\bin>karaf.bat
           __ __                  ____
          / //_/____ __________ _/ __/
         / ,<  / __ `/ ___/ __ `/ /_
        / /| |/ /_/ / /  / /_/ / __/
       /_/ |_|\__,_/_/   \__,_/_/
   
     Apache Karaf (4.4.11)
   
   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()>
   
   C:\opt\apache-karaf-4.4.11\bin>time
   The current time is: 13:50:41,53
   Enter the new time:
   
   
   ### THE LOGFILES PRODUCED
   -  setting filename to karaf3.log is not reflected. karaf2.log remains active
   - (file karaf.log is touched somewhere when starting karaf)
   
   C:\opt\apache-karaf-4.4.11\data\log>dir
    Volume in drive C has no label.
    Volume Serial Number is 3E0A-A99D
   
    Directory of C:\opt\apache-karaf-4.4.11\data\log
   
   23/06/2026  13:49    <DIR>          .
   23/06/2026  13:48    <DIR>          ..
   23/06/2026  13:50            29.919 karaf.log
   23/06/2026  13:49               551 karaf1.log
   23/06/2026  13:50            29.085 karaf2.log
   23/06/2026  13:48                 0 security.log
                  4 File(s)         59.555 bytes
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to