ArijitSinghEDA opened a new issue, #908:
URL: https://github.com/apache/iceberg-python/issues/908

   ### Question
   
   I am running iceberg in a dockerized environment and using rest catalog and 
storing table details as parquet file using pyarrow on a local minIO server 
under the bucket "iceberg-bucket".
   
   When using the IP address, everything is going fine, i.e.,
   
   ```
   from pyiceberg.catalog import load_catalog
   
   catalog = load_catalog(
       "iceberg_rest_catalog",
       **{
           "uri": "0.0.0.0:8228",
           "s3.endpoint": "0.0.0.0:9033",
           "py-io-impl": "pyiceberg.io.pyarrow.PyArrowFileIO",
           "s3.access-key-id": "user",
           "s3.secret-access-key": "password",
           "s3.region": "us-east-1"
       }
   )
   ```
   
   But, when I use service names (as per the `docker-compose.yaml` files for 
both Iceberg and MinIO), I face the issue
   
   ```
   pyiceberg.exceptions.ServerError: SdkClientException: Received an 
UnknownHostException when attempting to interact with a service. See cause for 
the exact endpoint that is failing to resolve. If this is happening on an 
endpoint that previously worked, there may be a network connectivity issue or 
your DNS cache could be storing endpoints for too long.
   ```
   
   This is how I initialize catalog with service names
   
   ```
   from pyiceberg.catalog import load_catalog
   
   catalog = load_catalog(
       "iceberg_rest_catalog",
       **{
           "uri": "rest-catalog:8252",
           "s3.endpoint": "iceberg-minio:9044",
           "py-io-impl": "pyiceberg.io.pyarrow.PyArrowFileIO",
           "s3.access-key-id": "user",
           "s3.secret-access-key": "password",
           "s3.region": "us-east-1"
       }
   )
   ```
   
   On further investigation, the reason this happens because it tries to access 
the MinIO server with the bucket name prefixed, i.e., 
`iceberg-bucket.iceberg-minio`, which should not be the case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to