Apache NiFi 与 MS SQL 服务器集成

Apache NiFi with MS SQL Server integration

我即将 ApacheNiFi 连接到 MS SQL 服务器,如下所示:

1) ApacheNiFi is deployed on Ubuntu 18.04 server

2) ExecuteSQL 1.9.0 processor is using Database Connection Pooling Service 

3) DBCPConnectionPool 1.9.0 is using JTDS driver to connect MS SQL Server
   Database Connection URL=
   [
     jdbc:jtds:sqlserver://10.10.10.1:1433;
     databaseName=MY_DB; 
     domain=MY_DOMAIN;
     authenticationScheme=JavaKerberos;
     trustServerCertificate=true;
     authentication=NotSpecified;useNTLMv2=true
   ]

4) Database Driver Class Name=[net.sourceforge.jtds.jdbc.Driver]
5) Database Driver Location(s) = [file:///opt/install/nifi-1.9.0/lib/jtds-1.3.1.jar]
6) Database User = [myuser@MY_DOMAIN]
7) Password = [*****]

 8) Authorization is done on Active Directory located in SERVERS_DOMAIN

 9) I can logon server from my Excell/Access with no issue.
10) However my NiFi is getting response back
    [
       Caused by: java.sql.SQLException: Login failed. The login is from an untrusted 
       domain and cannot be used with Windows authentication 
       atnet.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    ]

请告知如何解决此类问题。

我认为您必须指定 url 域:

jdbc:jtds:sqlserver://${host}:1433/${db};useNTLMv2=true;domain=${domain}

并且用户应该没有域

文档:http://jtds.sourceforge.net/faq.html