{"record":{"id":"01205422a1894df4","repo":"alibaba/canal","slug":"can-t-find-destination","errorCode":null,"errorMessage":"can't find destination:","messagePattern":"can't find destination:","errorType":"exception","errorClass":"CanalServerException","httpStatus":null,"severity":"error","filePath":"deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java","lineNumber":381,"sourceCode":"        String managerAddress = getProperty(properties,\n            CanalConstants.getInstanceManagerAddressKey(CanalConstants.GLOBAL_NAME));\n        if (StringUtils.isNotEmpty(managerAddress)) {\n            if (StringUtils.equals(managerAddress, \"${canal.admin.manager}\")) {\n                managerAddress = adminManagerAddress;\n            }\n\n            globalConfig.setManagerAddress(managerAddress);\n        }\n\n        String springXml = getProperty(properties, CanalConstants.getInstancSpringXmlKey(CanalConstants.GLOBAL_NAME));\n        if (StringUtils.isNotEmpty(springXml)) {\n            globalConfig.setSpringXml(springXml);\n        }\n\n        instanceGenerator = destination -> {\n            InstanceConfig config = instanceConfigs.get(destination);\n            if (config == null) {\n                throw new CanalServerException(\"can't find destination:\" + destination);\n            }\n\n            if (config.getMode().isManager()) {\n                PlainCanalInstanceGenerator instanceGenerator = new PlainCanalInstanceGenerator(properties);\n                instanceGenerator.setCanalConfigClient(managerClients.get(config.getManagerAddress()));\n                instanceGenerator.setSpringXml(config.getSpringXml());\n                return instanceGenerator.generate(destination);\n            } else if (config.getMode().isSpring()) {\n                SpringCanalInstanceGenerator instanceGenerator = new SpringCanalInstanceGenerator();\n                instanceGenerator.setSpringXml(config.getSpringXml());\n                return instanceGenerator.generate(destination);\n            } else {\n                throw new UnsupportedOperationException(\"unknown mode :\" + config.getMode());\n            }\n\n        };\n\n        return globalConfig;","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java#L363-L399","documentation":"Thrown inside the instanceGenerator lambda when a destination name requested for startup is not present in the instanceConfigs map. instanceConfigs is populated from canal.destinations (or the destinations expression). When Canal tries to create an instance for a destination that was never declared, it throws CanalServerException. This fires at the moment a client subscribes to or Canal starts an unconfigured destination.","triggerScenarios":"A client subscribes to destination 'X', but canal.destinations does not list 'X' and no spring/manager instance config exists for it; or an auto-scan picked up a directory but the destination name differs by case/whitespace.","commonSituations":"Destination name mismatch between client config and canal.destinations; a typo; missing instance properties file under conf/; when using manager mode, the destination not registered in canal-manager.","solutions":["Add the destination to canal.destinations (comma-separated) or to the destinations expression.","Create the instance config (conf/<destination>/instance.properties, or register it in canal-manager for MANAGER mode).","Verify the client subscribes to the exact destination name (case-sensitive).","If using auto-scan (spring mode), confirm the conf/<destination> directory exists and is readable."],"exampleFix":"# before (canal.properties)\ncanal.destinations = example\n# client subscribes to 'orders'\n# after\ncanal.destinations = example,orders","handlingStrategy":"validation","validationCode":"// Before subscribing, confirm the destination is configured\nString destinations = CanalController.getDestinations(properties);\nSet<String> configured = new HashSet<>(Arrays.asList(destinations.split(\",\")));\nif (!configured.contains(destination)) {\n    throw new IllegalArgumentException(\"Destination '\" + destination + \"' is not in canal.destinations: \" + destinations);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Declare every destination in canal.destinations or via the destinations expression.","For spring mode, create conf/<destination>/instance.properties.","For manager mode, register the destination in canal-admin.","Subscribe using the exact destination name (case-sensitive)."],"tags":["config","destination","startup","deployer"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}