โ07-27-2021 03:32 AM
I use below code to connect to postgresql.
df = spark.read \
.jdbc("jdbc:postgresql://hostname:5432/dbname", "schema.table",
properties={"user": "user", "password": "password"})\
.load()
df.printSchema()
However, I got the following error
org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
Can anyone help me to solve this problem? Thanks.
โ04-06-2022 07:37 AM
Hi, were you able to solve the issue? I just ran into the same problem and haven't found any other discussions on this.
โ04-26-2023 08:04 AM
try the following to check connectivity between Databricks and your DB server
%sh ping servername
%sh ping IP_Of_your_server
If no connectivity, you would need to check your firewall / vNet and DNS mapping as Databricks takes fully qualify DNS instead server name with ports (assuming this is how you access your DB server "locally" in your network)
โ08-15-2023 05:18 AM - edited โ08-16-2023 03:45 AM
Hey there! I can understand that this types of issue is frustrating for any users. If you are Mac user and still struggling with the authentication problem on this site then you can check this source- https://setapp.com/how-to/how-to-flush-dns-cache that can be helpful to solve this type of problem. In this article they share complete tutorial about how to flush DNS cache on Mac. Good Luck for you.
โ09-04-2023 11:54 PM
But how are we going to do this for those who use Windows?
โ03-18-2024 09:41 AM
in Windows the command is
ipconfig /flushdns
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group