SQL Server Database Connection with Integrated Security

I’m having trouble setting up a SQL Server database connection using integrated security.

I’ve searched the forum for related subjects and found one thread where the symptom was nearly identical (viewtopic.php?f=70&t=5213&hilit=driver+is+not+configured+for+integrated+authentication).

I tried everything suggested there.

I also reviewed Travis’ training video on database connections and tried to do everything required there. I still can’t get it to work.

I’ve successfully configured a connection on the same box using SQL Server security.

My error message is:

[quote] org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (This driver is not configured for integrated authentication.)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:179)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:135)
com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1030)
java.lang.Thread.run(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2338)
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1929)
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1917)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1061)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:179)
com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:135)
com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.run(DatasourceManagerImpl.java:1030)
java.lang.Thread.run(Unknown Source)
[/quote]
I’m trying to configure it on a VM running Windows Server 2008R2, SQL Server 2008/10 and MS JDBC V3.0 driver.

Configuration screen follows:


1 Like

Did you try taking a look at Connecting to MS SQL Server? Connecting to SQLServer is sometimes a pain, but it always works after downloading the right sqljdbc_auth.dll file and turning on the browser, TCP/IP, etc. The error Cannot create PoolableConnectionFactory doesn’t really tell us much about why it can’t connect, but I would double check which sqljdbc_auth.dll file you loaded and make sure you restarted the SQLServer service after changing it’s settings.

I have Ignition 8.1.11.
Followed instructions in https://support.inductiveautomation.com/hc/en-us/articles/360047131512-Microsoft-SQL-Server-MSSQL-Connection-Guide-for-Ignition.

Had issue. But fixed it.
If I followed default instructions I had an error 1(fig 1 File Missing). I have some hard time to figure out what i can do… After i had an idea just not to rename file as they telling in the instruction → Had another issue (fig 2 File missing). Then i just keep 2 files (1 renamed and 1 not) at the folder and all works fine → looks stooping because it’s the same files, but working - so will use until they fix issue.



2 Likes

Thanks. I was facing the same problem. It worked.

I was having trouble connecting with Windows Authentication as well. I found that I was getting a similar error from the Gateway Status page...

Cannot create PoolableConnectionFactory (This driver is not configured for integrated authentication.

I noticed further down in the stack trace however, that the driver version Ignition was looking for did not match the latest version I downloaded (per the User Manual Guide: Connecting to Microsoft SQL Server, Scenario 2: Connect By Using Instance Name and Windows Authentication)

java.lang.UnsatisfiedLinkError: no mssql-jdbc_auth-9.4.0.x64 in java.library.path: [lib, lib\core\gateway]

I sought out, and downloaded the mssql-jdbc_auth-X.X.X.x64.dll file that matched the mssql-jdbc-9.4.0.jre11.jar file located in C:\Program Files\Inductive Automation\Ignition\user-lib\jdbc, which was 9.4.0 in my case. I put that file in the location described by the connection guide and my connection worked.

TL;DR, The connection guide should be updated to specify that the DLL file you want should match the mssql-jdbc JAR file in your user-lib/jdbc directory, instead of just "...it's recommended you use the most recent driver available for your system".

Specs: Ignition 8.1.21, Running on Windows Server 2019.

2 Likes

The note in the documentation has been updated and now mentions that the JDBC Driver and DLL versions need to match. Let me know if that seems clear enough.

1 Like

Thanks for updating that quickly. I just saw the note this morning that thought I may have missed it all along! I think this will be very helpful for folks.

Perhaps a reference to where people can find that jdbc driver would be helpful too. In my case it was found in user-lib within the install directory. I didn't see anything that looked like a version number on the config page of the gateway but perhaps there's an easier way to identify the version.

That's a good point! Looking in the install directory is the best way to see it. I know we have a note in this KBA that mentions the location but it's geared towards a different issue. I'll see if our docs team can get a note added about the location in the install directory on that user manual page as well.

Okay, that's been added now as well.

2 Likes