# Getting MSSQL database connection error: Cannot create PoolableConnectionFactory

**URL:** <https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 8, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779 "2023-03-08T14:24:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanket\_Landge](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Sanket\_Landge](https://forum.inductiveautomation.com/u/Sanket_Landge)\
**Post date:** [March 8, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779/1 "2023-03-08T14:24:15Z")

</div>

java.sql.SQLException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)".)  
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:656)  
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534)  
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:300)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:253)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1096)  
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:587)  
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)  
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/java.lang.Thread.run(Unknown Source)  
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)".  
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)  
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)  
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)  
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)  
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)  
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)  
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)  
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:357)  
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103)  
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:652)  
... 12 more  
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)  
at java.base/sun.security.ssl.HandshakeContext.(Unknown Source)  
at java.base/sun.security.ssl.ClientHandshakeContext.(Unknown Source)  
at java.base/sun.security.ssl.TransportContext.kickstart(Unknown Source)  
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)  
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)  
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)  
... 20 more

8.1.24 (b2023011208)  
Azul Systems, Inc. 11.0.16.1

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [March 8, 2023, 3:00pm UTC](https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779/2 "2023-03-08T15:00:03Z")

</div>

I would suggest looking at the knowledge base article below. You likely need to upgrade your MSSQL JDBC Driver or update your MSSQL Server instance.

> **[TLS v1.0 and v1.1 Microsoft SQL Server Database connection issue](https://support.inductiveautomation.com/hc/en-us/articles/4417310204813-TLS-v1-0-and-v1-1-Microsoft-SQL-Server-Database-connection-issue)**
>
> Summary
> A recent update to Java 8 (8u291), which also applies to Java 11.0.11 and above, has disabled TLS 1.0 and 1.1. This has resulted in cases of Ignition's connection to Microsoft SQL Server (M...

---

<div class="post-metadata">

**Author:** ![Sanket\_Landge](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Sanket\_Landge](https://forum.inductiveautomation.com/u/Sanket_Landge)\
**Post date:** [March 8, 2023, 3:45pm UTC](https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779/3 "2023-03-08T15:45:16Z")

</div>

## Option 2: Re-enable TLS V1 and TLS V1.1 on the Ignition Gateway

I have upadated java.security file after that which thing i need to do?

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [March 8, 2023, 3:55pm UTC](https://forum.inductiveautomation.com/t/getting-mssql-database-connection-error-cannot-create-poolableconnectionfactory/70779/4 "2023-03-08T15:55:02Z")

</div>

That option requires a gateway restart.

I would strongly suggest updating the driver or updating MSSQL Server (if your version doesn't already support TLS 1.2) before resorting to re-enabling TLS 1.0, and TLS 1.1. Modifying the java.security file is generally only recommended as a temporary solution. The changes will not persist through Ignition upgrades and it's less secure.
