<?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: Ambari doesnt start after postgresql Upgrade in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226685#M60890</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2758/vinaykumarpotnuru.html" nodeid="2758"&gt;@vinay kumar
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have upgraded the PostgresSQL to 9.3, But do you see that the "ambari" DB still exist there?&lt;/P&gt;&lt;P&gt;
Please check if you see the Ambari DB Tables there?&lt;/P&gt;&lt;PRE&gt;# psql -U ambari ambari
Password for user ambari:  bigdata
psql (9.5.5)
Type "help" for help.
ambari=&amp;gt; \dt+&lt;/PRE&gt;&lt;P&gt;If the Postgres SQL 9.3 has the ambari DB (upgraded from Postgres SQL 8.1) then you shoudl see all the existing tables and data.&lt;/P&gt;&lt;P&gt;
Now If the postgressql hostname or port is changed during upgrade then you shoudl run the "smbari-server setup" again and this time you should choose the "" option and say "y"&lt;/P&gt;&lt;PRE&gt;Enter advanced database configuration [y/n] (n)? y&lt;/PRE&gt;&lt;P&gt;
And then choose the hostname &amp;amp; port properly and do nto use the &lt;STRONG&gt;"[1] - PostgreSQL (Embedded)"&lt;/STRONG&gt; option while setup else ambari will try to reinitialize the DB and as the Ambari DB already exist so it might cause issues.&lt;/P&gt;&lt;P&gt;You should choose Option &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[4] - PostgreSQL&lt;/STRONG&gt;
&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
Example:  (Before doing the ambari-server setup again Please take Ambari DB dump  and keep safely)
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? n
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (4): 4
Hostname (standaloneambari.example.com): standaloneambari.example.com 
Port (5432): 
Database name (ambari): 
Postgres schema (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Configuring ambari database...
Configuring remote database connection properties...
WARNING:
 Before starting Ambari Server, you must run the following DDL against 
the database to create the schema: 
/var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2758/vinaykumarpotnuru.html" nodeid="2758"&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 22:33:24 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-05-10T22:33:24Z</dc:date>
    <item>
      <title>Ambari doesnt start after postgresql Upgrade</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226684#M60889</link>
      <description>&lt;P&gt;We have a four-node Hadoop cluster with HDP 2.4 and Kerberos installed in it. As this is our production cluster, We wanted to have HA for all the services including the PostgreSQL database which is used by Hive, Ambari, and Oozie for storing the metadata. However, the version of our PostgreSQL, which is 8.4.2 doesn't support the inbuilt feature(stream replication) of Postgres.&lt;/P&gt;&lt;P&gt;So, we have decided to upgrade PostgreSQL to a version(9.3) ambari supports.&lt;/P&gt;&lt;P&gt;I followed &lt;A href="https://dba.stackexchange.com/questions/98144/how-to-upgrade-postgresql-8-4-to-9-4"&gt;this&lt;/A&gt; link to upgrade the Postgres. Everything went well. Expect that, we are getting the following error when restarting ambari server.&lt;/P&gt;&lt;PRE&gt;Ambari Server running with administrator privileges.
Running initdb: This may take upto a minute.
Data directory is not empty!
[FAILED]
&lt;/PRE&gt;&lt;P&gt;Could someone help?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 22:12:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226684#M60889</guid>
      <dc:creator>vinaykumarpotnu</dc:creator>
      <dc:date>2017-05-10T22:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari doesnt start after postgresql Upgrade</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226685#M60890</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2758/vinaykumarpotnuru.html" nodeid="2758"&gt;@vinay kumar
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have upgraded the PostgresSQL to 9.3, But do you see that the "ambari" DB still exist there?&lt;/P&gt;&lt;P&gt;
Please check if you see the Ambari DB Tables there?&lt;/P&gt;&lt;PRE&gt;# psql -U ambari ambari
Password for user ambari:  bigdata
psql (9.5.5)
Type "help" for help.
ambari=&amp;gt; \dt+&lt;/PRE&gt;&lt;P&gt;If the Postgres SQL 9.3 has the ambari DB (upgraded from Postgres SQL 8.1) then you shoudl see all the existing tables and data.&lt;/P&gt;&lt;P&gt;
Now If the postgressql hostname or port is changed during upgrade then you shoudl run the "smbari-server setup" again and this time you should choose the "" option and say "y"&lt;/P&gt;&lt;PRE&gt;Enter advanced database configuration [y/n] (n)? y&lt;/PRE&gt;&lt;P&gt;
And then choose the hostname &amp;amp; port properly and do nto use the &lt;STRONG&gt;"[1] - PostgreSQL (Embedded)"&lt;/STRONG&gt; option while setup else ambari will try to reinitialize the DB and as the Ambari DB already exist so it might cause issues.&lt;/P&gt;&lt;P&gt;You should choose Option &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[4] - PostgreSQL&lt;/STRONG&gt;
&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
Example:  (Before doing the ambari-server setup again Please take Ambari DB dump  and keep safely)
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? n
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (4): 4
Hostname (standaloneambari.example.com): standaloneambari.example.com 
Port (5432): 
Database name (ambari): 
Postgres schema (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Configuring ambari database...
Configuring remote database connection properties...
WARNING:
 Before starting Ambari Server, you must run the following DDL against 
the database to create the schema: 
/var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2758/vinaykumarpotnuru.html" nodeid="2758"&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 22:33:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226685#M60890</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-05-10T22:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari doesnt start after postgresql Upgrade</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226686#M60891</link>
      <description>&lt;P&gt;yes, I have restored the tables using the backup I have taken before I stopped old PostgreSQL(8.4). reinitializing it with option 4 solved the issue.  Thank you. 
&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 23:16:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-doesnt-start-after-postgresql-Upgrade/m-p/226686#M60891</guid>
      <dc:creator>vinaykumarpotnu</dc:creator>
      <dc:date>2017-05-10T23:16:34Z</dc:date>
    </item>
  </channel>
</rss>

