<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error: default auth: cannot configure default credentials, please check... in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/error-default-auth-cannot-configure-default-credentials-please/m-p/61279#M902</link>
    <description>&lt;P&gt;Hola all, I'm experiencing a quite strange error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that and happens inside a GITLAB pipeline:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;$ &lt;STRONG&gt;databricks current-user me&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Error: default auth: cannot configure default credentials, please check &lt;A class="" title="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" href="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" target="_blank" rel="noreferrer noopener"&gt;https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication&lt;/A&gt; to configure credentials for your preferred authentication method. Config: host=&lt;A class="" title="https://bango-ew2-dev.cloud.databricks.com/" href="https://bango-ew2-dev.cloud.databricks.com/" target="_blank" rel="noreferrer noopener"&gt;https://XXXXXXXXX.databricks.com&lt;/A&gt;. Env: DATABRICKS_HOST&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The curious fact is that the same command works fine within a local docker image.&lt;/P&gt;&lt;P&gt;The Token used is a personal token, and it is correctly propagated into the pipeline.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anybody else get the same problem? Any clue is welcomed&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2024 17:19:05 GMT</pubDate>
    <dc:creator>6502</dc:creator>
    <dc:date>2024-02-20T17:19:05Z</dc:date>
    <item>
      <title>Error: default auth: cannot configure default credentials, please check...</title>
      <link>https://community.databricks.com/t5/administration-architecture/error-default-auth-cannot-configure-default-credentials-please/m-p/61279#M902</link>
      <description>&lt;P&gt;Hola all, I'm experiencing a quite strange error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that and happens inside a GITLAB pipeline:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;$ &lt;STRONG&gt;databricks current-user me&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Error: default auth: cannot configure default credentials, please check &lt;A class="" title="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" href="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" target="_blank" rel="noreferrer noopener"&gt;https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication&lt;/A&gt; to configure credentials for your preferred authentication method. Config: host=&lt;A class="" title="https://bango-ew2-dev.cloud.databricks.com/" href="https://bango-ew2-dev.cloud.databricks.com/" target="_blank" rel="noreferrer noopener"&gt;https://XXXXXXXXX.databricks.com&lt;/A&gt;. Env: DATABRICKS_HOST&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The curious fact is that the same command works fine within a local docker image.&lt;/P&gt;&lt;P&gt;The Token used is a personal token, and it is correctly propagated into the pipeline.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anybody else get the same problem? Any clue is welcomed&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 17:19:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/error-default-auth-cannot-configure-default-credentials-please/m-p/61279#M902</guid>
      <dc:creator>6502</dc:creator>
      <dc:date>2024-02-20T17:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error: default auth: cannot configure default credentials, please check...</title>
      <link>https://community.databricks.com/t5/administration-architecture/error-default-auth-cannot-configure-default-credentials-please/m-p/61364#M909</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hola Kaniz,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the problem is not on Databricks CLI but is due to some interactions happening inside the Gitlab pipeline.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;According to the documentation reported here:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/auth/pat.html#language-Environment" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Databricks personal access token authentication | Databricks on AWS&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;( at the bottom of the page )&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Setting the ENV vars: DATABRICKS_HOST and DATABRICKS_TOKEN&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;is just ONE possible option&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;. Well,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;on the Gitlab pipeline I was working it was the ONLY option.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It has been a hard debug that concluded with a lucky attempt from my colleague. Really a random &amp;amp; lucky attempt.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is hard to spot the problem, so let me share my experience with others in the hope they will find that useful and time-saving.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; My pipeline script initializes the databricks-cli by passing&lt;BR /&gt;&amp;gt; the personal token and by setting the DATABRICKS_HOST env var.&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ if [ -z $TF_VAR_personal_token ]; then echo "Zero size TF_VAR_personal_token"; else echo $TF_VAR_personal_token | databricks configure $DEBUG; fi&lt;BR /&gt;12:06:19 INFO start pid=292 version=0.214.0 args="databricks, configure, --debug"&lt;BR /&gt;12:06:19 INFO Saving /root/.databrickscfg pid=292&lt;BR /&gt;12:06:19 INFO completed execution pid=292 exit_code=0&lt;BR /&gt;&lt;BR /&gt;&amp;gt; And the procedure completes with no error.&lt;/P&gt;&lt;P&gt;$ echo "DATABRICKS_HOST=$DATABRICKS_HOST, DATABRICKS_PATH=$DATABRICKS_PATH, token md5 will follow"&lt;BR /&gt;DATABRICKS_HOST=&lt;A href="https://xxxxxxx.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxx.cloud.databricks.com&lt;/A&gt;, DATABRICKS_PATH=/Volumes/main/default/datalake, token md5 will follow&lt;BR /&gt;$ echo $TF_VAR_personal_token | md5sum&lt;BR /&gt;2b7425a1a31e169cce7e149de25635f8 -&lt;BR /&gt;$ id&lt;BR /&gt;uid=0(root) gid=0(root) groups=0(root)&lt;/P&gt;&lt;P&gt;&amp;gt; The configuration file&amp;nbsp;databrickscfg is correctly written with the passed information. Anything is working as expected.&lt;BR /&gt;$ cat /root/.databrickscfg | sed s/$TF_VAR_personal_token/xxxxxxxxxxxxx/g&lt;BR /&gt;[DEFAULT]&lt;BR /&gt;host = &lt;A href="https://xxxxxxx.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxx.cloud.databricks.com&lt;/A&gt;&lt;BR /&gt;token = xxxxxxxxxxxxx&lt;BR /&gt;$ databricks auth env | sed s/$TF_VAR_personal_token/xxxxxxxxxxxxx/g&lt;BR /&gt;{&lt;BR /&gt;"env": {&lt;BR /&gt;"DATABRICKS_AUTH_TYPE": "pat",&lt;BR /&gt;"DATABRICKS_CONFIG_PROFILE": "DEFAULT",&lt;BR /&gt;"DATABRICKS_HOST": "&lt;A href="https://xxxxxxx.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxx.cloud.databricks.com&lt;/A&gt;",&lt;BR /&gt;"DATABRICKS_TOKEN": "xxxxxxxxxxxxx"&lt;BR /&gt;}}&lt;/P&gt;&lt;P&gt;&amp;gt; Accessing the workspace is not a problem. Anything works so far.&lt;BR /&gt;&lt;BR /&gt;$ curl -v -v -v '&lt;A href="https://xxxxxxx.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxx.cloud.databricks.com&lt;/A&gt;'&lt;BR /&gt;% Total % Received % Xferd Average Speed Time Time Time Current&lt;BR /&gt;Dload Upload Total Spent Left Speed&lt;BR /&gt;0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying xxx.xxx.xxx.xxx...&lt;BR /&gt;* Connected to xxxxxxx.cloud.databricks.com (xxx.xxx.xxx.xxx) port 443 (#0)&lt;BR /&gt;* ALPN: offers h2,http/1.1&lt;BR /&gt;} [5 bytes data]&lt;BR /&gt;* TLSv1.3 (OUT), TLS handshake, Client hello (1):&lt;BR /&gt;} [512 bytes data]&lt;BR /&gt;* CAfile: /etc/ssl/certs/ca-certificates.crt&lt;BR /&gt;* CApath: /etc/ssl/certs&lt;BR /&gt;{ [5 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Server hello (2):&lt;BR /&gt;{ [88 bytes data]&lt;BR /&gt;* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):&lt;BR /&gt;} [1 bytes data]&lt;BR /&gt;* TLSv1.3 (OUT), TLS handshake, Client hello (1):&lt;BR /&gt;} [512 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Server hello (2):&lt;BR /&gt;{ [155 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):&lt;BR /&gt;{ [15 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Certificate (11):&lt;BR /&gt;{ [4014 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, CERT verify (15):&lt;BR /&gt;{ [264 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Finished (20):&lt;BR /&gt;{ [52 bytes data]&lt;BR /&gt;* TLSv1.3 (OUT), TLS handshake, Finished (20):&lt;BR /&gt;} [52 bytes data]&lt;BR /&gt;* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384&lt;BR /&gt;* ALPN: server accepted h2&lt;BR /&gt;* Server certificate:&lt;BR /&gt;* subject: C=US; ST=California; L=San Francisco; O=Databricks Inc.; CN=*.cloud.databricks.com&lt;BR /&gt;* start date: Jan 8 00:00:00 2024 GMT&lt;BR /&gt;* expire date: Jan 6 23:59:59 2025 GMT&lt;BR /&gt;* subjectAltName: host "xxxxxxx.cloud.databricks.com" matched cert's "*.cloud.databricks.com"&lt;BR /&gt;* issuer: C=US; O=DigiCert Inc; CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1&lt;BR /&gt;* SSL certificate verify ok.&lt;BR /&gt;} [5 bytes data]&lt;BR /&gt;* using HTTP/2&lt;BR /&gt;* h2h3 [:method: GET]&lt;BR /&gt;* h2h3 [:path: /]&lt;BR /&gt;* h2h3 [:scheme: https]&lt;BR /&gt;* h2h3 [:authority:xxxxxxx.cloud.databricks.com]&lt;BR /&gt;* h2h3 [user-agent: curl/7.88.1]&lt;BR /&gt;* h2h3 [accept: */*]&lt;BR /&gt;* Using Stream ID: 1 (easy handle 0x55fe0bbc1c80)&lt;BR /&gt;} [5 bytes data]&lt;BR /&gt;&amp;gt; GET / HTTP/2&lt;BR /&gt;&amp;gt; Host: xxxxxxx.cloud.databricks.com&lt;BR /&gt;&amp;gt; user-agent: curl/7.88.1&lt;BR /&gt;&amp;gt; accept: */*&lt;BR /&gt;&amp;gt;&lt;BR /&gt;{ [5 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):&lt;BR /&gt;{ [230 bytes data]&lt;BR /&gt;* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):&lt;BR /&gt;{ [230 bytes data]&lt;BR /&gt;* old SSL session ID is stale, removing&lt;BR /&gt;{ [5 bytes data]&lt;BR /&gt;&amp;lt; HTTP/2 303&lt;BR /&gt;&amp;lt; location: &lt;A href="https://xxxxxxx.cloud.databricks.com/login.html" target="_blank" rel="noopener"&gt;https://xxxxxxx.cloud.databricks.com/login.html&lt;/A&gt;&lt;BR /&gt;&amp;lt; vary: Accept-Encoding&lt;BR /&gt;&amp;lt; date: Wed, 21 Feb 2024 12:06:19 GMT&lt;BR /&gt;&amp;lt; server: databricks&lt;BR /&gt;&amp;lt;&lt;BR /&gt;{ [0 bytes data]&lt;BR /&gt;0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0&lt;BR /&gt;* Connection #0 to host xxxxxxx.cloud.databricks.com left intact&lt;BR /&gt;&lt;BR /&gt;But there is no way to communicate correctly with the remote system.&lt;BR /&gt;&lt;BR /&gt;$ databricks current-user me $DEBUG&lt;BR /&gt;12:06:20 INFO start pid=310 version=0.214.0 args="databricks, current-user, me, --debug"&lt;BR /&gt;Error: default auth: cannot configure default credentials, please check &lt;A href="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication&lt;/A&gt; to configure credentials for your preferred authentication method. Config: host=&lt;A href="https://xxxxxxxcloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxxcloud.databricks.com&lt;/A&gt;. Env: DATABRICKS_HOST&lt;BR /&gt;12:06:20 ERROR failed execution pid=310 exit_code=1 error="default auth: cannot configure default credentials, please check &lt;A href="https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication&lt;/A&gt; to configure credentials for your preferred authentication method. Config: host=&lt;A href="https://xxxxxxxcloud.databricks.com" target="_blank" rel="noopener"&gt;https://xxxxxxxcloud.databricks.com&lt;/A&gt;. Env: DATABRICKS_HOST"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best of all, testing the whole procedure outside the GitLab pipeline works like a charm. Is it crazy, isn't it?&lt;/P&gt;&lt;P&gt;Well, we solved the problem by setting the DATABRICKS_TOKEN and stopping initializing the Databricks-cli the way we did.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 13:53:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/error-default-auth-cannot-configure-default-credentials-please/m-p/61364#M909</guid>
      <dc:creator>6502</dc:creator>
      <dc:date>2024-02-21T13:53:27Z</dc:date>
    </item>
  </channel>
</rss>

