Skip to content
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

SSL Provider returns unsupported protocol #3

Open
9a24f0 opened this issue May 21, 2021 · 3 comments
Open

SSL Provider returns unsupported protocol #3

9a24f0 opened this issue May 21, 2021 · 3 comments

Comments

@9a24f0
Copy link

9a24f0 commented May 21, 2021

First of all sorry for bothering you, I found your answer about installing pyodbc on heroku cloud on stackoverflow recently. I have successfully install pyodbc and add sequentially correct 3 build packs as in your README. Here is my build log:



-----> Building on the Heroku-20 stack
-----> Using buildpacks:
       1. heroku-community/apt
       2. heroku/python
       3. https://github.com/matt-bertoncello/python-pyodbc-buildpack.git
-----> Apt app detected
-----> Reusing cache
-----> Updating apt caches
       Hit:1 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
       Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
       Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
       Fetched 228 kB in 1s (308 kB/s)
       Reading package lists...
-----> Fetching .debs for unixodbc
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libodbc1 odbcinst odbcinst1debian2
       Suggested packages:
         libmyodbc odbc-postgresql tdsodbc unixodbc-bin
       The following NEW packages will be installed:
         libodbc1 odbcinst odbcinst1debian2 unixodbc
       0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
       Need to get 0 B/270 kB of archives.
       After this operation, 1,093 kB of additional disk space will be used.
       Download complete and in download only mode
-----> Fetching .debs for unixodbc-dev
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libodbc1 odbcinst odbcinst1debian2
       Suggested packages:
         libmyodbc odbc-postgresql tdsodbc unixodbc-bin
       The following NEW packages will be installed:
         libodbc1 odbcinst odbcinst1debian2 unixodbc-dev
       0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
       Need to get 0 B/470 kB of archives.
       After this operation, 2,796 kB of additional disk space will be used.
       Download complete and in download only mode
-----> Fetching .debs for python3-pyodbc
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libodbc1
       Suggested packages:
         libmyodbc odbc-postgresql tdsodbc unixodbc-bin
       The following NEW packages will be installed:
         libodbc1 python3-pyodbc
       0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
       Need to get 0 B/243 kB of archives.
       After this operation, 796 kB of additional disk space will be used.
       Download complete and in download only mode
-----> Fetching .debs for python3-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 12 not upgraded.
       Need to get 0 B/1,212 B of archives.
       After this operation, 0 B of additional disk space will be used.
       Download complete and in download only mode
-----> Installing libodbc1_2.3.6-0.1build1_amd64.deb
-----> Installing odbcinst1debian2_2.3.6-0.1build1_amd64.deb
-----> Installing odbcinst_2.3.6-0.1build1_amd64.deb
-----> Installing python3-dev_3.8.2-0ubuntu2_amd64.deb
-----> Installing python3-pyodbc_4.0.22-2build2_amd64.deb
-----> Installing unixodbc_2.3.6-0.1build1_amd64.deb
-----> Installing unixodbc-dev_2.3.6-0.1build1_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> Python app detected
-----> No Python version was specified. Using the same version as the last build: python-3.9.5
       To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
-----> No change in requirements detected, installing from cache
-----> Using cached install of python-3.9.5
-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
-----> odbc app detected
-----> Starting adding ODBC Driver 17 for SQL Server
-----> copied libmsodbcsql-17.5.so.2.1
-----> copied msodbcsqlr17.rll
-----> copied odbcinst.ini
-----> copied profile.d
-----> Finished adding ODBC Driver 17 for SQL Server
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 65.3M
-----> Launching...
       Released v37
       https://car-training-monitor.herokuapp.com/ deployed to Heroku

Though whenever I tried to access my database, I received this error:

sqlalchemy.exc.OperationalError: (pyodbc.OperationalError) ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] (-1) (SQLDriverConnect)')

Since I'm new to both heroku and odbc, my wild guess be the current driver are no longer under support. I tried to upgrade the driver to 17.6.1.1 with a forked repo and replace your build pack with the upgraded driver. However, I still receive the same error.

I assume that I could copy that installed on my machine regardless of using Manjaro. I assume that these libs are the same between GNU/Linux distros as msodbcsqlr17.rll remain the same. As of this stage I could not figure out which way to continue. Hope you could guide me through this deployment.

Thanks for your time! Looking forward to your response.

@Benjamin-Schwartz
Copy link

Hey @9a24f0 @matt-bertoncello @mrbertoncello! did you ever get this issue resolved? I have the same issue and have been stuck for quite some time. Any of your guy's help would be highly appreciated!

@9a24f0
Copy link
Author

9a24f0 commented Jun 15, 2022

Hi @Benjamin-Schwartz,
I'm not quite remember the work around, but I jot down what I did back then at my blog:
https://9a24f0.github.io/blogs/deployment-hell.html
After re-reading, I think you should update open SSL on Dyno to version 1.1.1k or later.

@Benjamin-Schwartz
Copy link

@9a24f0 I will give that a try thank you! hahaha, it is so crazy reading your blog. It is step by step the exact issues I have been having.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants