Skip to content

InvalidParameterException: 'logGroupNamePrefix' failed to satisfy constraint #223

Description

@sagardesai0094

Problem

Seeing the following error:

2021-02-10 03:13:38 +0000 [warn]: #0 [out_cloudwatch_logs] failed to flush the buffer. retry_time=10 next_retry_seconds=2021-02-10 03:22:59 +0000 chunk="5baf2a6358ee9ea6714bb0da720d09dc" error_class=Aws::CloudWatchLogs::Errors::InvalidParameterException error="2 validation errors detected: Value '' at 'logGroupNamePrefix' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_/#A-Za-z0-9]+; Value '' at 'logGroupNamePrefix' failed to satisfy constraint: Member must have length greater than or equal to 1"

 2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/seahorse/client/plugins/raise_response_errors.rb:17:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:22:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/seahorse/client/plugins/request_callback.rb:71:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/seahorse/client/plugins/response_target.rb:24:in `call'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.111.2/lib/seahorse/client/request.rb:72:in `send_request'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/aws-sdk-cloudwatchlogs-1.38.0/lib/aws-sdk-cloudwatchlogs/client.rb:988:in `describe_log_groups'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluent-plugin-cloudwatch-logs-0.11.2/lib/fluent/plugin/out_cloudwatch_logs.rb:511:in `check_log_group_existence'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluent-plugin-cloudwatch-logs-0.11.2/lib/fluent/plugin/out_cloudwatch_logs.rb:502:in `log_group_exists?'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluent-plugin-cloudwatch-logs-0.11.2/lib/fluent/plugin/out_cloudwatch_logs.rb:211:in `block in write'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluent-plugin-cloudwatch-logs-0.11.2/lib/fluent/plugin/out_cloudwatch_logs.rb:203:in `each'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluent-plugin-cloudwatch-logs-0.11.2/lib/fluent/plugin/out_cloudwatch_logs.rb:203:in `write'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluentd-1.12.0/lib/fluent/plugin/output.rb:1136:in `try_flush'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluentd-1.12.0/lib/fluent/plugin/output.rb:1448:in `flush_thread_run'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluentd-1.12.0/lib/fluent/plugin/output.rb:462:in `block (2 levels) in start'
  2021-02-10 03:36:43 +0000 [warn]: #0 /fluentd/vendor/bundle/ruby/2.6.0/gems/fluentd-1.12.0/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'

Steps to replicate

    <label @OUTPUT>
      <match **>
        @type stdout
      </match>
      <match **>
        @type cloudwatch_logs
        @id out_cloudwatch_logs_containers
        region "#{ENV.fetch('AWS_REGION')}"
        log_group_name "/eks/fluentd-testing/containers"
        log_stream_name_key stream_name
        remove_log_stream_name_key true
        auto_create_stream true
        <buffer>
          flush_interval 5
          chunk_limit_size 2m
          queued_chunks_limit_size 32
          retry_forever true
        </buffer>
      </match>
    </label>

Expected Behavior or What you need to ask

I am not sure what's causing the error. There is nothing fancy in the log group name. I have tried just using fluentd-testing as well.

Using Fluentd and CloudWatchLogs plugin versions

  • Running in Kubernetes. Using this chart. I have the image tag specified as v1.12.0-debian-cloudwatch-1.0.
  • Inside the container the fluentd version is 1.12 and the plugin version seems to be 0.11.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions