Author Message
rajanip.instruments.com
Joined: Feb 18, 2021
Messages: 16
Offline
Hi ,

We are running into an issue where SQL connection is failing with below error when OD application is called which has DB operation to be exceuted:



17/02/2021 13:51:35:355 INFO - 871BA6377BA96E7B3186AC7A141160CE:/eCI_IB_OD : Capturing exception [com.microsoft.sqlserver.jdbc.SQLServerException]. Message [The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: SQL Server did not return a response. The connection has been closed..]
17/02/2021 13:51:35:355 ERROR - 871BA6377BA96E7B3186AC7A141160CE:/eCI_IB_OD : com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: SQL Server did not return a response. The connection has been closed..
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1509)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1427)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1204)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(SQLServerConnection.java:1054)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:758)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.tomcat.dbcp.dbcp2.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:373)
at org.apache.tomcat.dbcp.dbcp2.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:1040)
at org.apache.tomcat.dbcp.dbcp2.datasources.PerUserPoolDataSource.registerPool(PerUserPoolDataSource.java:626)
at org.apache.tomcat.dbcp.dbcp2.datasources.PerUserPoolDataSource.getPooledConnectionAndInfo(PerUserPoolDataSource.java:540)
at org.apache.tomcat.dbcp.dbcp2.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:915)
at com.avaya.sce.runtime.jdbc.Database.open(Database.java:93)
at com.avaya.sce.runtime.connectivity.db.DbQuery.executeSQL(DbQuery.java:196)
at com.avaya.sce.runtime.connectivity.db.DbQuery.execute(DbQuery.java:134)
at com.avaya.sce.runtime.Data.evaluateActions(Data.java:228)
at flow.UpdateMenuSelection.executeDataActions(UpdateMenuSelection.java:85)
at com.avaya.sce.runtime.Data.handleRequest(Data.java:121)
at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:247)
at com.avaya.sce.runtime.SCEServlet.doGet(SCEServlet.java:140)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)


Environment details:

JDK and jre 8
Tomcat 9
AEP - 8
AOD -8
SQL server 2019
Windows server 2019
Initially tried with SQLJDBC4 and then SQLJDBC42.jar ,both cases error is same.


SQL server is not configured for SSL but still we see that error.

Could you please help us resolve this? Let us know if you need any other details.


Thanks,
Rajani



We have SQLJDBC42 jar deployed under
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The error indicates the failed communication between JDBC and SQL Server. Has this been working at all? Is the connection string not correct?
rajanip.instruments.com
Joined: Feb 18, 2021
Messages: 16
Offline
This is a new system being set up. Application was initially built using an old version of AOD. Now it is upgraded to AOD8 and deployed on Tomcat 9.

SQL is not configured for SSL. We did try updating the db source file in context.xml with encrypt=false ,encrypt=true with TrustServerCertificate = False as shown below,restarted tomcat but error is same.


url="jdbc:sqlserver://localhost:1433;databaseName=VTSystem;encrypt=False;TrustServerCertificate = False"

url="jdbc:sqlserver://localhost:1433;databaseName=VTSystem;encrypt=True;TrustServerCertificate = False"/>


Thanks,
Rajani
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I found this online that may help you.

https://stackoverflow.com/questions/32766114/sql-server-jdbc-error-on-java-8-the-driver-could-not-establish-a-secure-connect
rajanip.instruments.com
Joined: Feb 18, 2021
Messages: 16
Offline
Yes we did all those solutions provided in the link but nothing works and just keep getting the same error.

We then installed tomcat 7.0.108 with jdk\jre 1.7 and deployed the OD code but still getting same error.

Any other suggestions that we can try?

Thanks,
Rajani
PeterTomovic
Joined: Jun 13, 2014
Messages: 66
Offline
Try to copy sqljdbc_auth.dll file into c:\windows directory. Use appropriate version.
Go to:   
Mobile view