Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
oz123 opened this issue Nov 28, 2019 · 2 comments
Closed

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

oz123 opened this issue Nov 28, 2019 · 2 comments
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@oz123
Copy link

oz123 commented Nov 28, 2019

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
@stale
Copy link

stale bot commented Jan 11, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jan 11, 2020
@stale stale bot closed this as completed Jan 18, 2020
@mashail
Copy link

mashail commented Jul 7, 2020

The same issue is happening to us. If we use s3://access_key:secret_access_key@yourendpoint.com/myBucket then we get msg="failed to flush user" err="RequestError: send request failed\ncaused by: Put http://yourendpoint.com/myBucket` and if we use s3://access_key:secret_access_key@https://yourendpoint.com/myBucket we get msg="failed to flush user" err="InvalidEndpointURL: invalid endpoint uri\ncaused by: parse https://s3.https:. │
│ amazonaws.com/{Bucket}/{Key+}: invalid port ":.amazonaws.com" after host"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

2 participants