{"record":{"id":"de8f5528aa072385","repo":"fluent/fluentd","slug":"resolve-hostname-must-be-true-with-source-hostname","errorCode":null,"errorMessage":"resolve_hostname must be true with source_hostname_key","messagePattern":"resolve_hostname must be true with source_hostname_key","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/in_forward.rb","lineNumber":118,"sourceCode":"        config_param :host, :string, default: nil\n        desc 'Network address specification'\n        config_param :network, :string, default: nil\n        desc 'Shared key per client'\n        config_param :shared_key, :string, default: nil, secret: true\n        desc 'Array of username.'\n        config_param :users, :array, default: []\n      end\n    end\n\n    def configure(conf)\n      super\n\n      if @source_hostname_key\n        # TODO: add test\n        if @resolve_hostname.nil?\n          @resolve_hostname = true\n        elsif !@resolve_hostname # user specifies \"false\" in config\n          raise Fluent::ConfigError, \"resolve_hostname must be true with source_hostname_key\"\n        end\n      end\n      @enable_field_injection = @source_address_key || @source_hostname_key\n\n      raise Fluent::ConfigError, \"'tag' parameter must not be empty\" if @tag && @tag.empty?\n      raise Fluent::ConfigError, \"'add_tag_prefix' parameter must not be empty\" if @add_tag_prefix && @add_tag_prefix.empty?\n\n      if @security\n        if @security.user_auth && @security.users.empty?\n          raise Fluent::ConfigError, \"<user> sections required if user_auth enabled\"\n        end\n        if !@security.allow_anonymous_source && @security.clients.empty?\n          raise Fluent::ConfigError, \"<client> sections required if allow_anonymous_source disabled\"\n        end\n\n        @nodes = []\n\n        @security.clients.each do |client|","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/in_forward.rb#L100-L136","documentation":"Error \"resolve_hostname must be true with source_hostname_key\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/plugin/in_forward.rb:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}