{"record":{"id":"2713a055edf3339d","repo":"goharbor/harbor","slug":"protocol-in-external-log-endpoint-must-be-one-of","errorCode":null,"errorMessage":"Protocol in external log endpoint must be one of 'udp' or 'tcp' ","messagePattern":"Protocol in external log endpoint must be one of 'udp' or 'tcp' ","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"make/photon/prepare/utils/configs.py","lineNumber":43,"sourceCode":"        raise Exception(\"Please specify hostname\")\n\n    # protocol validate\n    protocol = conf.get(\"protocol\")\n    if protocol == \"https\":\n        if not conf.get(\"cert_path\") or conf[\"cert_path\"] == default_https_cert_path:\n            raise Exception(\"Error: The protocol is https but attribute ssl_cert is not set\")\n        if not conf.get(\"cert_key_path\") or conf['cert_key_path'] == default_https_key_path:\n            raise Exception(\"Error: The protocol is https but attribute ssl_cert_key is not set\")\n    if protocol == \"http\":\n        logging.warning(\"WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https\")\n\n    # log endpoint validate\n    if ('log_ep_host' in conf) and not conf['log_ep_host']:\n        raise Exception('Error: must set log endpoint host to enable external host')\n    if ('log_ep_port' in conf) and not conf['log_ep_port']:\n        raise Exception('Error: must set log endpoint port to enable external host')\n    if ('log_ep_protocol' in conf) and (conf['log_ep_protocol'] not in ['udp', 'tcp']):\n        raise Exception(\"Protocol in external log endpoint must be one of 'udp' or 'tcp' \")\n\n    # Storage validate\n    valid_storage_drivers = [\"filesystem\", \"azure\", \"gcs\", \"s3\", \"swift\", \"oss\"]\n    storage_provider_name = conf.get(\"storage_provider_name\")\n    if storage_provider_name not in valid_storage_drivers:\n        raise Exception(\"Error: storage driver %s is not supported, only the following ones are supported: %s\" % (\n            storage_provider_name, \",\".join(valid_storage_drivers)))\n\n    # original is registry_storage_provider_config\n    storage_provider_config = conf.get(\"storage_provider_config\")\n    if storage_provider_name != \"filesystem\":\n        if storage_provider_config == \"\":\n            raise Exception(\n                \"Error: no provider configurations are provided for provider %s\" % storage_provider_name)\n    # ca_bundle validate\n    if conf.get('registry_custom_ca_bundle_path'):\n        registry_custom_ca_bundle_path = conf.get('registry_custom_ca_bundle_path') or ''\n        if registry_custom_ca_bundle_path.startswith('/data/'):","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/make/photon/prepare/utils/configs.py#L25-L61","documentation":"Thrown by validate() in make/photon/prepare/utils/configs.py when the external log endpoint's protocol is not exactly 'udp' or 'tcp'. Harbor configures the Docker syslog log-driver with this protocol, and the driver only accepts those two values, so anything else would make the harbor-core/log shipper fail at runtime.","triggerScenarios":"harbor.yml has 'log.external_endpoint.protocol:' set to anything other than lowercase 'udp' or 'tcp' — e.g. 'UDP', 'TCP', 'tls', or 'udp ' with trailing space. The comparison conf['log_ep_protocol'] not in ['udp', 'tcp'] is case- and whitespace-sensitive.","commonSituations":"Copy-pasting from syslog/RSyslog docs where uppercase is used; assuming 'tls' is valid for syslog shipping; values pasted with invisible whitespace.","solutions":["Set 'protocol:' to lowercase 'udp' or 'tcp' exactly","If the receiver expects TLS syslog, front it with a local relay (e.g. rsyslog) and point Harbor at that with tcp/udp","Re-run ./install.sh"],"exampleFix":"# harbor.yml (before)\nexternal_endpoint:\n  protocol: UDP\n  host: logs.example.com\n  port: 514\n\n# harbor.yml (after)\nexternal_endpoint:\n  protocol: udp\n  host: logs.example.com\n  port: 514","handlingStrategy":"validation","validationCode":"ep = (cfg.get('log') or {}).get('external_endpoint')\nif ep is not None and str(ep.get('protocol', '')).strip().lower() not in ('udp', 'tcp'):\n    raise SystemExit(\"log.external_endpoint.protocol must be 'udp' or 'tcp'\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use lowercase protocol values in harbor.yml","Trim whitespace when generating the file programmatically","Remember Harbor's syslog driver supports only udp and tcp, not tls"],"tags":["harbor","logging","syslog","configuration","validation"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}