Tyr
Tyr

Reputation: 610

Nifi SQL connection error: Unable to execute SQL Query EET Error

I am quite new in Apache products.

I am trying to retrieve data from MS SQL with Nifi(1.11.4) but I got below error:

EET ERROR QueryDatabaseTable[id=08bsaha-0175-1000-c2871-af278378fa817] Unable to execute SQL select query SELECT * FROM PassCount due to java.sql.SQLException: Cannot create PoolableConnectionFactory(The Connection to the host server_name='STI04, named instance sql2014' failed. Error: "java.net.UnknownHostException: server_name='STI04". Verify the server and instan names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.):org.apache.nifi.processor.exception.ProcessException

Here is other info about the connection:

DBCPConnectionPool

Database Connection URL: jdbc:sqlserver://server_name=STI04\SQL2014;database=Sales

Database Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver

Database Driver Location(s): C:\Program Files\Microsoft JDBC DRIVER 8.4 for SQL Server\sqljdbc_8.4\enu\mssql-jdbc-8.4.1.jre8.jar

QueryDatabaseTable

Database Connection Pooling Service: DBCPConnectionPool
Database Type: MS SQL 2012+
Table Name: PassCount

Below picture is the how it looks on NiFi

enter image description here

I guess it may be because of 'STI04\SQL2014' notation in connection URL. I already checked firewall and there is no issue about it.

How can I solve this? Also it doesn't have to be same processors. I just want to get data from SQL and see this queue filling up. Any suggestion is welcome.

Thanks!

Upvotes: 0

Views: 1651

Answers (1)

Mike Thomsen
Mike Thomsen

Reputation: 37506

The root error is actually this:

java.net.UnknownHostException: server_name='STI04".

It looks like a JDBC networking issue. It cannot resolve the hostname from the information you provided.

Upvotes: 1

Related Questions