<?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 dbsqlcli.main ERROR - getaddrinfo failed in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7345#M3246</link>
    <description>&lt;P&gt;I had to rebuild my laptop and am trying to re-install Databricks and Databricks-sql-cli so I can use the CLI to pull info from the databricks repository.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to run the command: &lt;B&gt;dbsqlcli -e "select distinct tableName from databases_info.all_db_tbl_clm"&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error: &lt;B&gt;Error during request to server: [Errno 11001] getaddrinfo failed&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to get a valid response from the DOS command: &lt;B&gt;databricks workspace ls&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have updated the credentials section of the dbsqlclirc file to populate host_name, http_path and access_token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;http_path and access_token match the ones in the .databrickscfg file.&lt;/P&gt;&lt;P&gt;I went into the databricks compute clusters and copied the name into host_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the app.log extract, slightly redacted:&lt;/P&gt;&lt;P&gt;2023-03-21 11:41:08,099 (11320/MainThread) dbsqlcli.main ERROR - error: RequestError('Error during request to server: [Errno 11001] getaddrinfo failed', gaierror(11001, 'getaddrinfo failed'))&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 94, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.connect(hostname, http_path, access_token, database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 228, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.sqlexecute = SQLExecute(hostname, http_path, access_token, database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 27, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.connect(database=self.database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 32, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;conn = dbsql.connect(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\__init__.py", line 50, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;return Connection(server_hostname, http_path, access_token, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\client.py", line 189, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self._session_handle = self.thrift_backend.open_session(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 464, in open_session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;response = self.make_request(self._client.OpenSession, open_session_req)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 393, in make_request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self._handle_request_error(error_info, attempt, elapsed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 261, in _handle_request_error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;raise network_request_error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2023 17:34:16 GMT</pubDate>
    <dc:creator>Herkimer</dc:creator>
    <dc:date>2023-03-21T17:34:16Z</dc:date>
    <item>
      <title>dbsqlcli.main ERROR - getaddrinfo failed</title>
      <link>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7345#M3246</link>
      <description>&lt;P&gt;I had to rebuild my laptop and am trying to re-install Databricks and Databricks-sql-cli so I can use the CLI to pull info from the databricks repository.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to run the command: &lt;B&gt;dbsqlcli -e "select distinct tableName from databases_info.all_db_tbl_clm"&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error: &lt;B&gt;Error during request to server: [Errno 11001] getaddrinfo failed&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to get a valid response from the DOS command: &lt;B&gt;databricks workspace ls&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have updated the credentials section of the dbsqlclirc file to populate host_name, http_path and access_token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;http_path and access_token match the ones in the .databrickscfg file.&lt;/P&gt;&lt;P&gt;I went into the databricks compute clusters and copied the name into host_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the app.log extract, slightly redacted:&lt;/P&gt;&lt;P&gt;2023-03-21 11:41:08,099 (11320/MainThread) dbsqlcli.main ERROR - error: RequestError('Error during request to server: [Errno 11001] getaddrinfo failed', gaierror(11001, 'getaddrinfo failed'))&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 94, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.connect(hostname, http_path, access_token, database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\main.py", line 228, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.sqlexecute = SQLExecute(hostname, http_path, access_token, database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 27, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self.connect(database=self.database)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\dbsqlcli\sqlexecute.py", line 32, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;conn = dbsql.connect(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\__init__.py", line 50, in connect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;return Connection(server_hostname, http_path, access_token, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\client.py", line 189, in __init__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self._session_handle = self.thrift_backend.open_session(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 464, in open_session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;response = self.make_request(self._client.OpenSession, open_session_req)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 393, in make_request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;self._handle_request_error(error_info, attempt, elapsed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;File "%userinfo%\AppData\Roaming\Python\Python311\site-packages\databricks\sql\thrift_backend.py", line 261, in _handle_request_error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;raise network_request_error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 17:34:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7345#M3246</guid>
      <dc:creator>Herkimer</dc:creator>
      <dc:date>2023-03-21T17:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: dbsqlcli.main ERROR - getaddrinfo failed</title>
      <link>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7346#M3247</link>
      <description>&lt;P&gt;@John Zajic​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@John Zajic​&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message "Error during request to server: [Errno 11001] getaddrinfo failed" suggests that there is a problem with resolving the hostname of the Databricks server. Here are some steps you can take to troubleshoot the issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Check that the hostname in the host_name field of the dbsqlclirc file is correct. You can verify this by comparing it to the hostname displayed in the Databricks workspace URL.&lt;/LI&gt;&lt;LI&gt;Check that your laptop is connected to the internet and has access to the Databricks server. You can test this by opening a web browser and navigating to the Databricks workspace URL.&lt;/LI&gt;&lt;LI&gt;Check that there are no network restrictions or firewalls that may be preventing your laptop from connecting to the Databricks server. You can contact your IT department or network administrator to check this.&lt;/LI&gt;&lt;LI&gt;Try pinging the Databricks server using the command prompt. Open the command prompt and type ping &amp;lt;hostname&amp;gt; (where &amp;lt;hostname&amp;gt; is the hostname of the Databricks server). This will test whether your laptop can reach the server.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 03:58:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7346#M3247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-23T03:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: dbsqlcli.main ERROR - getaddrinfo failed</title>
      <link>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7347#M3248</link>
      <description>&lt;P&gt;I hear what you are saying but I am using the same http_path and token when I run the &lt;B&gt;databricks workspace ls &lt;/B&gt;which gives me a proper response.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 01:49:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7347#M3248</guid>
      <dc:creator>Herkimer</dc:creator>
      <dc:date>2023-03-24T01:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: dbsqlcli.main ERROR - getaddrinfo failed</title>
      <link>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7348#M3249</link>
      <description>&lt;P&gt;Hi @John Zajic​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 05:05:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbsqlcli-main-error-getaddrinfo-failed/m-p/7348#M3249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-30T05:05:29Z</dc:date>
    </item>
  </channel>
</rss>

