Member since
02-10-2017
22
Posts
1
Kudos Received
0
Solutions
02-17-2017
04:55 AM
@Jay SenSharma 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.
... View more
02-17-2017
04:48 AM
@Jay SenSharma I have performed the ambari server reset. What shall I do next for configuring the Ambari server and running the cluster wizard.? [root@sandbox ~]# ambari-server reset Using python /usr/bin/python
Resetting ambari-server
**** WARNING **** You are about to reset and clear the Ambari Server database. This will remove all cluster host and configuration information from the database. You will be required to re-configure the Ambari server and re-run the cluster wizard. Are you SURE you want to perform the reset [yes/no] (no)? yes Confirm server reset [yes/no](no)? yes Resetting the Server database...
Connecting to local database...done. WARNING: Non critical error in DDL, use --verbose for more information
Ambari Server 'reset' completed with warnings. [root@sandbox ~]#
... View more
02-17-2017
04:24 AM
@Jay SenSharma I don't see any index defined on the metainfo table. How about migrating to MySQL and performing the ambari setup? Any suggestion?
... View more
02-17-2017
03:55 AM
@Jay SenSharma I do agree to your point that database is corrupted. I tried performing the insert to metainfo and received the same error: ambari=> INSERT INTO metainfo(metainfo_key, metainfo_value) VALUES ('version','2.4.0'); ERROR: could not read block 0 of relation base/16384/16953: read only 0 of 8192 bytes How shall I proceed as I don't have any prior DB dump?
... View more
02-17-2017
03:33 AM
@Jay SenSharma Would it be possible for you to provide me the ambari version and the HDP/HDP-UTIL repository information so that I can insert it into "metainfo" and test again?
... View more
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)
... View more
Labels:
- Labels:
-
Apache Ambari
02-15-2017
07:25 PM
I verified the log file and got the following error message: 15 Feb 2017 19:23:32,044 ERROR [main] AmbariJpaLocalTxnInterceptor:180 - [DETAILED ERROR] Rollback reason:
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/16567: read only 0 of 8192 bytes
Error Code: 0
Call: SELECT cluster_id, current_cluster_state, current_stack_id FROM clusterstate WHERE (cluster_id = ?)
bind => [1 parameter bound]
Query: ReadObjectQuery(name="clusterStateEntity" referenceClass=ClusterStateEntity )
... View more
02-15-2017
07:22 PM
Thanks @apappu I have corrected the "ambari.properties" file with correct user and also updated the "password.dat" file. Looks like the server started successfully but upon checking the server status the message says its not running. [root@sandbox ~]# ambari-server start --skip-database-check Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari Server is starting with the database consistency check skipped. 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.
Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start.................... Ambari Server 'start' completed successfully. [root@sandbox ~]# ambari-server status Using python /usr/bin/python
Ambari-server status
Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid
... View more
02-15-2017
06:02 PM
@Jay SenSharma I tried to start the ambari server by skipping database consistency check (ambari-server start --skip-database-check) and got the following error. 15 Feb 2017 17:53:38,668 INFO [main] AmbariServer:913 - Getting the controller
15 Feb 2017 17:53:41,285 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: relation "metainfo" does not exist
Position: 46
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)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) How can I fix these issues? Can you please help? Is skipping database consistency check recommended?
... View more
02-15-2017
03:55 PM
@Jay SenSharma Thanks for this step. I was able to locate the issue in "ambari.properties" file. ./ambari.properties:server.jdbc.rca.url=jdbc:postgresql://sandbox.hortonworks.com:5432/AMBARIDATABASE
./ambari.properties:server.jdbc.url=jdbc:postgresql://sandbox.hortonworks.com:5432/AMBARIDATABASE I have modified the above entries and now pointing it to "ambari". The earlier error is resolved now but the server startup is failing in database consistency check. I have attached the log file for reference. Can you please take a look and let me know what might be missing?ambari-server-check-database.txt
... View more