You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Anandha L Ranganathan <an...@gmail.com> on 2017/08/11 18:57:50 UTC

Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade it
didn't throw any error and it completed successfully.


   1. INFO: Updating Ambari Server properties in ambari.properties ...
   2. INFO: Updating Ambari Server properties in ambari-env.sh ...
   3. WARNING: Original file ambari-env.sh kept
   4. INFO: Fixing database objects owner
   5. Ambari Server configured for Embedded Postgres. Confirm you have
made a backup of the Ambari Server database [y/n] (y)? y
   6. INFO: Upgrading database schema
   7. INFO: Return code from schema upgrade command, retcode = 0
   8. INFO: Schema upgrade completed
   9. Adjusting ambari-server permissions and ownership...
   10. Ambari Server 'upgrade' completed successfully.
   11.
   12.

After upgrade , I restarted the ambari-server and it throws this error.


   1. [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
   2. Using python  /usr/bin/python
   3. Restarting ambari-server
   4. Waiting for server stop...
   5. Ambari Server stopped
   6. Ambari Server running with administrator privileges.
   7. Organizing resource files at /var/lib/ambari-server/resources...
   8. Ambari database consistency check started...
   9. Server PID at: /var/run/ambari-server/ambari-server.pid
   10. Server out at: /var/log/ambari-server/ambari-server.out
   11. Server log at: /var/log/ambari-server/ambari-server.log
   12. Waiting for server start........................
   13. DB configs consistency check failed. Run "ambari-server start
--skip-database-check" to skip. You may try --auto-fix-database flag
to attempt to fix issues automatically. If you use this
"--skip-database-check" option, do not make any changes to your
cluster topology or perform a cluster upgrade until you correct the
database consistency issues. See
/var/log/ambari-server/ambari-server-check-database.log for more
details on the consistency issues.
   14. ERROR: Exiting with exit code -1.
   15. REASON: Ambari Server java process has stopped. Please check
the logs for more information.
   16.
   17.
   18.

I am able to restart ambari-server with --skip-database-check. What is the
reason for this error and how do I fix it?

Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Anandha L Ranganathan <an...@gmail.com>.
Sorry for the delayed reply. I was able fix the query by deleting the
records from the topology_host_task and topology_host_group.

Thanks
Anand


On Sat, Aug 12, 2017 at 7:21 AM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> The error is:
>
>
> 2017-08-11 17:31:34,665 ERROR - Your topology request hierarchy is not
> complete for each row in topology_host_request should exist at least one
> row in topology_host_task, topology_logical_task.
>
>
> This looks like https://issues.apache.org/jira/browse/AMBARI-19929?
>
>
> The fix will prevent the inconsistency but meanwhile you need to delete
> some rows manually.
>
>
> If you are ok, can you open an Apache Ambari JIRA with the log file as
> attachment. Someone will be able to add instructions for cleaning up the
> DB. That way it remains searchable for others.
>
>
> thanks
>
> Sumit
>
> ________________________________
> From: Anandha L Ranganathan <an...@gmail.com>
> Sent: Friday, August 11, 2017 1:29 PM
> To: dev@ambari.apache.org
> Cc: user@ambari.apache.org
> Subject: Re: Ambari upgrade 2.5.1.0 issue - database consistency issues
> for topology
>
> Sumit,
>
> Please find the attached database-check  logs.
>
> On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <smohanty@hortonworks.com<
> mailto:smohanty@hortonworks.com>> wrote:
> Anandha, can you share the content of /var/log/ambari-server/ambari-
> server-check-database.log
>
> thanks
> Sumit
> ________________________________
> From: Anandha L Ranganathan <analog.sony@gmail.com<mailto:
> analog.sony@gmail.com>>
> Sent: Friday, August 11, 2017 11:57 AM
> To: user@ambari.apache.org<ma...@ambari.apache.org>;
> dev@ambari.apache.org<ma...@ambari.apache.org>
> Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for
> topology
>
>
> I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade
> it didn't throw any error and it completed successfully.
>
>   1.  INFO: Updating Ambari Server properties in ambari.properties ...
>   2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
>   3.  WARNING: Original file ambari-env.sh kept
>   4.  INFO: Fixing database objects owner
>   5.  Ambari Server configured for Embedded Postgres. Confirm you have
> made a backup of the Ambari Server database [y/n] (y)? y
>   6.  INFO: Upgrading database schema
>   7.  INFO: Return code from schema upgrade command, retcode = 0
>   8.  INFO: Schema upgrade completed
>   9.  Adjusting ambari-server permissions and ownership...
>   10. Ambari Server 'upgrade' completed successfully.
>   11.
>   12.
>
> After upgrade , I restarted the ambari-server and it throws this error.
>
>   1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
>   2.  Using python  /usr/bin/python
>   3.  Restarting ambari-server
>   4.  Waiting for server stop...
>   5.  Ambari Server stopped
>   6.  Ambari Server running with administrator privileges.
>   7.  Organizing resource files at /var/lib/ambari-server/resources...
>   8.  Ambari database consistency check started...
>   9.  Server PID at: /var/run/ambari-server/ambari-server.pid
>   10. Server out at: /var/log/ambari-server/ambari-server.out
>   11. Server log at: /var/log/ambari-server/ambari-server.log
>   12. Waiting for server start........................
>   13. DB configs consistency check failed. Run "ambari-server start
> --skip-database-check" to skip. You may try --auto-fix-database flag to
> attempt to fix issues automatically. If you use this
> "--skip-database-check" option, do not make any changes to your cluster
> topology or perform a cluster upgrade until you correct the database
> consistency issues. See /var/log/ambari-server/ambari-server-check-database.log
> for more details on the consistency issues.
>   14. ERROR: Exiting with exit code -1.
>   15. REASON: Ambari Server java process has stopped. Please check the
> logs for more information.
>   16.
>   17.
>   18.
>
> I am able to restart ambari-server with --skip-database-check. What is the
> reason for this error and how do I fix it?
>
>
>

Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Anandha L Ranganathan <an...@gmail.com>.
Sorry for the delayed reply. I was able fix the query by deleting the
records from the topology_host_task and topology_host_group.

Thanks
Anand


On Sat, Aug 12, 2017 at 7:21 AM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> The error is:
>
>
> 2017-08-11 17:31:34,665 ERROR - Your topology request hierarchy is not
> complete for each row in topology_host_request should exist at least one
> row in topology_host_task, topology_logical_task.
>
>
> This looks like https://issues.apache.org/jira/browse/AMBARI-19929?
>
>
> The fix will prevent the inconsistency but meanwhile you need to delete
> some rows manually.
>
>
> If you are ok, can you open an Apache Ambari JIRA with the log file as
> attachment. Someone will be able to add instructions for cleaning up the
> DB. That way it remains searchable for others.
>
>
> thanks
>
> Sumit
>
> ________________________________
> From: Anandha L Ranganathan <an...@gmail.com>
> Sent: Friday, August 11, 2017 1:29 PM
> To: dev@ambari.apache.org
> Cc: user@ambari.apache.org
> Subject: Re: Ambari upgrade 2.5.1.0 issue - database consistency issues
> for topology
>
> Sumit,
>
> Please find the attached database-check  logs.
>
> On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <smohanty@hortonworks.com<
> mailto:smohanty@hortonworks.com>> wrote:
> Anandha, can you share the content of /var/log/ambari-server/ambari-
> server-check-database.log
>
> thanks
> Sumit
> ________________________________
> From: Anandha L Ranganathan <analog.sony@gmail.com<mailto:
> analog.sony@gmail.com>>
> Sent: Friday, August 11, 2017 11:57 AM
> To: user@ambari.apache.org<ma...@ambari.apache.org>;
> dev@ambari.apache.org<ma...@ambari.apache.org>
> Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for
> topology
>
>
> I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade
> it didn't throw any error and it completed successfully.
>
>   1.  INFO: Updating Ambari Server properties in ambari.properties ...
>   2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
>   3.  WARNING: Original file ambari-env.sh kept
>   4.  INFO: Fixing database objects owner
>   5.  Ambari Server configured for Embedded Postgres. Confirm you have
> made a backup of the Ambari Server database [y/n] (y)? y
>   6.  INFO: Upgrading database schema
>   7.  INFO: Return code from schema upgrade command, retcode = 0
>   8.  INFO: Schema upgrade completed
>   9.  Adjusting ambari-server permissions and ownership...
>   10. Ambari Server 'upgrade' completed successfully.
>   11.
>   12.
>
> After upgrade , I restarted the ambari-server and it throws this error.
>
>   1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
>   2.  Using python  /usr/bin/python
>   3.  Restarting ambari-server
>   4.  Waiting for server stop...
>   5.  Ambari Server stopped
>   6.  Ambari Server running with administrator privileges.
>   7.  Organizing resource files at /var/lib/ambari-server/resources...
>   8.  Ambari database consistency check started...
>   9.  Server PID at: /var/run/ambari-server/ambari-server.pid
>   10. Server out at: /var/log/ambari-server/ambari-server.out
>   11. Server log at: /var/log/ambari-server/ambari-server.log
>   12. Waiting for server start........................
>   13. DB configs consistency check failed. Run "ambari-server start
> --skip-database-check" to skip. You may try --auto-fix-database flag to
> attempt to fix issues automatically. If you use this
> "--skip-database-check" option, do not make any changes to your cluster
> topology or perform a cluster upgrade until you correct the database
> consistency issues. See /var/log/ambari-server/ambari-server-check-database.log
> for more details on the consistency issues.
>   14. ERROR: Exiting with exit code -1.
>   15. REASON: Ambari Server java process has stopped. Please check the
> logs for more information.
>   16.
>   17.
>   18.
>
> I am able to restart ambari-server with --skip-database-check. What is the
> reason for this error and how do I fix it?
>
>
>

Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Sumit Mohanty <sm...@hortonworks.com>.
The error is:


2017-08-11 17:31:34,665 ERROR - Your topology request hierarchy is not complete for each row in topology_host_request should exist at least one row in topology_host_task, topology_logical_task.


This looks like https://issues.apache.org/jira/browse/AMBARI-19929?


The fix will prevent the inconsistency but meanwhile you need to delete some rows manually.


If you are ok, can you open an Apache Ambari JIRA with the log file as attachment. Someone will be able to add instructions for cleaning up the DB. That way it remains searchable for others.


thanks

Sumit

________________________________
From: Anandha L Ranganathan <an...@gmail.com>
Sent: Friday, August 11, 2017 1:29 PM
To: dev@ambari.apache.org
Cc: user@ambari.apache.org
Subject: Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Sumit,

Please find the attached database-check  logs.

On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <sm...@hortonworks.com>> wrote:
Anandha, can you share the content of /var/log/ambari-server/ambari-server-check-database.log

thanks
Sumit
________________________________
From: Anandha L Ranganathan <an...@gmail.com>>
Sent: Friday, August 11, 2017 11:57 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>; dev@ambari.apache.org<ma...@ambari.apache.org>
Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology


I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade it didn't throw any error and it completed successfully.

  1.  INFO: Updating Ambari Server properties in ambari.properties ...
  2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
  3.  WARNING: Original file ambari-env.sh kept
  4.  INFO: Fixing database objects owner
  5.  Ambari Server configured for Embedded Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
  6.  INFO: Upgrading database schema
  7.  INFO: Return code from schema upgrade command, retcode = 0
  8.  INFO: Schema upgrade completed
  9.  Adjusting ambari-server permissions and ownership...
  10. Ambari Server 'upgrade' completed successfully.
  11.
  12.

After upgrade , I restarted the ambari-server and it throws this error.

  1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
  2.  Using python  /usr/bin/python
  3.  Restarting ambari-server
  4.  Waiting for server stop...
  5.  Ambari Server stopped
  6.  Ambari Server running with administrator privileges.
  7.  Organizing resource files at /var/lib/ambari-server/resources...
  8.  Ambari database consistency check started...
  9.  Server PID at: /var/run/ambari-server/ambari-server.pid
  10. Server out at: /var/log/ambari-server/ambari-server.out
  11. Server log at: /var/log/ambari-server/ambari-server.log
  12. Waiting for server start........................
  13. DB configs consistency check failed. Run "ambari-server start --skip-database-check" to skip. You may try --auto-fix-database flag to attempt to fix issues automatically. If you use this "--skip-database-check" option, do not make any changes to your cluster topology or perform a cluster upgrade until you correct the database consistency issues. See /var/log/ambari-server/ambari-server-check-database.log for more details on the consistency issues.
  14. ERROR: Exiting with exit code -1.
  15. REASON: Ambari Server java process has stopped. Please check the logs for more information.
  16.
  17.
  18.

I am able to restart ambari-server with --skip-database-check. What is the reason for this error and how do I fix it?



Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Sumit Mohanty <sm...@hortonworks.com>.
The error is:


2017-08-11 17:31:34,665 ERROR - Your topology request hierarchy is not complete for each row in topology_host_request should exist at least one row in topology_host_task, topology_logical_task.


This looks like https://issues.apache.org/jira/browse/AMBARI-19929?


The fix will prevent the inconsistency but meanwhile you need to delete some rows manually.


If you are ok, can you open an Apache Ambari JIRA with the log file as attachment. Someone will be able to add instructions for cleaning up the DB. That way it remains searchable for others.


thanks

Sumit

________________________________
From: Anandha L Ranganathan <an...@gmail.com>
Sent: Friday, August 11, 2017 1:29 PM
To: dev@ambari.apache.org
Cc: user@ambari.apache.org
Subject: Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Sumit,

Please find the attached database-check  logs.

On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <sm...@hortonworks.com>> wrote:
Anandha, can you share the content of /var/log/ambari-server/ambari-server-check-database.log

thanks
Sumit
________________________________
From: Anandha L Ranganathan <an...@gmail.com>>
Sent: Friday, August 11, 2017 11:57 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>; dev@ambari.apache.org<ma...@ambari.apache.org>
Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology


I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade it didn't throw any error and it completed successfully.

  1.  INFO: Updating Ambari Server properties in ambari.properties ...
  2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
  3.  WARNING: Original file ambari-env.sh kept
  4.  INFO: Fixing database objects owner
  5.  Ambari Server configured for Embedded Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
  6.  INFO: Upgrading database schema
  7.  INFO: Return code from schema upgrade command, retcode = 0
  8.  INFO: Schema upgrade completed
  9.  Adjusting ambari-server permissions and ownership...
  10. Ambari Server 'upgrade' completed successfully.
  11.
  12.

After upgrade , I restarted the ambari-server and it throws this error.

  1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
  2.  Using python  /usr/bin/python
  3.  Restarting ambari-server
  4.  Waiting for server stop...
  5.  Ambari Server stopped
  6.  Ambari Server running with administrator privileges.
  7.  Organizing resource files at /var/lib/ambari-server/resources...
  8.  Ambari database consistency check started...
  9.  Server PID at: /var/run/ambari-server/ambari-server.pid
  10. Server out at: /var/log/ambari-server/ambari-server.out
  11. Server log at: /var/log/ambari-server/ambari-server.log
  12. Waiting for server start........................
  13. DB configs consistency check failed. Run "ambari-server start --skip-database-check" to skip. You may try --auto-fix-database flag to attempt to fix issues automatically. If you use this "--skip-database-check" option, do not make any changes to your cluster topology or perform a cluster upgrade until you correct the database consistency issues. See /var/log/ambari-server/ambari-server-check-database.log for more details on the consistency issues.
  14. ERROR: Exiting with exit code -1.
  15. REASON: Ambari Server java process has stopped. Please check the logs for more information.
  16.
  17.
  18.

I am able to restart ambari-server with --skip-database-check. What is the reason for this error and how do I fix it?



Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Anandha L Ranganathan <an...@gmail.com>.
Sumit,

Please find the attached database-check  logs.

On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> Anandha, can you share the content of /var/log/ambari-server/ambari-
> server-check-database.log
>
> thanks
> Sumit
> ________________________________
> From: Anandha L Ranganathan <an...@gmail.com>
> Sent: Friday, August 11, 2017 11:57 AM
> To: user@ambari.apache.org; dev@ambari.apache.org
> Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for
> topology
>
>
> I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade
> it didn't throw any error and it completed successfully.
>
>   1.  INFO: Updating Ambari Server properties in ambari.properties ...
>   2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
>   3.  WARNING: Original file ambari-env.sh kept
>   4.  INFO: Fixing database objects owner
>   5.  Ambari Server configured for Embedded Postgres. Confirm you have
> made a backup of the Ambari Server database [y/n] (y)? y
>   6.  INFO: Upgrading database schema
>   7.  INFO: Return code from schema upgrade command, retcode = 0
>   8.  INFO: Schema upgrade completed
>   9.  Adjusting ambari-server permissions and ownership...
>   10. Ambari Server 'upgrade' completed successfully.
>   11.
>   12.
>
> After upgrade , I restarted the ambari-server and it throws this error.
>
>   1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
>   2.  Using python  /usr/bin/python
>   3.  Restarting ambari-server
>   4.  Waiting for server stop...
>   5.  Ambari Server stopped
>   6.  Ambari Server running with administrator privileges.
>   7.  Organizing resource files at /var/lib/ambari-server/resources...
>   8.  Ambari database consistency check started...
>   9.  Server PID at: /var/run/ambari-server/ambari-server.pid
>   10. Server out at: /var/log/ambari-server/ambari-server.out
>   11. Server log at: /var/log/ambari-server/ambari-server.log
>   12. Waiting for server start........................
>   13. DB configs consistency check failed. Run "ambari-server start
> --skip-database-check" to skip. You may try --auto-fix-database flag to
> attempt to fix issues automatically. If you use this
> "--skip-database-check" option, do not make any changes to your cluster
> topology or perform a cluster upgrade until you correct the database
> consistency issues. See /var/log/ambari-server/ambari-server-check-database.log
> for more details on the consistency issues.
>   14. ERROR: Exiting with exit code -1.
>   15. REASON: Ambari Server java process has stopped. Please check the
> logs for more information.
>   16.
>   17.
>   18.
>
> I am able to restart ambari-server with --skip-database-check. What is the
> reason for this error and how do I fix it?
>
>

Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Anandha L Ranganathan <an...@gmail.com>.
Sumit,

Please find the attached database-check  logs.

On Fri, Aug 11, 2017 at 12:57 PM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> Anandha, can you share the content of /var/log/ambari-server/ambari-
> server-check-database.log
>
> thanks
> Sumit
> ________________________________
> From: Anandha L Ranganathan <an...@gmail.com>
> Sent: Friday, August 11, 2017 11:57 AM
> To: user@ambari.apache.org; dev@ambari.apache.org
> Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for
> topology
>
>
> I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade
> it didn't throw any error and it completed successfully.
>
>   1.  INFO: Updating Ambari Server properties in ambari.properties ...
>   2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
>   3.  WARNING: Original file ambari-env.sh kept
>   4.  INFO: Fixing database objects owner
>   5.  Ambari Server configured for Embedded Postgres. Confirm you have
> made a backup of the Ambari Server database [y/n] (y)? y
>   6.  INFO: Upgrading database schema
>   7.  INFO: Return code from schema upgrade command, retcode = 0
>   8.  INFO: Schema upgrade completed
>   9.  Adjusting ambari-server permissions and ownership...
>   10. Ambari Server 'upgrade' completed successfully.
>   11.
>   12.
>
> After upgrade , I restarted the ambari-server and it throws this error.
>
>   1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
>   2.  Using python  /usr/bin/python
>   3.  Restarting ambari-server
>   4.  Waiting for server stop...
>   5.  Ambari Server stopped
>   6.  Ambari Server running with administrator privileges.
>   7.  Organizing resource files at /var/lib/ambari-server/resources...
>   8.  Ambari database consistency check started...
>   9.  Server PID at: /var/run/ambari-server/ambari-server.pid
>   10. Server out at: /var/log/ambari-server/ambari-server.out
>   11. Server log at: /var/log/ambari-server/ambari-server.log
>   12. Waiting for server start........................
>   13. DB configs consistency check failed. Run "ambari-server start
> --skip-database-check" to skip. You may try --auto-fix-database flag to
> attempt to fix issues automatically. If you use this
> "--skip-database-check" option, do not make any changes to your cluster
> topology or perform a cluster upgrade until you correct the database
> consistency issues. See /var/log/ambari-server/ambari-server-check-database.log
> for more details on the consistency issues.
>   14. ERROR: Exiting with exit code -1.
>   15. REASON: Ambari Server java process has stopped. Please check the
> logs for more information.
>   16.
>   17.
>   18.
>
> I am able to restart ambari-server with --skip-database-check. What is the
> reason for this error and how do I fix it?
>
>

Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Sumit Mohanty <sm...@hortonworks.com>.
Anandha, can you share the content of /var/log/ambari-server/ambari-server-check-database.log

thanks
Sumit
________________________________
From: Anandha L Ranganathan <an...@gmail.com>
Sent: Friday, August 11, 2017 11:57 AM
To: user@ambari.apache.org; dev@ambari.apache.org
Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology


I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade it didn't throw any error and it completed successfully.

  1.  INFO: Updating Ambari Server properties in ambari.properties ...
  2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
  3.  WARNING: Original file ambari-env.sh kept
  4.  INFO: Fixing database objects owner
  5.  Ambari Server configured for Embedded Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
  6.  INFO: Upgrading database schema
  7.  INFO: Return code from schema upgrade command, retcode = 0
  8.  INFO: Schema upgrade completed
  9.  Adjusting ambari-server permissions and ownership...
  10. Ambari Server 'upgrade' completed successfully.
  11.
  12.

After upgrade , I restarted the ambari-server and it throws this error.

  1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
  2.  Using python  /usr/bin/python
  3.  Restarting ambari-server
  4.  Waiting for server stop...
  5.  Ambari Server stopped
  6.  Ambari Server running with administrator privileges.
  7.  Organizing resource files at /var/lib/ambari-server/resources...
  8.  Ambari database consistency check started...
  9.  Server PID at: /var/run/ambari-server/ambari-server.pid
  10. Server out at: /var/log/ambari-server/ambari-server.out
  11. Server log at: /var/log/ambari-server/ambari-server.log
  12. Waiting for server start........................
  13. DB configs consistency check failed. Run "ambari-server start --skip-database-check" to skip. You may try --auto-fix-database flag to attempt to fix issues automatically. If you use this "--skip-database-check" option, do not make any changes to your cluster topology or perform a cluster upgrade until you correct the database consistency issues. See /var/log/ambari-server/ambari-server-check-database.log for more details on the consistency issues.
  14. ERROR: Exiting with exit code -1.
  15. REASON: Ambari Server java process has stopped. Please check the logs for more information.
  16.
  17.
  18.

I am able to restart ambari-server with --skip-database-check. What is the reason for this error and how do I fix it?


Re: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology

Posted by Sumit Mohanty <sm...@hortonworks.com>.
Anandha, can you share the content of /var/log/ambari-server/ambari-server-check-database.log

thanks
Sumit
________________________________
From: Anandha L Ranganathan <an...@gmail.com>
Sent: Friday, August 11, 2017 11:57 AM
To: user@ambari.apache.org; dev@ambari.apache.org
Subject: Ambari upgrade 2.5.1.0 issue - database consistency issues for topology


I am trying to upgrade from ambari-2.2.1 to ambari-2.5.1. During upgrade it didn't throw any error and it completed successfully.

  1.  INFO: Updating Ambari Server properties in ambari.properties ...
  2.  INFO: Updating Ambari Server properties in ambari-env.sh ...
  3.  WARNING: Original file ambari-env.sh kept
  4.  INFO: Fixing database objects owner
  5.  Ambari Server configured for Embedded Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
  6.  INFO: Upgrading database schema
  7.  INFO: Return code from schema upgrade command, retcode = 0
  8.  INFO: Schema upgrade completed
  9.  Adjusting ambari-server permissions and ownership...
  10. Ambari Server 'upgrade' completed successfully.
  11.
  12.

After upgrade , I restarted the ambari-server and it throws this error.

  1.  [root@usw2dxdpmn02 yum.repos.d]# ambari-server restart
  2.  Using python  /usr/bin/python
  3.  Restarting ambari-server
  4.  Waiting for server stop...
  5.  Ambari Server stopped
  6.  Ambari Server running with administrator privileges.
  7.  Organizing resource files at /var/lib/ambari-server/resources...
  8.  Ambari database consistency check started...
  9.  Server PID at: /var/run/ambari-server/ambari-server.pid
  10. Server out at: /var/log/ambari-server/ambari-server.out
  11. Server log at: /var/log/ambari-server/ambari-server.log
  12. Waiting for server start........................
  13. DB configs consistency check failed. Run "ambari-server start --skip-database-check" to skip. You may try --auto-fix-database flag to attempt to fix issues automatically. If you use this "--skip-database-check" option, do not make any changes to your cluster topology or perform a cluster upgrade until you correct the database consistency issues. See /var/log/ambari-server/ambari-server-check-database.log for more details on the consistency issues.
  14. ERROR: Exiting with exit code -1.
  15. REASON: Ambari Server java process has stopped. Please check the logs for more information.
  16.
  17.
  18.

I am able to restart ambari-server with --skip-database-check. What is the reason for this error and how do I fix it?