【问题标题】:Apache NiFi with MS SQL Server integrationApache NiFi 与 MS SQL Server 集成
【发布时间】:2019-03-25 16:47:54
【问题描述】:

我即将将ApacheNiFi 连接到 MS SQL Server,如下所示:

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)
    ]

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

【问题讨论】:

  • 听起来您还没有将 Ubuntu 主机添加到 Windows 域。

标签: sql-server jdbc apache-nifi jtds


【解决方案1】:

我相信你必须用域指定 url:

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

并且用户应该没有域

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

【讨论】:

  • 错误信息再次出现:登录来自不受信任的域,不能用于 Windows 身份验证
  • 你设置;useNTLMv2=true了吗?
  • 顺便说一句关于这个问题的讨论:stackoverflow.com/questions/26274472/…
  • 是的,使用NTLMv2=true;
猜你喜欢
  • 2019-12-17
  • 1970-01-01
  • 1970-01-01
  • 2019-02-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-14
  • 2011-08-07
相关资源
最近更新 更多