<?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 display() function always return connection refused on tunneling despite successfully retrieving the schema in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12553#M7353</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using SSH tunnelling with SSHTunnelForwarder to reach a target AWS RDS PostgreSQL database. The connection got through, however when I tried to display the retrieved data frame it always throws "connection refused" error. Please see screenshot below for clarity. I don't understand how this function works, it seems like it does not reuse the established connection from sparks.read command. Can somebody help me on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I already tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SSH into the cluster, try tunnelling, and psql from there [works]&lt;/LI&gt;&lt;LI&gt;directly connect to db instance from proxy host [works]&lt;/LI&gt;&lt;LI&gt;Using panda to load the data frame instead of sparks [does not work]&lt;/LI&gt;&lt;LI&gt;Create new SSH key pair for Databricks [does not work]&lt;/LI&gt;&lt;LI&gt;Change postgresql.conf listen_address to ''*"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2381i8273D8CD4BCF9004/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kurnianto&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 08:10:39 GMT</pubDate>
    <dc:creator>antoooks</dc:creator>
    <dc:date>2021-10-25T08:10:39Z</dc:date>
    <item>
      <title>display() function always return connection refused on tunneling despite successfully retrieving the schema</title>
      <link>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12553#M7353</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using SSH tunnelling with SSHTunnelForwarder to reach a target AWS RDS PostgreSQL database. The connection got through, however when I tried to display the retrieved data frame it always throws "connection refused" error. Please see screenshot below for clarity. I don't understand how this function works, it seems like it does not reuse the established connection from sparks.read command. Can somebody help me on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I already tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SSH into the cluster, try tunnelling, and psql from there [works]&lt;/LI&gt;&lt;LI&gt;directly connect to db instance from proxy host [works]&lt;/LI&gt;&lt;LI&gt;Using panda to load the data frame instead of sparks [does not work]&lt;/LI&gt;&lt;LI&gt;Create new SSH key pair for Databricks [does not work]&lt;/LI&gt;&lt;LI&gt;Change postgresql.conf listen_address to ''*"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2381i8273D8CD4BCF9004/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kurnianto&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 08:10:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12553#M7353</guid>
      <dc:creator>antoooks</dc:creator>
      <dc:date>2021-10-25T08:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: display() function always return connection refused on tunneling despite successfully retrieving the schema</title>
      <link>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12555#M7355</link>
      <description>&lt;P&gt;hi @Kurnianto Trilaksono Sutjipto​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems like a connectivity issue with the url you are trying to connect to. It fails during the display() command because read is a lazy transformation and it will not be executed right away. On the other hand, display() is an action and it will trigger the lazy transformation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following doc will help you to check if you can connect tho this host &lt;A href="https://docs.databricks.com/data/data-sources/sql-databases.html#establish-cloud-connectivity" alt="https://docs.databricks.com/data/data-sources/sql-databases.html#establish-cloud-connectivity" target="_blank"&gt;docs&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 00:41:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12555#M7355</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-11-13T00:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: display() function always return connection refused on tunneling despite successfully retrieving the schema</title>
      <link>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12556#M7356</link>
      <description>&lt;P&gt;If you would like to check for connectivity from databricks to your host, please execute the following command in your notebook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sh nc -vz &amp;lt;jdbcHostname&amp;gt; &amp;lt;jdbcPort&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:53:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/display-function-always-return-connection-refused-on-tunneling/m-p/12556#M7356</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-11-18T17:53:09Z</dc:date>
    </item>
  </channel>
</rss>

