cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

4 REPLIES 4

Prabakar
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

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?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now