- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
JDBC Connection issue in NIFI on connecting to Teradata
- Labels:
-
Apache NiFi
Created ‎03-17-2017 10:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I am facing the below issue while connecting Teradata from Nifi in processor "ExecuteSQL".
Error Message:
ExecuteSQL[id=db7852a7-015a-1000] Unable to execute SQL select query sel * from Table where Field1 = 'ABC' due to org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([Teradata JDBC Driver] [TeraJDBC 15.10.00.26] [Error 1000] [SQLState 08S01] Login failure for Connection to DATABASE Fri Mar 17 05:31:33 EDT 2017 socket orig=DATABASE cid=6829814b sess=0 java.net.UnknownHostException: DATABASE at java.net.InetAddress.getAllByName0(InetAddress.java:1280) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.doLookup(TDNetworkIOIF.java:221) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.getAddresses(TDNetworkIOIF.java:259) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:367) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:154) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:140) at com.teradata.jdbc.jdbc.GenericTeradataConnection.getIO(GenericTeradataConnection.java:127) at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:99) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:209) at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)
Please let me know how to resolve this and proceed further.
Created on ‎03-17-2017 11:41 AM - edited ‎08-18-2019 04:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like the JDBC URL you defined in the controller service is not correct and the host cannot be reached from the NiFi servers. What did you configure in the controller service:
I believe this URL should be something like:
jdbc:teradata://<host>:<port>/<DatabaseName>
Hope this helps.
Created on ‎03-17-2017 11:41 AM - edited ‎08-18-2019 04:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like the JDBC URL you defined in the controller service is not correct and the host cannot be reached from the NiFi servers. What did you configure in the controller service:
I believe this URL should be something like:
jdbc:teradata://<host>:<port>/<DatabaseName>
Hope this helps.
Created ‎03-17-2017 04:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Pierre Villard, Thanks for your prompt response. Eventhough i have modified the URL as per your suggestion, it is throwing the same error. Below are the changes.
DB Connection URL: jdbc:teradata://DATABASE:1025/COTAINER_NAME
Database Driver Class Name: com.teradata.jdbc.TeraDriver
Please let me know how to proceed on it.
Created ‎03-17-2017 04:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In that case, what you call DATABASE (the server where your teradata is installed) must be reachable from all the NiFi nodes on port 1025. You can check if this working using the following command:
telnet DATABASE 1025
If it is not working then it is a network related issue: you need to allow communication between NiFi nodes and the database.
Created ‎03-20-2017 06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick response and help. I have changed my host and port to correct one. Now i can able to connect. Appreciate your help.
