apache/pulsar · error · RestException
<IOException message>
Error message
<IOException message>
What it means
reloadConnectors calls ConnectorsManager.reloadConnectors, which scans the connector directory from the worker config. If reading that directory or its connector archives/nar files throws an IOException, the worker converts it to an HTTP 500 Internal Server Error with the IOException's message.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java:1093
return this.worker().getConnectorsManager().getConnectorDefinitions();
}
@Override
public void reloadConnectors(AuthenticationParameters authParams) {
if (!isWorkerServiceAvailable()) {
throwUnavailableException();
}
if (worker().getWorkerConfig().isAuthorizationEnabled()) {
// Only superuser has permission to do this operation.
if (!isSuperUser(authParams)) {
throw new RestException(Status.UNAUTHORIZED, "This operation requires super-user access");
}
}
try {
this.worker().getConnectorsManager().reloadConnectors(worker().getWorkerConfig());
} catch (IOException e) {
throw new RestException(Status.INTERNAL_SERVER_ERROR, e.getMessage());
}
}
@Override
public String triggerFunction(final String tenant,
final String namespace,
final String functionName,
final String input,
final InputStream uploadedInputStream,
final String topic,
final AuthenticationParameters authParams) {
if (!isWorkerServiceAvailable()) {
throwUnavailableException();
}
throwRestExceptionIfUnauthorizedForNamespace(tenant, namespace, functionName, "trigger", authParams);
View on GitHub (pinned to 820761864e)
Solutions
- Verify connectorsDirectory in the worker config points to an existing, readable directory on the worker host.
- Check filesystem permissions for the worker process user on the connector directory and archives.
- Validate each .nar file (size, integrity); re-upload corrupted or partially copied connector archives.
- Inspect the IOException message in the HTTP 500 response / worker logs — it names the exact file or path that failed.
Example fix
// before (worker.conf) connectorsDirectory=/opt/pulsar/connect-old // after connectorsDirectory=/opt/pulsar/connectors # must exist and be readable by the worker user
Defensive patterns
Strategy: validation
Validate before calling
import java.nio.file.*;
static void assertConnectorsDirReadable(Path dir) throws IOException {
if (!Files.isDirectory(dir)) throw new IOException("not a directory: " + dir);
if (!Files.isReadable(dir)) throw new IOException("not readable: " + dir);
try (DirectoryStream<Path> s = Files.newDirectoryStream(dir, "*.nar")) {
for (Path p : s) { if (Files.size(p) == 0) throw new IOException("empty nar: " + p); }
}
} Try / catch
try { reload(); }
catch (PulsarAdminException e) {
if (e.getResponseStatus() == 500) { alert("connector dir problem: " + e.getMessage()); /* fs check */ }
else throw e;
} Prevention
- Mount connector .nar files as read-only volumes and verify after deploy
- Checksum connector archives post-upload
- Add a health check that lists the connectors directory at worker startup
When it happens
Trigger: POST /functions/connectors/reload where the connectorsDirectory does not exist, is unreadable (filesystem permissions), or a connector .nar/.jar file is corrupted or partially written during the scan.
Common situations: Wrong connectorsDirectory path after relocating connectors; NFS/mount not available on the worker host; truncated .nar files from an interrupted upload; running the worker as a user without read permission on the directory.
Understand the failure class
Background: Rust io::Error: what ErrorKind::NotFound, PermissionDenied, and InvalidData actually mean — from real OS failures to library fail-closed refusals — this error's family across 12 libraries.
Related errors
- Log folder creation error
- does not exists locally
- The specified jar file does not exist
- The specified python file does not exist
- The specified go executable binary does not exist
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/30154c400e2da805.
Report an issue: GitHub.