cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

SSLCertVerificationError how to disable SSL Certification

RantoB
Valued Contributor

Hi,

How is that possible to disable SSL Certification.

With databricks API I got this error :

SSLCertVerificationError
 
SSLCertVerificationError: ("hostname 'https' doesn't match either of '*.numericable.fr', 'numericable.fr'",)
 
MaxRetryError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //adb-XXXXXXXXXXXXXX.azuredatabricks.net/api/2.0/workspace/mkdirs (Caused by SSLError(SSLCertVerificationError("hostname 'https' doesn't match either of '*.numericable.fr', 'numericable.fr'")))

when executing the following script

response = requests.post(
  'https://{}/api/2.0/workspace/mkdirs'.format(DOMAIN),
  headers={'Authorization': 'Bearer {}'.format(TOKEN)},
  json={"path": "/Shared/released_notebooks/modules"}
)

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

RantoB
Valued Contributor

Hi, thanks for you answer. Thanks to your code which was a bit different from mine, I noticed a error in my code. (I had "https://" twice...)

View solution in original post

5 REPLIES 5

Kaniz
Community Manager
Community Manager

Hi @RantoB! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers in the community have an answer to your question first. Or else I will get back to you soon. Thanks.

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Hi @Bertrand BURCKER​ I tried your code and ended up with a different error. To create a directory you can try the below code and it will help create the folder for you.

import requests
from pyspark.sql.types import (StructField, StringType, StructType, IntegerType)
API_URL = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiUrl().getOrElse(None)
TOKEN = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().getOrElse(None)
 
response = requests.post(
  API_URL + '/api/2.0/workspace/mkdirs', 
  headers={"Authorization": "Bearer " + TOKEN},
  json={"path": "/Users/prabakarxxxxxxxx/Test_dir1/"}
 )

RantoB
Valued Contributor

Hi, thanks for you answer. Thanks to your code which was a bit different from mine, I noticed a error in my code. (I had "https://" twice...)

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Hi @Bertrand BURCKER​ I believe you were able to resolve the issue. Would you be happy to mark the answer as best so that others can quickly find the solution in the future?

Anonymous
Not applicable

@Bertrand BURCKER​ - Thanks for letting us know your issue is resolved. If @Prabakar Ammeappin​'s answer solved the problem, would you be happy to mark his answer as best so others can more easily find an answer for this?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.