pinpoint-apm/pinpoint · warning
is not a directory
Error message
is not a directory
What it means
AgentDirBaseClassPathResolver.resolvePlugins() logs this warning when the configured plugin directory path fails the checkDirectory() guard, i.e. the path either does not exist or exists but is not a directory. The resolver then returns an empty plugin list, so the agent boots without any plugins loaded. It is a diagnostic warning, not a thrown exception.
Solutions
- Verify the plugin directory path actually exists: ls <agentDir>/plugin
- If the path points at a JAR file, point it at the parent directory instead
- Set -Dpinpoint.agent.pluginDir to a valid absolute directory path
- Re-install/extract the Pinpoint agent distribution so the plugin folder exists
- Check logs for the companion 'not found' vs 'is not a directory' warning to distinguish the two cases
Example fix
// before (launch script) JAVA_OPTS="$JAVA_OPTS -Dpinpoint.agent.pluginDir=$AGENT_HOME/plugin/pinpoint-bootstrap-core.jar" // after JAVA_OPTS="$JAVA_OPTS -Dpinpoint.agent.pluginDir=$AGENT_HOME/plugin"
Defensive patterns
Strategy: validation
Validate before calling
java.nio.Path p = Paths.get(pluginDir); if (!java.nio.Files.isDirectory(p)) { throw new IllegalArgumentException(pluginDir + " is not a directory"); } Prevention
- Always pass a directory path (not a JAR) to pluginDir/libDir options
- Use absolute paths resolved from AGENT_HOME
- Verify the agent distribution layout after extraction
- Add a pre-start script that checks required directories exist
When it happens
Trigger: Starting the Pinpoint agent when -Dpinpoint.agent.pluginDir (or the default ${AGENT_HOME}/plugin) points to a nonexistent path or to a regular file instead of a directory.
Common situations: AGENT_HOME misconfigured in the launch script; plugin dir renamed or deleted during upgrade; user pointed pluginDir at the plugin JAR file itself instead of the containing directory; packaged distribution missing the plugin folder.
Related errors
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/e921742eabead76b.
Report an issue: GitHub.
Appendix: source
Thrown at agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/AgentDirBaseClassPathResolver.java:154
if (checkDirectory(agentLibPath)) {
return Collections.emptyList();
}
final List<Path> libFileList = FileUtils.listFiles(agentLibPath, EXTENSIONS);
if (libFileList.isEmpty()) {
throw new RuntimeException(agentLibPath + " lib dir is empty");
}
// add directory
libFileList.add(agentLibPath);
return libFileList;
}
private List<Path> resolvePlugins(Path agentPluginPath) {
if (checkDirectory(agentPluginPath)) {
logger.warn(agentPluginPath + " is not a directory");
return Collections.emptyList();
}
final List<Path> jars = FileUtils.listFiles(agentPluginPath, "*.jar");
if (jars.isEmpty()) {
return Collections.emptyList();
}
List<Path> pluginFileList = filterReadPermission(jars);
for (Path pluginJar : pluginFileList) {
logger.info("plugin path:" + FileUtils.subpathAfterLast(pluginJar, 2));
}
return pluginFileList;
}
private boolean checkDirectory(Path file) {
if (!Files.exists(file)) {
logger.warn(file + " not found");View on GitHub (pinned to 744c3d3075)