{"record":{"id":"25f03fe6d9359276","repo":"temporalio/temporal","slug":"there-is-no-addresstranslator-configuration-in-cas","errorCode":null,"errorMessage":"there is no addressTranslator configuration in cassandra configuration","messagePattern":"there is no addressTranslator configuration in cassandra configuration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go","lineNumber":54,"sourceCode":"// The returned rows, representing all other nodes in the cluster, contain IP addresses internal of that cluster.\n// They are not necessarily the same hostnames as the ones you would translate with your service resolver\n// (they are IP addresses, not hostnames, actually).\n//\n// For the case if the nodes are behind the proxy, service resolver would translate just the publicly\n// 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","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go#L36-L72","documentation":"FixedAddressTranslatorPlugin.GetTranslator requires a configured addressTranslator section because the fixed translator has nothing to do without one. If cfg.AddressTranslator is nil in the Cassandra config, the plugin returns this error instead of silently producing an identity translator.","triggerScenarios":"Calling translator.LookupTranslator(\"fixed\").GetTranslator(cfg) (as TestFixedAddressTranslator does) with a *config.Cassandra whose AddressTranslator field is nil, or the config YAML lacking the addressTranslator key while the fixed plugin is registered.","commonSituations":"Enabling the fixed translator plugin (e.g. behind a load balancer / mTLS SNI setups) but forgetting to add the addressTranslator block; a config merge dropping the section; using defaults that omit it.","solutions":["Add an addressTranslator block to the cassandra config with options.server-address and options.advertised-hostname (or the fixed translator's expected option keys)","If address translation is not needed, do not use the fixed translator plugin","Check the effective merged config (dynamicconfig + yaml) actually contains addressTranslator before selecting the plugin"],"exampleFix":"// before\ncassandra:\n  hosts: \"10.0.0.1\"\n  # addressTranslator missing\n// after\ncassandra:\n  hosts: \"10.0.0.1\"\n  addressTranslator:\n    options:\n      server-address: \"127.0.0.1\"\n      advertised-hostname: \"cassandra-0\"\n","handlingStrategy":"validation","validationCode":"if cfg.AddressTranslator == nil {\n    return errors.New(\"fixed translator selected but addressTranslator config section is missing\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only select the fixed translator when an addressTranslator block is present","Keep a canonical config sample including addressTranslator when using the plugin","Check effective merged config (yaml + dynamicconfig) before deploy"],"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"}