Created 02-16-2017 04:16 PM
Hi,
I downloaded the sandbox from Hortonworks site and installed it successfully. As the ambari server wasn't running automatically, I installed the ambari server through command line and tried to start the server.
I am receiving the following error in the server log. I did connect using the same user and performed select on table successfully that is mentioned in the log. Any help is much appreciated.
16 Feb 2017 18:35:13,319 INFO [main] AmbariServer:913 - Getting the controller 16 Feb 2017 18:35:15,883 ERROR [main] AmbariServer:927 - Failed to run the Ambari Server Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: ERROR: could not read block 0 of relation base/16384/16953: read only 0 of 8192 bytes Error Code: 0 Call: SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?) bind => [1 parameter bound] Query: ReadObjectQuery(name="readMetainfoEntity" referenceClass=MetainfoEntity sql="SELECT "metainfo_key", "metainfo_value" FROM metainfo WHERE ("metainfo_key" = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684)
[root@sandbox ~]# psql -U ambari -d ambari;
Password for user ambari:
psql (8.4.20) Type "help" for help.
ambari=> SELECT "metainfo_key", "metainfo_value" FROM metainfo;
metainfo_key | metainfo_value
--------------+----------------
(0 rows)
Created 02-17-2017 04:38 AM
In MySQL also you will have no data ... because you do not have a dump. (Hence using MySQL / Postgres both are same in this scenario)
The current cluster information is anyway lost due to postgres table/db corruption. In this case you can try running the following command to reset postgres ambari DB (it will clear all previous data)
ambari-server reset
.
Created 02-17-2017 04:51 AM
Created 02-17-2017 04:55 AM
The server is up and running and I am able to open the ambari login page. Thanks a lot and I appreciate you for all the guidance you provided.
Created 08-15-2018 12:21 PM
@Jay Kumar SenSharma In my case, when I experienced the error it was because my ambari database user did not have any privileges on the ambari database. (Postgresql 9.5) I added the ambari role to postgres role and it worked.