Solved

Microsoft JDBC driver permissions

Posted on 2015-01-15
10
365 Views
Last Modified: 2015-01-19
I have an application that started trying to connect to the SQL server using SSL after restart. Is there a security setting or permission deployment for java that would make the JBBC driver request connections use SSL. The connection was working fine for several months and I can still connect using ODBC

The error I get is:
:[trycatch] Caught exception: 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.".
      [echo] ERROR: com.microsoft.sqlserver.jdbc.SQLServerException: The driver
 could not establish a secure connection to SQL Server by using Secure Sockets Lay
 er (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed.".
0
Comment
Question by:Robert Timmons
  • 5
  • 5
10 Comments
 
LVL 15

Accepted Solution

by:
sr75 earned 500 total points
ID: 40551489
the driver should allow for no SSL, try SSL, and only SSL for sql connections.

This should help you to understand how it should be configured.

http://msdn.microsoft.com/en-us/library/bb879935(v=sql.110).aspx
0
 

Author Comment

by:Robert Timmons
ID: 40551606
Sorry, I guess I was not clear. I do not want to connect SSL. The application was working correctly before restart and then after could not longer connect to SQL and when I looked at the log it reports it cannot establish a SSL connection. What would cause a JDBC connection to start wanting to use SSL. I have already checked that FIPS is not enabled since that has caused issues in the past.
0
 
LVL 15

Expert Comment

by:sr75
ID: 40551694
that is why I gave you the link so you can look at how it is making the connection and whether or not your SQL server is requiring SSL for the queries.
0
 

Author Comment

by:Robert Timmons
ID: 40551719
SQL is not set to force encryption
0
 
LVL 15

Expert Comment

by:sr75
ID: 40551723
okay, now look the jdbc command string to ensure it doesn't require encryption as well.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Robert Timmons
ID: 40551738
The connection string does not include encryption settings either. The application connected just fine for months and no changes made to application. That why I am stumped as too why it is trying to connect SSL after a restart
0
 
LVL 15

Expert Comment

by:sr75
ID: 40551759
are you sure there isn't another connection string?  It shouldn't be trying to connect with SSL if it is not being told to.
0
 

Author Comment

by:Robert Timmons
ID: 40551777
I went to the team that wrote the application and they tell me there is nothing that would make it try to connect SSL and that it must be infrastructure. The only other time I ran into this problem with this particular application was when FIPS was enabled because the JDBC drive is FIPS aware but once I turned FIPS off then the issue went away but I have triple checked that FIPS is not enabled. The parameters of the connection string are below. I checking now to see if there is any other app on the machine that is using java

<db-connection name="XXXXX">
            <url>jdbc:sqlserver://servername:1433;Database=CORE_Scrub;ApplicationName=HMS;LoginTimeout=300</url>
            <driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
            <user>HMS</user>
            <password>FpuS7WwhbegupK+/yHaniQ\=\=</password>
            <min-size>80</min-size>
            <max-size>100</max-size>
            <idle-timeout-minutes>1</idle-timeout-minutes>
        </db-connection>
0
 
LVL 15

Expert Comment

by:sr75
ID: 40551793
You are right, there is nothing in that string that tells it to try SSL.   But the app is trying an SSL connection.  I would look at the code and verify that is the only JDBC code in app.  It doesn't make sense other wise.
0
 

Author Comment

by:Robert Timmons
ID: 40557634
I've requested that this question be deleted for the following reason:

Found my own solution
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
copyEndy  challenge 15 58
bunnyEars challenge 6 68
network + 7 73
solarwind tftp server 2 32
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now