Skip to content

s3 output dropping metrics without informative logs #7863

@jmcarp

Description

@jmcarp

Bug Report

Describe the bug

I'm testing out the s3 output plugin to write logs to gcs using the s3 compatibility layer. Some logs arrive in s3, but many are rejected with errors that are, at least to me, uninformative.

To Reproduce

  • Steps to reproduce the problem:

Configure log export to google cloud storage using the s3 output plugin:

    [OUTPUT]
        Name s3
        Match *
        compression gzip
        content_type application/gzip
        use_put_object true
        total_file_size 1M
        upload_timeout 1m
        endpoint https://storage.googleapis.com
        bucket my-bucket
        region my-region
        s3_key_format /$TAG/%Y/%m/%d/%H/$UUID.log.gz

Some uploads succeed, but many fail with logs like this:

fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [error] [/src/fluent-bit/src/tls/openssl.c:433 errno=0] Success
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [error] [tls] syscall error: error:00000005:lib(0):func(0):DH lib
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [error] [http_client] broken connection to storage.googleapis.com:443 ?
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [aws_client] storage.googleapis.com: http_do=-1, HTTP Status: 0
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [upstream] KA connection #49 to storage.googleapis.com:443 is now available
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [error] [output:s3:s3] PutObject request failed
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [error] [output:s3:s3] Could not send chunk with tag redacted.cockroach.health.
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [output:s3:s3] Running upload timer callback (upload_queue)..
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [output:s3:s3] No files found in upload_queue. Scanning for timed out chunks
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [output:s3:s3] Running upload timer callback (cb_s3_upload)..
fluent-bit-vr8cw fluent-bit [2023/08/23 21:38:42] [debug] [upstream] KA connection #49 is in a failed state to: storage.googleapis.com:443, cleaning up

Expected behavior

Output to s3 either works or prints an informative error message on failure.

Screenshots

Your Environment

  • Version used: 2.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions