{"record":{"id":"8dc8d1b0ef594efd","repo":"fluent/fluentd","slug":"invalid-protocol-proto","errorCode":null,"errorMessage":"invalid protocol: #{proto}","messagePattern":"invalid protocol: #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin_helper/socket.rb","lineNumber":52,"sourceCode":"\n      include Fluent::PluginHelper::SocketOption\n\n      attr_reader :_sockets # for tests\n\n      # TODO: implement connection pool for specified host\n\n      def socket_create(proto, host, port, **kwargs, &block)\n        case proto\n        when :tcp\n          socket_create_tcp(host, port, **kwargs, &block)\n        when :udp\n          socket_create_udp(host, port, **kwargs, &block)\n        when :tls\n          socket_create_tls(host, port, **kwargs, &block)\n        when :unix\n          raise \"not implemented yet\"\n        else\n          raise ArgumentError, \"invalid protocol: #{proto}\"\n        end\n      end\n\n      def socket_create_tcp(host, port, resolve_name: false, connect_timeout: nil, **kwargs, &block)\n        sock = if connect_timeout\n                 s = ::Socket.tcp(host, port, connect_timeout: connect_timeout)\n                 s.autoclose = false # avoid GC triggered close\n                 WrappedSocket::TCP.for_fd(s.fileno)\n               else\n                 WrappedSocket::TCP.new(host, port)\n               end\n        socket_option_set(sock, resolve_name: resolve_name, **kwargs)\n        if block\n          begin\n            block.call(sock)\n          ensure\n            sock.close_write rescue nil\n            sock.close rescue nil","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin_helper/socket.rb#L34-L70","documentation":"Error \"invalid protocol: #{proto}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/plugin_helper/socket.rb:52 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"}