{"record":{"id":"899bf3915e8bb4b4","repo":"pinpoint-apm/pinpoint","slug":"failed-to-detect-pinpoint-profile-please-add-dpi","errorCode":null,"errorMessage":"Failed to detect pinpoint profile. Please add -Dpinpoint.active.profile=<profile> to VM option. Valid profiles are \"<supportedProfiles>\". Profile aliases are defined in pinpoint-root.config with the format: pinpoint.profile.alias.<profile>=<alias1>,<alias2>...","messagePattern":"Failed to detect pinpoint profile\\. Please add -Dpinpoint\\.active\\.profile=<profile> to VM option\\. Valid profiles are \"<supportedProfiles>\"\\. Profile aliases are defined in pinpoint-root\\.config with the format: pinpoint\\.profile\\.alias\\.<profile>=<alias1>,<alias2>\\.\\.\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java","lineNumber":122,"sourceCode":"        loadProperties(defaultProperties, this.javaSystemProperty);\n\n        // root path\n        saveAgentRootPath(agentRootPath, defaultProperties);\n\n        // log path\n        return defaultProperties;\n    }\n\n    private void saveAgentRootPath(Path agentRootPath, Properties properties) {\n        properties.put(AGENT_ROOT_PATH_KEY, agentRootPath);\n        logger.info(String.format(\"agent root path:%s\", agentRootPath));\n    }\n\n\n    private String getActiveProfile(Properties defaultProperties) {\n        String profile = getProfileProperties(defaultProperties, ProfileConstants.ACTIVE_PROFILE_KEY);\n        if (profile == null) {\n            throw new RuntimeException(\"Failed to detect pinpoint profile. Please add -D\" +\n                    ProfileConstants.ACTIVE_PROFILE_KEY +\n                    \"=<profile> to VM option. Valid profiles are \\\"\" + supportedProfiles + \"\\\". \" +\n                    \"Profile aliases are defined in pinpoint-root.config with the format: \" +\n                    ProfileConstants.PROFILE_ALIAS_KEY_PREFIX + \"<profile>=<alias1>,<alias2>...\"\n            );\n        }\n\n        // prevent directory traversal attack\n        for (Path supportedProfile : supportedProfiles) {\n            if (supportedProfile.toString().equalsIgnoreCase(profile)) {\n                return supportedProfile.toString();\n            }\n        }\n\n        // handle alias\n        for (Path supportedProfile : supportedProfiles) {\n            String supportedProfileName = supportedProfile.toString();\n            String aliasesStr = getProfileProperties(defaultProperties, ProfileConstants.PROFILE_ALIAS_KEY_PREFIX + supportedProfileName);","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java#L104-L140","documentation":"Thrown by ProfilePropertyLoader.getActiveProfile when the pinpoint.active.profile key is absent from the resolved default properties (and not supplied as a VM option). Pinpoint requires an explicit active profile to select which profile config files to load, so startup aborts with guidance on the valid profiles and alias mechanism.","triggerScenarios":"Starting the pinpoint agent without -Dpinpoint.active.profile=<profile> and without that key defined in the root config files (pinpoint-root.config).","commonSituations":"Fresh agent installation not yet configured; upgrading agents and the old config lacked the profile key; copying pinpoint.config without the root profile settings; CI containers launched with minimal VM options.","solutions":["Add -Dpinpoint.active.profile=release (or local/test) to the target JVM's options","Set pinpoint.active.profile=<profile> in pinpoint-root.config so it is picked up from properties","Check the message's supportedProfiles list and use one of those values or a defined alias","When using the PinpointAgent/agent-dir start scripts, ensure the profile VM option is passed through, e.g. via $PINPOINT_AGENT_VM_ARGS or the script's profile flag"],"exampleFix":"// before\njava -javaagent:pinpoint-bootstrap.jar -jar app.jar // no profile specified\n// after\njava -javaagent:pinpoint-bootstrap.jar -Dpinpoint.active.profile=release -jar app.jar","handlingStrategy":"validation","validationCode":"String profile = System.getProperty(\"pinpoint.active.profile\");\nif (profile == null || profile.isEmpty()) { throw new IllegalStateException(\"set -Dpinpoint.active.profile=local|test|release\"); }","typeGuard":null,"tryCatchPattern":"try { startAgent(args); } catch (RuntimeException e) { if (e.getMessage().contains(\"Failed to detect pinpoint profile\")) { log.error(\"add -Dpinpoint.active.profile=<profile> to JVM options\"); } throw e; }","preventionTips":["Always include -Dpinpoint.active.profile in launch scripts/templates","Set the key in pinpoint-root.config as a safe default","Add the option to container/CI JVM argument conventions"],"tags":["java","pinpoint","configuration","agent-startup"],"backgroundTag":"missing-required-config-field","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}