I have hosted my tomcat application built in Spring Boot to RedHat server. And my SQL Server is installed on Windows Server 2012r2. While running application, I am getting following error:
27-May-2019 00:00:04.420 SEVERE [pool-47-thread-1]
org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create
initial connections of pool.
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not
establish a secure connection to SQL Server by using Secure Sockets
Layer (SSL) encryption. Error: "Server chose TLSv1, but that protocol
version is not enabled or not supported by the client.". .......
I tried installing self signed certificate in RedHat, but no luck.
Related
I have a .NET 5.0 API running in Kubernetes.
When the API attempts to connect to a SQL Server database, schannel on the DB server logs this error:
An TLS 1.2 connection request was received from a remote client
application, but none of the cipher suites supported by the client
application are supported by the server. The SSL connection request
has failed.
The same API running in k8s can connect to other SQL Server DBs just fine. Also, if I run the API locally in Visual Studio, it can connect to the DB fine.
How do I resolve this? I got a list of the cipher suites the DB server is using by looking at SSL Configuration Settings in Local Group Policy Editor. How do I see what the API is using for cipher suites?
I have deployed the Laravel web application on the Linux A2 shared hosting server. There is I want to use sqlsrv driver to connect the MSSQL database.
The MSSQL database is on the IIS web server. I had enabled pdo_sqlsrv, pdo_odbc, odbc, and sqlsrv extension in my server, opened the 1433 port to communicate, and my Linux server is whitelisted at the IIS web server too. But, when I try to connect it gives me the below error.
Code: -49
Error: This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712.
I was gone through many solutions but no success.
Websphere 8.5 on Linux environment is used with java 7. SSL TLS 1.2 is enabled on the WAS server. The sql jdbc jar used is 6.4 . I am to successfully test the datasource connection on WAS. TLS1.2 is also enabled on the SQL Server 2016. Currently the jdbc url is as follows that is used:
"jdbc:sqlserver://localhost:1433;" +
"databaseName=AdventureWorks;" +
"encrypt=true;trustServerCertificate=false;sslProtocol=TLSv1.2";
But when I am making connection through jndi ie.
datasource.getConnection(DatabaseName) ,
the above error comes.
I am able to make connection through Driver Manager as well.
The installation on both Azure and Sql Server side is done exactly according to Microsoft specifications in
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections.
The endpoint host is the SQL Server machine name using fixed port 1433.
The SQL Server is a named instance of SQL Server Express in a Windows 2012 Server.
The connection is also shown as Connected both on Azure and Server HCM sides.
I have done several similar installations before without any problems in more open networks, but in this case the
SQL Server is installed on a "security network" and the only TCP/IP connection opened from the server is to
the Service Bus relay on port 443. But this should be possible according to the specs.
When my Azure Web App tries to open the SQL connection it responds with the error:
"Connection Timeout Expired. The timeout period elapsed while attempting to consume
the pre-login handshake acknowledgement. This could be because the pre-login handshake
failed or the server was unable to respond back in time. The duration spent while attempting
to connect to this server was - [Pre-Login] initialization=0; handshake=15028; "
In Azure diagnostics tool tcpping also works fine to machinename:1433.
What could be the reason for this behaviour?
Are there still some more ports to open or some other settings to change?
EDIT: The solution which finally solved this problem was a quite obvious one. The original settings had the firewall for the on Premise server open only for the Service Bus relay on port 443, just as the specs said would be enough. By opening port 443 for all outbound TCP/IP addresses the connection started immediately to work from my Azure Web App. So there are obviously more addresses used by Hybrid Connection, but I haven't found which ones.
My requirement is simple: I have an appserver - WAS 6.1 connecting to Microsoft SQL Server 2008 R2.
I have configured data source for the SQL server using the installation scripts in linux.
When I deployed EAR and try to hit application url, I get the below error while connecting to SQL Server.
com.ibm.websphere.ce.cm.StaleConnectionException: 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..CWWRA0010E: SQL State = 08S01, Error Code = 0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
The setup is working for another server configuration.
After a long wait, the issue got resolved. There is nothing to do with the EAR. The SSL encryption was enabled in SQL server settings. Just disable the settings did let me establish connection from application to the SQL server.