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.
Answers
-
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)
-
we are on Amazon RDSthere is no postgresql admin
-
Can you provide me a documentation for this configuration ASAP?
-
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
-
Is there any other solution to this one?
-
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.
-
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
-
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.
-
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?