Skip to content

Can't stop loki if s3 configure string wrong #1331

Closed
@oz123

Description

I configured loki to save the chunks in S3 bucket in Ceph S3 compatible storage.
The connection string should not contain https://myendpoint.com rather just myendpoint.com
Loki will start with a wrong still (but IMHO it should not) and then won't be able to write anything to the bucket. I then tried killing it with CTRL-C, which triggered all the CPUs and spit multiple of these messages:

zonaws.com\" after host"                                                                                                                                                                                                                     
level=error ts=2019-11-28T13:21:36.467369557Z caller=flush.go:170 org_id=fake msg="failed to flush user" err="InvalidEndpointURL: invalid endpoint uri\ncaused by: parse https://s3.https:.amazonaws.com/{Bucket}/{Key+}: invalid port \":.am
azonaws.com\" after host"                                                                                                                                                                                                                    
level=error ts=2019-11-28T13:21:36.467425938Z caller=flush.go:170 org_id=fake msg="failed to flush user" err="InvalidEndpointURL: invalid endpoint uri\ncaused by: parse https://s3.https:.amazonaws.com/{Bucket}/{Key+}: invalid port \":.am
azonaws.com\" after host"                                                                                                                                                                                                                    
level=error ts=2019-11-28T13:21:36.467474205Z caller=flush.go:170 org_id=fake msg="failed to flush user" err="InvalidEndpointURL: invalid endpoint uri\ncaused by: parse https://s3.https:.amazonaws.com/{Bucket}/{Key+}: invalid port \":.am
azonaws.com\" after host"                                                                                                                                                                                                                    
level=error ts=2019-11-28T13:21:36.467560423Z caller=flush.go:170 org_id=fake msg="failed to flush user" err="InvalidEndpointURL: invalid endpoint uri\ncaused by: parse https://s3.https:.amazonaws.com/{Bucket}/{Key+}: invalid port \":.am
azonaws.com\" after host"                                                                                                                                                                                                                    

To Reproduce
Steps to reproduce the behavior:

  1. Started Loki 1.0.0
    Use a config similar to this:
  aws:
    s3: s3://access_key:secret_access_key@https://yourendpoint.com/myBucket
    s3forcepathstyle: true

Expected behavior

  • Loki actually stops, and does not consume all my CPUs.
  • Loki actually should not start with such string, and complain that the YAML configuration is wrong.

Environment:

  • Infrastructure: laptop, linux ubuntu 18.04
  • Deployment tool: ran loki directly from shell, checkout the demo here

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleA stale issue or PR that will automatically be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions