alibaba/nacos · error · PluginPersistenceException
Failed to read plugin persistence file: {fileName}
Error message
Failed to read plugin persistence file: {fileName} What it means
Error "Failed to read plugin persistence file: {fileName}" thrown in alibaba/nacos.
Source
Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java:246
}
private <T> T readJsonFromFile(String fileName, TypeReference<T> typeRef,
boolean failOnError) {
Path filePath = Paths.get(dataDir, fileName);
if (!Files.exists(filePath)) {
return createEmptyMap(typeRef);
}
try {
String content = new String(Files.readAllBytes(filePath), StandardCharsets.UTF_8);
if (StringUtils.isBlank(content)) {
return createEmptyMap(typeRef);
}
return JacksonUtils.toObj(content, typeRef);
} catch (Exception e) {
LOGGER.error("[FilePluginStatePersistenceImpl] Failed to read file: {}", fileName, e);
if (failOnError) {
throw new PluginPersistenceException(
"Failed to read plugin persistence file: " + fileName, e);
}
return createEmptyMap(typeRef);
}
}
@SuppressWarnings("unchecked")
private <T> T createEmptyMap(TypeReference<T> typeRef) {
return (T) new HashMap<>(16);
}
private void writeJsonToFile(String fileName, Object data) throws IOException {
ensureDataDirExists();
Path filePath = Paths.get(dataDir, fileName);
String content = JacksonUtils.toJson(data);
Files.write(filePath, content.getBytes(StandardCharsets.UTF_8));
}
}View on GitHub (pinned to 9b989acdf1)
Solutions
- Inspect the server logs for the underlying cause, fix it, and retry the operation.
When it happens
Trigger: Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java:246 when the library encounters an invalid state.
Common situations: Reading a plugin persistence file from disk failed.
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/90cf299832b71f09.
Report an issue: GitHub.