-
I am running a docker container on kubernetes cluster(ubuntu 20.4 image). When the below code is executed, container crashes with the following error. import psycopg2 as psc pq_conn = psc.connect( df= pd.read_sql_query(""" It was working fine and nothing has been changed except new container was created. Comparing with another container where it works, major difference is in openssl version (3.1.4 in another container where it still works 3.2 in new container where it is crashing.) Please suggest if you have any hints. Thank a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Are you using psycopg2-binary or psycopg2? |
Beta Was this translation helpful? Give feedback.
-
Hi Daniele, Thanks for looking into my question. I am using psycopg2 installed via conda. After experimenting I could locate one reason, the openssl version in the container is 3.2, earlier it was 3.1.4. I think while installation of another package pyOpenSSL==22.0.0, openssl was getting upgraded to 3.2. As I already have higher version of this package installed I commented out explicit installation of these two packages. Then it started working again. So I doubt openssl version upgrade was causing this error. Please let me know if you have any other thoughts on this. |
Beta Was this translation helpful? Give feedback.
-
I don't know what is psycopg2 installed via conda, I am not responsible for that package and nobody has contacted us for support. It might bundle a binary openssl package incompatible with the ones in pyOpenSSL and two conflicting C libraries get imported in the same process. Please report them the problem. With normal Python and pip, you will likely need to avoid using |
Beta Was this translation helpful? Give feedback.
I don't know what is psycopg2 installed via conda, I am not responsible for that package and nobody has contacted us for support.
It might bundle a binary openssl package incompatible with the ones in pyOpenSSL and two conflicting C libraries get imported in the same process.
Please report them the problem.
With normal Python and pip, you will likely need to avoid using
psycopg2-binary
and usepsycopg2
in order to use the system openssl, making sure that all the other packages use the system openssl as well.