dungdm93 opened a new pull request #3078:
URL: https://github.com/apache/iceberg/pull/3078


   I just try JDBC Catalog in my local machine following [this 
guide](https://iceberg.apache.org/jdbc/), but I got the following exception:
   ```bash
   $ spark-sql --packages 
org.apache.iceberg:iceberg-spark3-runtime:0.12.0,org.postgresql:postgresql:42.2.23
 \
       --conf 
spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
 \
       --conf spark.sql.catalog.iceberg=org.apache.iceberg.spark.SparkCatalog \
       --conf spark.sql.catalog.iceberg.warehouse=/tmp/warehouse \
       --conf 
spark.sql.catalog.iceberg.catalog-impl=org.apache.iceberg.jdbc.JdbcCatalog \
       --conf 
spark.sql.catalog.iceberg.uri=jdbc:postgresql://postgres:5432/iceberg \
       --conf spark.sql.catalog.iceberg.jdbc.user=postgres \
       --conf spark.sql.catalog.iceberg.jdbc.password=SuperSecr3t
   spark-sql> CREATE TABLE iceberg.default.student (id bigint, name string) 
USING iceberg;
   21/09/05 08:46:37 ERROR SparkSQLDriver: Failed in [CREATE TABLE 
iceberg.default.student (id bigint, name string) USING iceberg]
   org.apache.iceberg.jdbc.UncheckedSQLException: Failed to connect: 
jdbc:postgresql://postgres:5432/iceberg
        at 
org.apache.iceberg.jdbc.JdbcClientPool.newClient(JdbcClientPool.java:54)
        at 
org.apache.iceberg.jdbc.JdbcClientPool.newClient(JdbcClientPool.java:31)
        ...
   Caused by: org.postgresql.util.PSQLException: FATAL: password authentication 
failed for user "dungdm93"
        at 
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:613)
        at 
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:161)
        at 
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
        at 
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
        at org.postgresql.Driver.makeConnection(Driver.java:465)
        at org.postgresql.Driver.connect(Driver.java:264)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at 
org.apache.iceberg.jdbc.JdbcClientPool.newClient(JdbcClientPool.java:52)
   ```
   
   After some investigation, I found the reason is because `jdbc.user` property 
is overwrite by `user` property
   ![Screenshot from 2021-09-05 
13-28-00](https://user-images.githubusercontent.com/6848311/132121062-e542d43f-beab-4791-90cf-8d1922d64b5e.png)
   


-- 
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