Community Conundrum 10: The Titanic is now live Learn more

API works in API node but not in Deployer

Level 2
API works in API node but not in Deployer

Hello,

I built a simple SQL API which returns a data from a  postgresql db. It works in API node. But once I deployed it, it shows following error:

 

FATAL: password authentication failed for user "dataiku"

 

"errorType": "com.dataiku.common.server.APIError$APIErrorException",
  "message": "FATAL: password authentication failed for user \"dataiku\"",
  "detailedMessage": "FATAL: password authentication failed for user \"dataiku\""

 

Can you help me with this please? I checked the server.json, the postgresql db is correctly remaped.

9 Replies
Dataiker
Dataiker

Hi,

It is quite likely that your PostgreSQL only accepts connections from the Design node host, not from the API node host. You need to check that with your PostgreSQL admin (in the pg_hba.conf file)

Level 2
Author
we are on Amazon RDS
 
there is no postgresql admin
Dataiker
Dataiker

There is no pg_hba on RDS indeed. We would advise you to install the psql client on the machine where the API node is and to try to connect to your RDS from there, making sure to enter exactly the same host, login, password and database as the one in config/server.json

Level 2
Author

Is there any other solution to this one? 

0 Kudos
Dataiker
Dataiker

Hi,

Not really. The error that you get is directly the error reported by the PostgreSQL driver. This is why our first recommendation is to double-check your settings, and then to use another PostgreSQL client to confirm the issue.

0 Kudos
Level 2
Author

the connection to RDS work on the machine because the Design and API node are on the same one. But however, once deployed, it cannot

0 Kudos
Dataiker
Dataiker

It likely means that there is an error in the config/server.json file in the API node, which is where the connection details are configured. Please remember that you can't just copy/paste the data from the connections.json file of the design node, because the password is encrypted on the design node. You need to actually write the password in the API node file.

0 Kudos
Level 2
Author

We can only expose our AES encrypted password to the server.json.  Is there anyway to use encrypted password? Or it's mandatory to put plain pw?

0 Kudos
Level 2
Author

Can you provide me a documentation for this configuration ASAP?