Notifications

54 views

Background

Customers can use Windows Integrated Authentication (also known as NTLM Authentication, Domain Authentication and so on: https://en.wikipedia.org/wiki/Integrated_Windows_Authentication) to run queries against an MS SQL Server via JDBC using a MID Server running on a Windows host.

Problem Symptoms

Some customers have seen the following error:

MID Server reported error: java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:f5905e6e-13c1-48da-85ef-fe1bd7e0a57d
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
com.microsoft.sqlserver.jdbc.AuthenticationJNI.(AuthenticationJNI.java:60)
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:102)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:74)
com.service_now.mid.connections.jdbc.JDBCConnectionFactory.create(JDBCConnectionFactory.java:65)
com.service_now.mid.connections.ConnectionCachePool.getAvailableConnection(ConnectionCachePool.java:82)
com.service_now.mid.connections.ConnectionCache.get(ConnectionCache.java:94)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:768)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:116)
com.service_now.mid.probe.AProbe.process(AProbe.java:96)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:125)
com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

 

Possible Solution

Ensure the in the \agent\conf\wrapper-jvm.conf file exists in the MID Server installation directory and that it contains either of the following lines (use x86-64 for a 64-bit MID Server installation, x86-32 for a 32-bit MID Server):

set.SNC_JVM_ARCH=x86-64
or
set.SNC_JVM_ARCH=x86-32

 

Further Troubleshooting

If the above doesn't resolve the issue try these steps:

  • In \agent\conf\wrapper-override.conf or wrapper.conf (preferred wrapper-override.conf) file in the MID Server installation directory make sure that you have

    # Java Classpath (include wrapper.jar)
    # Add class path elements as needed starting from 1
    wrapper.java.classpath.1=lib/*.jar
    wrapper.java.classpath.2=extlib/*.jar

    # Java Library Path (location of Wrapper.DLL or libwrapper.so)
    wrapper.java.library.path.1=lib
    wrapper.java.library.path.2=lib/%SNC_JVM_ARCH%
  • Make sure that you have the correct version (32 or 64bit) of sqljdbc_auth.dll in the folder lib/x86-32 and lib/x86-64
  • Make sure that you restart the mid server after any config change
  • Verify that the SQL server is configured to allow Integrated Authentication (https://msdn.microsoft.com/en-us/library/bsz5788z.aspx)
  • Check the driver compatibility (https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix?view=sql-server-2017)

Contacting Support

If the issue still hasn't been resolved please raise an Incident in HI with Customer Support, provide the results of the above troubleshooting steps and the following details:

a) MID server OS
b) JRE version
c) JDBC driver jar file and version
d) Full path of all occurrence of sqljdbc_auth.dll and their version info
e) Extract of MID server log and wrapper log where the error happened.

Article Information

Last Updated:2018-11-10 16:34:35
Published:2018-11-11