(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 resolve 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 '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' 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 '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' 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
.
23/06/2026 13:48 ..
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
The java versions
C:\opt\apache-karaf-4.4.11\bin>java -version
openjdk version "11.0.27" 2025-04-15
OpenJDK Runtime Environment Temurin-11.0.27+6 (build 11.0.27+6)
OpenJDK 64-Bit Server VM Temurin-11.0.27+6 (build 11.0.27+6, mixed mode)
C:\opt\apache-karaf-4.4.11\bin>java -version
openjdk version "17.0.14" 2025-01-21
OpenJDK Runtime Environment Temurin-17.0.14+7 (build 17.0.14+7)
OpenJDK 64-Bit Server VM Temurin-17.0.14+7 (build 17.0.14+7, mixed mode, sharing)
(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 resolve problem is to
(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 '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' 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 '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' 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
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
.23/06/2026 13:48 ..
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
The java versions
C:\opt\apache-karaf-4.4.11\bin>java -version
openjdk version "11.0.27" 2025-04-15
OpenJDK Runtime Environment Temurin-11.0.27+6 (build 11.0.27+6)
OpenJDK 64-Bit Server VM Temurin-11.0.27+6 (build 11.0.27+6, mixed mode)
C:\opt\apache-karaf-4.4.11\bin>java -version
openjdk version "17.0.14" 2025-01-21
OpenJDK Runtime Environment Temurin-17.0.14+7 (build 17.0.14+7)
OpenJDK 64-Bit Server VM Temurin-17.0.14+7 (build 17.0.14+7, mixed mode, sharing)