{"record":{"id":"0740396441f4deb8","repo":"fluent/fluentd","slug":"there-is-no-discovery-manager-skip-start-them","errorCode":null,"errorMessage":"There is no discovery_manager. skip start them","messagePattern":"There is no discovery_manager\\. skip start them","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/fluent/plugin_helper/service_discovery.rb","lineNumber":40,"sourceCode":"    module ServiceDiscovery\n      include Fluent::PluginHelper::Timer\n\n      # For the compatibility with older versions without `param_name: :service_discovery_configs`\n      attr_reader :service_discovery\n\n      def self.included(mod)\n        mod.include ServiceDiscoveryParams\n      end\n\n      def configure(conf)\n        super\n        # For the compatibility with older versions without `param_name: :service_discovery_configs`\n        @service_discovery = @service_discovery_configs\n      end\n\n      def start\n        unless @discovery_manager\n          log.warn('There is no discovery_manager. skip start them')\n          super\n          return\n        end\n\n        @discovery_manager.start\n        unless @discovery_manager.static_config?\n          timer_execute(@_plugin_helper_service_discovery_title, @_plugin_helper_service_discovery_interval) do\n            @discovery_manager.run_once\n          end\n        end\n\n        super\n      end\n\n      %i[after_start stop before_shutdown shutdown after_shutdown close terminate].each do |mth|\n        define_method(mth) do\n          @discovery_manager&.__send__(mth)\n          super()","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin_helper/service_discovery.rb#L22-L58","documentation":"The service_discovery plugin helper's start checks @discovery_manager, which is built during configure when the plugin actually set up service discovery (service_discovery_configure). If it is nil — the plugin included the helper but never configured a discovery manager (no <service_discovery> sections and no explicit configure call) — start warns, calls super, and returns without starting discovery or its refresh timer. The plugin continues without dynamic service discovery.","triggerScenarios":"A custom plugin includes Fluent::PluginHelper::ServiceDiscovery but its configure phase never calls service_discovery_configure / defines service_discovery_sections, so @discovery_manager stays nil when start runs.","commonSituations":"Plugin authors including every helper by habit; plugins where service discovery is optional and only configured via <service_discovery> blocks that the user omitted.","solutions":["If dynamic discovery is not used, remove the include of the ServiceDiscovery helper (or accept the harmless warning).","If discovery is expected, ensure service_discovery_configure(...) is called in the plugin's configure and that <service_discovery> sections are present in the config.","For out_forward users, provide at least one <server> or <service_discovery> block so configuration is complete."],"exampleFix":"# before (helper included but never configured -> warning on start)\nclass MyOutput < Fluent::Plugin::Output\n  Fluent::Plugin.register_output('my_out', self)\n  helpers :service_discovery\n  # configure never calls service_discovery_configure\nend\n\n# after\nclass MyOutput < Fluent::Plugin::Output\n  Fluent::Plugin.register_output('my_out', self)\n  helpers :service_discovery\n\n  def configure(conf)\n    super\n    service_discovery_configure(:my_out_service_discovery) do\n      # discovery entries...\n    end\n  end\nend","handlingStrategy":"validation","validationCode":"# In plugin tests: assert the discovery manager was built before start runs\nplugin.configure(conf)\nraise 'service discovery configured but manager missing' if conf.has_key?('service_discovery') && plugin.instance_variable_get(:@discovery_manager).nil?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only include the service_discovery helper in plugins that actually configure it.","Call service_discovery_configure inside configure so @discovery_manager exists before start.","Treat this warning in production configs as a signal that an expected <service_discovery> section was omitted."],"tags":["service-discovery","plugin-helper","configuration"],"backgroundTag":"missing-component-configuration","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}