You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/10/20 10:52:43 UTC
(pulsar) branch master updated: [improve][doc] Warn about /tmp cleanup in narExtractionDirectory docs (#27011)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 091119d74ee5 [improve][doc] Warn about /tmp cleanup in narExtractionDirectory docs (#27011)
091119d74ee5 is described below
commit 091119d74ee5f812924d880917f49a1731629b4b
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Tue Oct 20 13:52:35 2026 +0300
[improve][doc] Warn about /tmp cleanup in narExtractionDirectory docs (#27011)
---
conf/broker.conf | 3 +++
conf/functions_worker.yml | 5 +++++
conf/proxy.conf | 8 ++++++++
conf/standalone.conf | 3 +++
.../main/java/org/apache/pulsar/broker/ServiceConfiguration.java | 5 ++++-
.../java/org/apache/pulsar/functions/worker/WorkerConfig.java | 5 ++++-
.../java/org/apache/pulsar/proxy/server/ProxyConfiguration.java | 5 ++++-
7 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/conf/broker.conf b/conf/broker.conf
index e5b63a644f2d..7b6693302e38 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -2252,6 +2252,9 @@ managedLedgerOffloadReadThreads=2
# The extraction directory of the nar package.
# Available for Protocol Handler, Additional Servlets, Entry Filter, Offloaders, Broker Interceptor.
# Default is System.getProperty("java.io.tmpdir").
+# Outside of Kubernetes, OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while
+# the broker is running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case, set this
+# to a dedicated directory that isn't cleaned up automatically.
narExtractionDirectory=
# Maximum prefetch rounds for ledger reading for offloading
diff --git a/conf/functions_worker.yml b/conf/functions_worker.yml
index 1a13e361b13d..d2faca7a0daf 100644
--- a/conf/functions_worker.yml
+++ b/conf/functions_worker.yml
@@ -494,6 +494,11 @@ functionsDirectory: ./functions
enableReferencingFunctionsDirectoryFiles: true
# Regex patterns for enabling creation of functions by referencing packages in matching http/https urls
additionalEnabledFunctionsUrlPatterns: []
+# The extraction directory of the nar package. Default is System.getProperty("java.io.tmpdir").
+# Outside of Kubernetes, OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while
+# the functions worker is running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case,
+# set this to a dedicated directory that isn't cleaned up automatically.
+# narExtractionDirectory: /path/to/extracted-nars
# Enables extended validation for connector config with fine-grain annotation based validation
# during submission. Classloading with either enableClassloadingOfExternalFiles or
diff --git a/conf/proxy.conf b/conf/proxy.conf
index 42259724f50e..b6ac397473cf 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -488,6 +488,14 @@ clusterName=
# The directory to locate extensions
#proxyExtensionsDirectory=
+# The extraction directory of the nar package.
+# Available for Proxy Extensions and Additional Servlets.
+# Default is System.getProperty("java.io.tmpdir").
+# Outside of Kubernetes, OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while
+# the proxy is running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case, set this
+# to a dedicated directory that isn't cleaned up automatically.
+narExtractionDirectory=
+
### --- Deprecated config variables --- ###
# Deprecated. Use configurationStoreServers
diff --git a/conf/standalone.conf b/conf/standalone.conf
index a2e0ae3d0606..856f42a5347f 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -1494,6 +1494,9 @@ schemaCompatibilityStrategy=FULL
# The extraction directory of the nar package.
# Available for Protocol Handler, Additional Servlets, Entry Filter, Offloaders, Broker Interceptor.
# Default is System.getProperty("java.io.tmpdir").
+# Outside of Kubernetes, OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while
+# the broker is running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case, set this
+# to a dedicated directory that isn't cleaned up automatically.
narExtractionDirectory=
### --- Deprecated config variables --- ###
diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index ec8fe5780840..aad42b38fb59 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -4169,7 +4169,10 @@ public class ServiceConfiguration implements PulsarConfiguration {
@FieldContext(
category = CATEGORY_STORAGE_OFFLOADING,
- doc = "The directory where nar Extraction of offloaders happens"
+ doc = "The directory where nar packages are extracted. Default is java.io.tmpdir. Outside of Kubernetes,"
+ + " OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while the broker is"
+ + " running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case, set this"
+ + " to a dedicated directory that isn't cleaned up automatically."
)
private String narExtractionDirectory = NarClassLoader.DEFAULT_NAR_EXTRACTION_DIR;
diff --git a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
index 66d97108a479..a20fc33f6e8f 100644
--- a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
+++ b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
@@ -280,7 +280,10 @@ public class WorkerConfig implements Serializable, PulsarConfiguration {
private String connectorsDirectory = "./connectors";
@FieldContext(
category = CATEGORY_CONNECTORS,
- doc = "The directory where nar packages are extractors"
+ doc = "The directory where nar packages are extracted. Default is java.io.tmpdir. Outside of Kubernetes,"
+ + " OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while the functions"
+ + " worker is running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case,"
+ + " set this to a dedicated directory that isn't cleaned up automatically."
)
private String narExtractionDirectory = NarClassLoader.DEFAULT_NAR_EXTRACTION_DIR;
@FieldContext(
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
index 169c9acb56d7..fca7ec0fc41f 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
@@ -359,7 +359,10 @@ public class ProxyConfiguration implements PulsarConfiguration {
@FieldContext(
category = CATEGORY_SERVER,
- doc = "The directory where nar Extraction happens"
+ doc = "The directory where nar packages are extracted. Default is java.io.tmpdir. Outside of Kubernetes,"
+ + " OS cleanup of /tmp (for example, by systemd-tmpfiles) can delete extracted files while the proxy is"
+ + " running, which causes ClassNotFoundException or NoClassDefFoundError errors. In that case, set"
+ + " this to a dedicated directory that isn't cleaned up automatically."
)
private String narExtractionDirectory = NarClassLoader.DEFAULT_NAR_EXTRACTION_DIR;