3

我已经安装并配置了 Databricks CLI,但是当我尝试使用它时,我收到一条错误消息,指出它找不到本地颁发者证书:

$ dbfs ls dbfs:/databricks/cluster_init/
Error: SSLError: HTTPSConnectionPool(host='dbc-12345678-1234.cloud.databricks.com', port=443): Max retries exceeded with url: /api/2.0/dbfs/list?path=dbfs%3A%2Fda
tabricks%2Fcluster_init%2F (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer
 certificate (_ssl.c:1123)')))

上述错误是否表明我需要安装证书,或者以某种方式配置我的环境以便它知道如何找到正确的证书?

我的环境是带有 WSL(Ubuntu 20.04)的 Windows 10(上面的命令来自 WSL/Ubuntu 命令行)。

Databricks CLI 已安装到 Anaconda 环境中,包括以下证书和 SSL 包:

$ conda list | grep cert
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py38h32f6830_0    conda-forge
$ conda list | grep ssl
openssl                   1.1.1g               h516909a_1    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge

当我尝试使用 REST API 时,我遇到了类似的错误curl

$ curl -n -X GET https://dbc-12345678-1234.cloud.databricks.com/api/2.0/clusters/list
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
4

1 回答 1

5

这个问题可以通过禁用 SSL 证书验证来解决。在 Databricks CLI 中,您可以通过insecure = True在 Databricks 配置文件中指定来执行此操作.databrickscfg

于 2020-12-14T08:30:14.793 回答