-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Access denied from table_manager.go when trying to sync tables to S3 #2868
Comments
We are running into the same issue. |
Was able to fix it by specifying iam user credentials in the config file. It seems somewhere the role credentials are not properly used. |
@fabianmet can you share your config? (we already tried specifying the s3 credentials but it did not work for us) |
Sure! @emilmark-wowgroup. We are running inside an EKS cluster with a role that has complete access to that specific bucket. The iam user i created had the exact same profile as the role. apiVersion: v1
kind: ConfigMap
metadata:
name: loki
namespace: monitoring
data:
loki.yaml: |
auth_enabled: false
server:
http_listen_port: 3100
ingester:
lifecycler:
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 5m
chunk_retain_period: 30s
limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h
compactor:
working_directory: /data/loki/boltdb-shipper-compactor
shared_store: s3
schema_config:
configs:
- from: 2018-04-15
store: boltdb-shipper
object_store: s3
schema: v11
index:
prefix: loki_index_
period: 24h
storage_config:
boltdb_shipper:
active_index_directory: /data/loki/index
shared_store: s3
cache_location: /data/loki/boltdb-cache
aws:
bucketnames: loki-with-some-random-hash
endpoint: s3.eu-central-1.amazonaws.com
region: eu-central-1
access_key_id: KEYHERE
secret_access_key: SECRETHERE
sse_encryption: true |
Thanks, same story here, but we use IAM Task Roles. We will try it out! |
Encountered the same problem. Resolved it by granting |
We're having the same problem on EKS (using IAM Roles for Service Accounts and the permissions listed here).
I would really prefer not having to use static access key credentials nor instance-wide roles for security reasons. Anyone has any lead? |
Found out: I was using |
I just ran into the issue but am using Ceph RADOSGW as S3 backend, also with full permissions to access the bucket granted. I followed the example at https://github.com/grafana/loki/blob/f6fd6ae7da0d929788250a1273efc531ae25ec65/docs/sources/configuration/examples.md#s3-compatible-apis, but only after changing the S3-URL as suggested in So instead of |
@slim-bean we still have this problem and would really appreciate some clarification regarding the configuration or more complete example for S3 + boltdb-shipper. We have tried all the above changes that have been suggested + tried all the different configurations that we have found in your documentation. I "verified" that the config works in a docker-compose setup with MinIO (modified version of Grafana TNS demo): Whats more confusing is that our s3 bucket receives files in both fake and index dirs even though we get the following errors:
|
Hey, apologies for closing this, but the issue has gotten off topic. This looks like a provider related authorization process that's outside of Loki itself. Here's a link to which permissions you should need: https://grafana.com/docs/loki/latest/operations/storage/#cloud-storage-permissions |
Hi there, |
Still having the same issue, using s3://region/bucket_name. |
No, created a policy with the following actions and added the specific bucket as resource in the policy.
Then attached that policy to the cluster roles and it is working fine. |
@MuhammadNaeemAkhtar Can you please share your config file? I still cant make it work. I have created service-account with the right permissions and every other pod in my cluster can access S3 bucket except for Loki pod. I am creating service account through Helm chart. |
@ognjenVlad Are you using EKS cluster?
Then in the configuration of your loki, I'm using like this.
Hope it'll help you. |
Describe the bug
Access denied from table_manager.go when trying to sync tables even though we have granted full permissions to the specified S3 bucket
We have tried to configure loki to ship logs via boltdb-shipper to S3. We run Loki on Fargate and tried to piece together a working config for this purpose. We have not found a complete example and the documention does not seem to be updated, no mention of 'storage_config->boltdb_shipper' exist on: https://grafana.com/docs/loki/latest/configuration/. (The boltdb_shipper config block is mentioned in other places, but not with an S3 example)
We have successfully used Loki together with DynamoDB so the task role has worked previously.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ship logs to s3
Environment:
Screenshots, Promtail config, or terminal output
Log:
Config:
Fargate Task Policy:
The text was updated successfully, but these errors were encountered: