{"record":{"id":"8823673f32e37160","repo":"alibaba/nacos","slug":"unsupported-nacos-deployment-type-type","errorCode":null,"errorMessage":"Unsupported nacos deployment type {type}","messagePattern":"Unsupported nacos deployment type (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"bootstrap/src/main/java/com/alibaba/nacos/bootstrap/NacosBootstrap.java","lineNumber":64,"sourceCode":"    private static final String SPRING_JMX_ENABLED = \"spring.jmx.enabled\";\n    \n    public static void main(String[] args) {\n        String type = System.getProperty(Constants.NACOS_DEPLOYMENT_TYPE,\n            Constants.NACOS_DEPLOYMENT_TYPE_MERGED);\n        DeploymentType deploymentType = DeploymentType.getType(type);\n        EnvUtil.setDeploymentType(deploymentType);\n        switch (deploymentType) {\n            case MERGED:\n                startWithConsole(args);\n                break;\n            case SERVER:\n                startWithoutConsole(args);\n                break;\n            case CONSOLE:\n                startOnlyConsole(args);\n                break;\n            default:\n                throw new IllegalArgumentException(\"Unsupported nacos deployment type \" + type);\n        }\n    }\n    \n    private static void prepareCoreContext(ConfigurableApplicationContext coreContext) {\n        if (coreContext.getEnvironment().getProperty(SPRING_JMX_ENABLED, Boolean.class, false)) {\n            // Avoid duplicate registration MBean to exporter.\n            coreContext.getBean(MBeanExporter.class)\n                .setRegistrationPolicy(RegistrationPolicy.IGNORE_EXISTING);\n        }\n    }\n    \n    private static void startWithoutConsole(String[] args) {\n        ConfigurableApplicationContext coreContext = startCoreContext(args);\n        prepareCoreContext(coreContext);\n        ConfigurableApplicationContext webContext = startServerWebContext(args, coreContext);\n        if (isEnabledAiRegistry(coreContext)) {\n            ConfigurableApplicationContext aiRegistryContext =\n                startAiRegistryContext(args, coreContext);","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/bootstrap/src/main/java/com/alibaba/nacos/bootstrap/NacosBootstrap.java#L46-L82","documentation":"NacosBootstrap switches on the resolved DeploymentType enum (MERGED, SERVER, CONSOLE). The default branch catches any other value and throws IllegalArgumentException with the offending type. The '{type}' in the message is the string form of the runtime variable (the source concatenates the 'type' variable).","triggerScenarios":"Starting the Nacos server with nacos.deployment.type (or -Dnacos.deployment.type) set to an unrecognized string; passing a typo'd enum value.","commonSituations":"Typo in deployment config (e.g. 'CONSOLE_ONLY', 'STANDALONE', 'ALL'); custom orchestration injecting an unsupported mode; mismatch between config and the supported enum set across versions.","solutions":["Set nacos.deployment.type to one of: MERGED, SERVER, CONSOLE.","Leave the property unset to use the default deployment type for your distribution.","Check the spelling and case against the DeploymentType enum in bootstrap."],"exampleFix":"# before\nnacos.deployment.type=STANDALONE   # unsupported -> 559\n\n# after\n# either omit, or use a supported value:\nnacos.deployment.type=MERGED","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"MERGED\", \"SERVER\", \"CONSOLE\");\nString type = System.getProperty(\"nacos.deployment.type\", \"\");\nif (!type.isEmpty() && !allowed.contains(type.toUpperCase())) {\n    throw new IllegalStateException(\"Unsupported nacos.deployment.type: \" + type);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only MERGED, SERVER, or CONSOLE for nacos.deployment.type.","Leave the property unset to rely on the distribution default.","Add a startup smoke test that fails fast on a typo'd deployment type."],"tags":["bootstrap","startup","config","deployment","enum"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}