{"record":{"id":"9ef64457a189f28e","repo":"temporalio/temporal","slug":"there-are-no-options-for-translator-plugin","errorCode":null,"errorMessage":"there are no options for translator plugin","messagePattern":"there are no options for translator plugin","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go","lineNumber":59,"sourceCode":"// visible hostname which a user put into configuration so driver can connect to it, but that is not enough,\n// IP addresses behind a proxy are not reachable from client's perspective. These are not translatable\n// with service resolver so client can not connect to them directly - that is what gocql address\n// translator is exactly for.\n//\n// The implementation of fixed address translator plugin is fed the internal IP address from the system.peers table,\n// and it will always return same fixed ip based on what advertised-hostname is resolved to. That IP address,\n// from client's perspective, might be, for example, an IP address of a load balancer which is reachable from client.\n// As the IP address of all nodes are some, the difference between the nodes can be achieved by running them on\n// a different port for each node.\n// see also https://github.com/gocql/gocql/pull/1635\nfunc (plugin *FixedAddressTranslatorPlugin) GetTranslator(cfg *config.Cassandra) (gocql.AddressTranslator, error) {\n\tif cfg.AddressTranslator == nil {\n\t\treturn nil, errors.New(\"there is no addressTranslator configuration in cassandra configuration\")\n\t}\n\n\topts := cfg.AddressTranslator.Options\n\tif opts == nil {\n\t\treturn nil, errors.New(\"there are no options for translator plugin\")\n\t}\n\n\tadvertisedHostname, found := opts[advertisedHostnameKey]\n\n\tif !found || len(advertisedHostname) == 0 {\n\t\treturn nil, errors.New(\"detected no advertised-hostname key or empty value for translator plugin options\")\n\t}\n\n\tvar resolvedIp net.IP = nil\n\tips, _ := net.LookupIP(advertisedHostname)\n\tfor _, ip := range ips {\n\t\tif ipv4 := ip.To4(); ipv4 != nil {\n\t\t\tresolvedIp = ipv4\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif resolvedIp == nil {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go#L41-L77","documentation":"GetTranslator of FixedAddressTranslatorPlugin reads cfg.AddressTranslator.Options, a string map, to learn the advertised hostname. When the addressTranslator section exists but its Options map is nil/empty, the plugin cannot build the translation rules and returns this error.","triggerScenarios":"Calling GetTranslator with cfg.AddressTranslator non-nil but cfg.AddressTranslator.Options == nil, e.g. YAML containing `addressTranslator:` with no `options:` sub-map.","commonSituations":"YAML with `addressTranslator:` key but nothing under it (indentation mistakes nesting options elsewhere); programmatic config constructing config.AddressTranslator{} without Options; config stripping empty maps.","solutions":["Add an options map under addressTranslator containing the required keys (advertised-hostname, server-address)","Fix YAML indentation so options is nested under addressTranslator","When building config in Go, initialize AddressTranslator.Options with the required entries"],"exampleFix":"// before\naddressTranslator: {}\n// after\naddressTranslator:\n  options:\n    server-address: \"127.0.0.1\"\n    advertised-hostname: \"cassandra-0\"\n","handlingStrategy":"validation","validationCode":"if cfg.AddressTranslator == nil || cfg.AddressTranslator.Options == nil {\n    return errors.New(\"addressTranslator requires a non-empty options map\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include both options keys (server-address, advertised-hostname) in templates","Beware YAML indentation: options must be nested under addressTranslator","Initialize Options map when constructing config.AddressTranslator programmatically"],"tags":["cassandra","address-translator","configuration"],"backgroundTag":"missing-config-section","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}