Created 07-11-2017 12:25 AM
NiFi Version 1.3
Creating DBCPConnection Pool "/nifi-api/process-groups/" + processorGrpId + "/controller-services" using nifi 1.3 client.
Below is snippet of code updating properties of connection pool service
String apiUrl = apiBaseUrl + "/nifi-api/controller-services/" + connectionPoolId;
HttpResponse httpResponse = HttpUtil.putRequest(apiUrl, entityJsonString);
Here I can see controller entity service with password set. However when QueryDatabaseTable (or any other sql processor) is started, it fails with Processor exception:
Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xxxxx")
I logged into web UI, updated connection pool service manually and it works fine. Same password is used via api and in UI.
Wondering why the password didn't work when it is set using API, but works when manually setting on UI.
Appreciate any help.
Thanks,
Ravi Papisetti
Created 07-18-2017 04:15 PM
This issue has been resolved. While creating the controller service, it got all parameters set and returned the object. Returned object has a masked password (****). When application changing the controller service state from disabled to enabled, controller service entity is being updated with a masked password. Hence it fails to connect to the database.
During the state change, we resend the original password to fix the issue.
Thanks to Arpit Gupta who helped me in resolving this issue.
Created 07-18-2017 04:15 PM
This issue has been resolved. While creating the controller service, it got all parameters set and returned the object. Returned object has a masked password (****). When application changing the controller service state from disabled to enabled, controller service entity is being updated with a masked password. Hence it fails to connect to the database.
During the state change, we resend the original password to fix the issue.
Thanks to Arpit Gupta who helped me in resolving this issue.