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 Certifcate :- when we add SSL certifcate using multiprocessing we got "caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] or (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2334)')" error #370

Open
kapdevl opened this issue Jul 18, 2021 · 11 comments
Labels
SDK Issue pertains to the SDK itself and not specific to any service

Comments

@kapdevl
Copy link

kapdevl commented Jul 18, 2021

Hi Team
i am using multiprocessing to add a certificate and update the listener.when i run with out multiprocessing its working fine.
but when i use multiprocessing i am getting following error.
when i run every time i got different error.
Error 1 ---- 'error': "HTTPSConnectionPool(host='iaas.us-ashburn-1.oraclecloud.com', port=443): Max retries exceeded with url: /20170115/loadBalancers/"+ocid+"/certificates (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2334)'),))"}, {'podname': 'emje-dev1', 'error': "HTTPSConnectionPool(host='iaas.us-ashburn-1.oraclecloud.com', port=443): Max retries exceeded with url: /20170115/loadBalancers/"+ocid+"/certificates (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))"}]

Error 2 ---- error': "HTTPSConnectionPool(host='iaas.us-ashburn-1.oraclecloud.com', port=443): Max retries exceeded with url: /20170115/loadBalancers/"+ocid+"/certificates (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2334)'),))"}, {'podname': 'emje-test', 'error': "HTTPSConnectionPool(host='iaas.us-ashburn-1.oraclecloud.com', port=443): Max retries exceeded with url: /20170115/loadBalancers/"+ocid+"/certificates (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))"}]

Modal :-
certificate_data = oci.load_balancer.models.CreateCertificateDetails()
Method :-
create_cert = lb_client.create_certificate(certificate_data, pod_lb_details.id)

@kapdevl kapdevl changed the title SSL Certifcate :- when we add SSL certifcate using multiprocessing we got aused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] or (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2334)') error SSL Certifcate :- when we add SSL certifcate using multiprocessing we got "caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] or (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2334)')" error Jul 18, 2021
@jodoglevy jodoglevy added the SDK Issue pertains to the SDK itself and not specific to any service label Jul 20, 2021
@jodoglevy
Copy link
Contributor

@kapdevl do you get this issue calling other OCI Load Balancing service operations with multiprocessing, for example list_load_balancers?

It looks like you are hitting an SSL issue -- it may only be coincidental that you are hitting that issue while adding a certificate in the Load Balancing service

@jodoglevy
Copy link
Contributor

@kapdevl ping - can you answer my question above?

@kapdevl
Copy link
Author

kapdevl commented Jul 29, 2021

@jodoglevy
i am not facing issue when use list_load_balancers.

i am facing issue when add the new certificate into Load balancer.

@jodoglevy
Copy link
Contributor

Thanks @kapdevl. A few other questions for you:

  • Do you get the same issue, if you call the same API from the same host, but targeting this service in a different OCI region?
  • Do you have a proxy set up which sits between this host and requests sent to OCI services?
  • What version of the OCI Python SDK are you using?

@kapdevl
Copy link
Author

kapdevl commented Aug 4, 2021

Thanks @jodoglevy. Please find the answer.:

1.Do you get the same issue, if you call the same API from the same host, but targeting this service in a different OCI region? Answer : Yes .got same issue for all the region

2.Do you have a proxy set up which sits between this host and requests sent to OCI services?
Answer : with and without proxy we got same issue

3.What version of the OCI Python SDK are you using?
Answer : oci==2.41.0

@kapdevl
Copy link
Author

kapdevl commented Aug 15, 2021

@jodoglevy
Any update on this??

@bhagwatvyas
Copy link
Member

Hi @kapdevl, may I ask you to paste the logs here, so we can get more information about whats going on https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/logging.html#logging.

Also, I have seen RemoteDisconnected error with expect headers. We have had an issue with the Python SDK using expect headers, and the version you are using is affected by it. More information about this issue here #367. Is it possible for you to try disabling expect header, or upgrading the oci version as explained in the github issue?

@bhagwatvyas
Copy link
Member

Hey @kapdevl ping, can you please provide the information from my previous comment?

@kapdevl
Copy link
Author

kapdevl commented Aug 24, 2021

Hi @bhagwatvyas

I applied the solution provide in #367 . update the OCI version but no use case for testing
will update into next few days.

@bhagwatvyas
Copy link
Member

Hey @kapdevl ping - do you still see this issue?

@kapdevl
Copy link
Author

kapdevl commented Sep 16, 2021

Hi @bhagwatvyas
I tried #367 but facing same issue with when i update the SSL certificate in loadbalancer.
otherwise its working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDK Issue pertains to the SDK itself and not specific to any service
Projects
None yet
Development

No branches or pull requests

3 participants