-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] #1112
Comments
Just so you know, @Razorhunter , we do not officially support Ubuntu 20.04 yet. That being said, have you tried connecting to another SQL Server instance? Say SQL Server 2017 or later? I suspect it might be related to #1021 |
@yitam For the time being, we only got production SQL Server 2014 and we didn't plan to upgrade to the newest version. There are no other workaround for it for the time being? |
hi @Razorhunter please check the comments in #1021 and #1023 for various options or workarounds |
FYI, @Razorhunter I just did a brief test. I have no problem connecting to SQL Server 2017 or above from Ubuntu 20.04. For further explanation, please check our reply to a similar issue. But if upgrading your server is not an option for you now, this suggestion for Debian might help you. Save a backup
But if your SQL Server does not yet support TLSv1.2, it's highly recommended that you follow the instructions to update. Again, if you do not plan to upgrade yet, you may change the line |
Any update, @Razorhunter ? |
@yitam Just want you to know, I did successfully connect to the MSSQL 2017 with Ubunt 20.04. Seems like you previous suggestion using MSSQL 2017 and above is a correct way for now. I had move my staging server to new VM and installed MSSQL2017 for now. The production server remains using MSSQL 2014. Tq for your help |
You're welcome @Razorhunter |
I have this problem with an outdated SQL Server connecting from Oracle Linux 8.2. The location to change |
This was helpful. Ubuntu 20.04 PHP 7.4 using the 19.10 drivers for sqlsrv We have a real old SQL server out there . The SQL Server show's version 10.50.2550.0, i think it's SQL Server 2008 R2. I had to use TLSv1 to connect to the server. I also had to do a "systemctl restart apache2" to get it to take affect. TLSv1.1 did not work with my MSSQL server version. Error message: Connection failed: SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol]Database Connection Error edit: /etc/ssl/openssl.cnf End of file added
Not 100% sure why i had to restart apache2 for it to take effect, but I had to.
reloaded the page and it works |
@esundberg thank you...i tried your solution and IT WORKS!!! ... thanks a lot...very appreciate it |
@esundberg thanks a lot, saved my day! |
If you use docker:
|
This almost worked perfectly for my use case (docker on Ubuntu 2004 connecting to SQL Server 2014).
|
#1112 (comment) |
Hi, |
Hi, |
Note that we no longer support SQL Server 2008 or 2008 R2. Please consider upgrading your server or using an older Ubuntu version, such as 18.04 LTS. |
Thanks |
This solution is working fine for me on Debian 10. |
Thanks @esundberg |
I have an instance of SQL Server 2005 and I did exactly what is described above and it works. Thanks! |
Please add this line to the place/file you have configured your settings: options: { encrypt: false } |
Obrigado luizcantoni |
i using laradock / php-fpm: |
My case, in order to work, the CipherString must be: |
ubuntu: 22.04 /etc/ssl/openssl.cnf my case: change last CipherString both Works |
The openssl_conf = default_conf solution worked for me with ubuntu 20.04 and odbc 18 connecting to sql server 2008 R2 |
this solution works for me on Ubuntu-20.04 php 7.3. |
FROM ubuntu:20.04 RUN apt update -y && apt upgrade -y && apt-get update PYODBC DEPENDENCESADD odbcinst.ini /etc/odbcinst.ini RUN apt-get update RUN apt install -y unixodbc-dev ENV STATIC_URL /static RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - RUN curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list RUN echo "[ODBC Driver 17 for SQL Server]\n RUN python3 -m pip install flask RUN Add openssl_conf = default_conf RUN chmod +rwx /etc/ssl/openssl.cnf RUN [system_default_sect] >> /etc/ssl/openssl.cnf RUN apt update -y EXPOSE 9900 CMD ["python3", "app.py"] this dockerfile has problem when connecting pyodbc |
@yhb598712 's solution works for me, really appreciate! In my case, I am using dbt to connect Microsoft SQL Server 2008 R2 (SP2) owned by vendor. My machine is Ubuntu 22.04.1 and has ODBC Driver 18 for SQL Server installed. sudo nano /etc/ssl/openssl.cnf Change last
to
works for me! |
This Work. PHP 8.1 - Ubuntu 20 - Apache |
To avoid update to latest SPs, these general instructions should work on any linux
Works on latest Ubuntu/AMZN/CentOS server, reload php-fpm or httpd afterwards, effects immediately. |
I'am having the same issue here. Debian 12 (bookworm) |
I had upgrade my Ubuntu 19.10 to 20.04 Beta and caught this exception when trying to connect to MSSQL server. Previously it worked in Ubuntu 19.10.
SQL Server : 12.0.4100.1
PHP : 7.1.33
OS: Ubuntu 20.04 Beta
Anybody can help me, I'm really appreciate it. Thank You
The text was updated successfully, but these errors were encountered: