<?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 SAS Access to Postgres | Error in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Access-to-Postgres-Error/m-p/944947#M29046</link>
    <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a SAS installed on Linux (9.4M7). Until last Friday we connected to postgres without any problem. After that, we received the following error:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;CLI error trying to establish connection: FATAL: no pf_hba.conf entry for host x.x.x.x, user yyyy, database zzzz, no encryption.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We used other tools to connect to Postgres too, and on it the solution was add the following options on the connection string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SSL=true&lt;/P&gt;
&lt;P&gt;SSLFACTORY= org.postgrsql.ssl.NonValidatingFactory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to add it to the current connection but SSLFACTORY option was not recognized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our current connection string is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;proc sql;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp; connect to postgres (server=xxxx port=35432 database=xxx user=xxx password=xxx)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to pass the SSLFACTORY option?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2024 19:26:34 GMT</pubDate>
    <dc:creator>MariaD</dc:creator>
    <dc:date>2024-09-23T19:26:34Z</dc:date>
    <item>
      <title>SAS Access to Postgres | Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Access-to-Postgres-Error/m-p/944947#M29046</link>
      <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a SAS installed on Linux (9.4M7). Until last Friday we connected to postgres without any problem. After that, we received the following error:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;CLI error trying to establish connection: FATAL: no pf_hba.conf entry for host x.x.x.x, user yyyy, database zzzz, no encryption.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We used other tools to connect to Postgres too, and on it the solution was add the following options on the connection string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SSL=true&lt;/P&gt;
&lt;P&gt;SSLFACTORY= org.postgrsql.ssl.NonValidatingFactory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to add it to the current connection but SSLFACTORY option was not recognized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our current connection string is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;proc sql;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp; connect to postgres (server=xxxx port=35432 database=xxx user=xxx password=xxx)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to pass the SSLFACTORY option?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 19:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Access-to-Postgres-Error/m-p/944947#M29046</guid>
      <dc:creator>MariaD</dc:creator>
      <dc:date>2024-09-23T19:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Access to Postgres | Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Access-to-Postgres-Error/m-p/944963#M29048</link>
      <description>&lt;P&gt;I believe you can pass these two database parameters via SAS libname/connection option &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p1qu1edv1jhk1vn1dumx9uorn6l2.htm" target="_self"&gt;CONOPTS='connection_options'&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When copy/pasting the error message into chatGPT or Copilot the instructions are to update on the Postgres side. Below the first step as received as answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some steps to resolve this issue:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Edit the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pg_hba.conf&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;File&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Log into your PostgreSQL server.&lt;/LI&gt;
&lt;LI&gt;Locate the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pg_hba.conf&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;file, typically found in the data directory (e.g.,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;/var/lib/pgsql/data/&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI&gt;Add an entry for your host. For example:
&lt;DIV class="code" tabindex="-1"&gt;
&lt;PRE&gt;&lt;CODE&gt;host    all             all             x.x.x.x/32            md5
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;BUTTON type="button" aria-label="Copy"&gt;&lt;/BUTTON&gt;&lt;/LI&gt;
&lt;LI&gt;Replace&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;x.x.x.x&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with the actual IP address you’re connecting from.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;......&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 22:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Access-to-Postgres-Error/m-p/944963#M29048</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-09-23T22:18:26Z</dc:date>
    </item>
  </channel>
</rss>

