<?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>question Re: unable to start postgres for ambari in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/unable-to-start-postgres-for-ambari/m-p/154326#M116782</link>
    <description>&lt;PRE&gt;ambari-server start&lt;/PRE&gt;&lt;P&gt;On running the above command, I was encountering the same error while starting Ambari-server, where ambari failed to start the Postgresql server with error 3.&lt;/P&gt;&lt;P&gt;I figured out the following solution to start ambari-server.&lt;/P&gt;&lt;P&gt; You can check the status using&lt;/P&gt;
&lt;PRE&gt;service postgresql status
&lt;/PRE&gt;&lt;P&gt; This gives the status of the service running as PostgreSQL. In case this is giving the error that the service is not running and the server failed to start, you can check the reason with the following commands:&lt;/P&gt;
&lt;PRE&gt;systemctl status postgresql.service
&lt;/PRE&gt;&lt;P&gt; If the reasons show anything related to the port and the listener like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45631-capture.jpg" style="width: 1550px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20993iE46469BDDA8D1035/image-size/medium?v=v2&amp;amp;px=400" role="button" title="45631-capture.jpg" alt="45631-capture.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then navigate to the following path and check the versions:&lt;/P&gt;&lt;PRE&gt;ls /var/lib/pgsql&lt;/PRE&gt;&lt;P&gt;In case you find other folders like 9.6 or 9.5, for example, 9.6, then try and check if postgresql-9.6 is running.&lt;/P&gt;&lt;PRE&gt;service postgresql-9.6 status
systemctl status postgresql-9.6.service
&lt;/PRE&gt;&lt;P&gt;In case you find that this is running, you will have to stop the service and chkconfig it to off.&lt;/P&gt;&lt;PRE&gt;service postgresql-9.6 stop
chkconfig postgresql-9.6 off&lt;/PRE&gt;&lt;P&gt;Try and restart the ambari-server now and this might work, as the ambari server tries to start the postgresql using /var/lib/pgsql/data/postgresql.conf and not the 9.6 version configuration. In order to stop facilitate the server to use the default configuration, we have to stop the server on 9.6 version or point ambari to 9.6 version pgsql.&lt;/P&gt;&lt;PRE&gt;ambari-server start
ambari-server status&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Aug 2019 12:32:44 GMT</pubDate>
    <dc:creator>sirisha_gadwala</dc:creator>
    <dc:date>2019-08-18T12:32:44Z</dc:date>
  </channel>
</rss>

