{"record":{"id":"0f7725953b7de102","repo":"alibaba/nacos","slug":"failed-to-replace-all-plugin-configs","errorCode":null,"errorMessage":"Failed to replace all plugin configs","messagePattern":"Failed to replace all plugin configs","errorType":"exception","errorClass":"PluginPersistenceException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java","lineNumber":155,"sourceCode":"                LOGGER.debug(\"[FilePluginStatePersistenceImpl] Saved plugin config for {}\",\n                    pluginId);\n            } catch (Exception e) {\n                throw new PluginPersistenceException(\"Failed to save plugin config: \" + pluginId,\n                    e);\n            }\n        }\n    }\n    \n    @Override\n    public void replaceAllConfigs(Map<String, Map<String, String>> configs) {\n        synchronized (configLock) {\n            try {\n                Map<String, Map<String, String>> configsToStore = configs == null\n                    ? new HashMap<>() : new HashMap<>(configs);\n                writeJsonToFile(PLUGIN_CONFIG_FILE, configsToStore);\n                LOGGER.debug(\"[FilePluginStatePersistenceImpl] Replaced all plugin configs\");\n            } catch (Exception e) {\n                throw new PluginPersistenceException(\"Failed to replace all plugin configs\", e);\n            }\n        }\n    }\n    \n    /**\n     * Load all plugin states.\n     *\n     * @return map of plugin ID to enabled state\n     */\n    @Override\n    public Map<String, Boolean> loadAllStates() {\n        synchronized (stateLock) {\n            return readJsonFromFile(PLUGIN_STATE_FILE, STATE_TYPE_REF);\n        }\n    }\n    \n    /**\n     * Load all plugin configurations.","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java#L137-L173","documentation":"Error \"Failed to replace all plugin configs\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/storage/FilePluginStatePersistenceImpl.java:155 when the library encounters an invalid state.","commonSituations":"Replacing all plugin configs on disk failed.","solutions":["Inspect the server logs for the underlying cause, fix it, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}