pinpoint-apm/pinpoint · error · IllegalStateException
unsupported profile or profile alias:
Error message
unsupported profile or profile alias:
What it means
Thrown by ProfilePropertyLoader.getActiveProfile when the configured profile value is neither one of the supported profile names nor a registered alias defined via pinpoint.profile.alias.<profile> in the root config. The loader validates the active profile against known names (with alias resolution) and rejects unknown values.
Source
Thrown at agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java:146
}
// prevent directory traversal attack
for (Path supportedProfile : supportedProfiles) {
if (supportedProfile.toString().equalsIgnoreCase(profile)) {
return supportedProfile.toString();
}
}
// handle alias
for (Path supportedProfile : supportedProfiles) {
String supportedProfileName = supportedProfile.toString();
String aliasesStr = getProfileProperties(defaultProperties, ProfileConstants.PROFILE_ALIAS_KEY_PREFIX + supportedProfileName);
if (containsAlias(aliasesStr, profile)) {
logger.info(String.format("resolved profile alias '%s' to supported profile '%s'", profile, supportedProfileName));
return supportedProfileName;
}
}
throw new IllegalStateException("unsupported profile or profile alias:" + profile);
}
private String getProfileProperties(Properties defaultProperties, String key) {
// env option support??
// String envProfile = System.getenv(ACTIVE_PROFILE_KEY);
String value = javaSystemProperty.getProperty(key);
if (value == null) {
value = defaultProperties.getProperty(key);
}
return value;
}
private void loadProperties(Properties dstProperties, Properties property) {
Map<Object, Object> copy = PropertyLoaderUtils.filterAllowedPrefix(property);
dstProperties.putAll(copy);
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Use a supported profile name exactly as listed in the error message (e.g. release)
- Register your custom name as an alias: add pinpoint.profile.alias.release=prod to pinpoint-root.config
- Fix typos and casing in the -Dpinpoint.active.profile value (trim stray whitespace)
- Check the root config actually loaded (correct file path) so the alias definitions are visible
Example fix
// before -Dpinpoint.active.profile=prod // not a supported profile // after (option A) -Dpinpoint.active.profile=release // after (option B: keep 'prod' as alias) # pinpoint-root.config pinpoint.profile.alias.release=prod
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Set.of("local","test","release");
String p = System.getProperty("pinpoint.active.profile");
if (p != null && !valid.contains(p)) { log.warn("profile '{}' not supported; use {} or define pinpoint.profile.alias", p, valid); } Try / catch
try { loadProfile(); } catch (IllegalStateException e) { if (e.getMessage().startsWith("unsupported profile")) { log.error("check -Dpinpoint.active.profile and pinpoint.profile.alias entries"); } throw e; } Prevention
- Only use names from the supportedProfiles list
- Declare custom names as aliases in pinpoint-root.config (pinpoint.profile.alias.release=prod)
- Trim whitespace and watch casing in VM options
- Keep profile names consistent across environments/scripts
When it happens
Trigger: Setting -Dpinpoint.active.profile=prod (or any typo/custom value) when supported profiles are e.g. local/test/release and no alias maps the value to a supported profile.
Common situations: Typo in profile name (PROD vs release); reusing custom profile names from other frameworks; forgetting to declare pinpoint.profile.alias.release=prod in pinpoint-root.config; case/whitespace mismatches.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Failed to detect pinpoint profile. Please add -Dpinpoint.act
- Unknown AgentType:
- %s load fail Caused by:%s
- UNSUPPORTED_OPERATION
- startTime not recorded
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/3a1a1f24978b0476.
Report an issue: GitHub.