Failed to refresh the table - iceberg - s3

Hi All,

Could somebody explain me what happened with saving iceberg table format?
quick overview works fine till i push the button save. after the message “Failed to refresh the table” appears on screen.

Br,
Yuriy Gavrilov

Some details:

ror while authenticating: Input byte array has wrong 4-byte ending unit
2023-04-13 13:03:02,697 [qtp1322039792-7887849] ERROR c.d.d.server.GenericExceptionMapper - Unexpected exception when processing PUT http://dremio.daas-dev.apps.caas30d28.epaas.s7.aero/apiv2/source/Storj/folder_format/iceberg_p/taxi_i-9a1e2cdc24ea40d2a796fc04371dd670 : org.apache.iceberg.exceptions.RuntimeIOException: Failed to refresh the table
org.apache.iceberg.exceptions.RuntimeIOException: Failed to refresh the table

Caused by: com.dremio.plugins.util.ContainerAccessDeniedException: Access to aws-bucket test is denied - Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 8f62870a-fffa-1fff-9d69-98f2b33d4368; S3 Extended Request ID: cbbe0669840b44d687219feb17c397cc; Proxy: null)

@YuriyGavrilov

Looks like the Dremio user does not have access to the bucket?

Access to aws-bucket test is denied 

i set a full access to the bucket. it is simply to check. i can make create from select in this bucket successfully

@YuriyGavrilov Are you saying if you restrict to just the the privileges in the below link, it is not working?

https://docs.dremio.com/software/data-sources/s3/#sample-iam-policy-for-accessing-s3

@balaji.ramaswamy What do you mean?

@YuriyGavrilov Apologies for not stating my question clear enough, I see you said “i set a full access to the bucket. it is simply to check. i can make create from select in this bucket successfully”, does this mean, if you give full access it works? or even if full access is given it does not work?

it’s ok @balaji.ramaswamy. This still doesn’t work with any access.

@YuriyGavrilov I see there is an extended id printed, would you able to ask AWS what this is? Only they can look uo the code and it should tell where the issue is

cbbe0669840b44d687219feb17c397cc

@balaji.ramaswamy Hi,
i didn’t use AWS. I tryed https://www.storj.io/ as S3 External source. There is not too much permission options. Also i tryed mc cli client to work with https://www.storj.io/ and it works perfectly.

@YuriyGavrilov If you’re using S3 compatible storage as a source, please ensure S3 compatible settings are enabled. See MinIO S3 as a source as an example here: Dremio

Also, you may have to verify that storj has all of the APIs that Dremio needs to read/write. I see a list here: Supported S3 Commands - Storj DCS Docs

These are the ones we need (taken from here):

GetBucketLocation
ListAllMyBuckets
ListBucket
GetObject

PutObject
DeleteObject

Just try to use different s3 provider, https://cloudian.com/ but get same issue.
Also tryed latest OSS Dremio version. There are a bit different message. like on this pic: Dremio Iceberg JDBC catalog

i finally connected through hive metastore. Just need to be properly configured.

this connector i used in trino:

arctic.properties: |
connector.name=iceberg
iceberg.file-format=PARQUET
iceberg.compression-codec=SNAPPY
iceberg.unique-table-location=false
hive.metastore.uri=thrift://HOST:9083
hive.s3.endpoint=https://HOST
hive.s3.path-style-access=true
hive.s3.ssl.enabled=false
hive.s3.aws-access-key=<ACCESS_KEY>
hive.s3.aws-secret-key=<SECRET_KEY>