Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Manually start AMBARI_INFRA service

Highlighted

Manually start AMBARI_INFRA service

Contributor

Hi!

After ambari-server setup, I recovered the database from backup.

And when trying to start ambari-server it gives following error:

ServiceNotFoundException: Service not found, clusterName=hdf_kg, serviceName=AMBARI_INFRA
# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
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................
DB configs consistency check found warnings. See /var/log/ambari-server/ambari-server-check-database.log for more details.
ERROR: Exiting with exit code -1. 
REASON: Ambari Server java process has stopped. Please check the logs for more information.
[root@bi-nifi1 backup]# cat /var/log/ambari-server/ambari-server.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Database consistency check result: DB_CHECK_WARNING
An unexpected error occured during starting Ambari Server.
org.apache.ambari.server.ServiceNotFoundException: Service not found, clusterName=hdf_kg, serviceName=AMBARI_INFRA
        at org.apache.ambari.server.state.cluster.ClusterImpl.getService(ClusterImpl.java:864)
        at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1240)
        at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:532)
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1067)
[root@bi-nifi1 backup]# 

Is it possible to manually start AMBARI_INFRA service?


Thanks in advance!

4 REPLIES 4

Re: Manually start AMBARI_INFRA service

Expert Contributor

@Gulshan Agivetova use below command to start Ambari Infra Solr as user infra-solr:


# su - infra-solr -c '/usr/lib/ambari-infra-solr/bin/solr start -cloud -noprompt -s /opt/ambari_infra_solr/data'

Re: Manually start AMBARI_INFRA service

Contributor

@scharan, thank you for your response!!

I've run the command you gave, but still ambari-server start gives the same error. Maybe Infra Solr Clients should also be started? If yes, how can they manually be started, if not, could you please give any suggestion?

org.apache.ambari.server.ServiceNotFoundException: Service not found, clusterName=hdf_kg, serviceName=AMBARI_INFRA
[root@bi-nifi1 dmp]# su - infra-solr -c '/usr/lib/ambari-infra-solr/bin/solr start -cloud -noprompt -s /opt/ambari_infra_solr/data'
NOTE: Please install lsof as this script needs it to determine if Solr is listening on port 8983.

Started Solr server on port 8983 (pid=8878). Happy searching!


[root@bi-nifi1 dmp]# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
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.................
DB configs consistency check found warnings. See /var/log/ambari-server/ambari-server-check-database.log for more details.
ERROR: Exiting with exit code -1. 
REASON: Ambari Server java process has stopped. Please check the logs for more information.
[root@bi-nifi1 dmp]# cat /var/log/ambari-server/ambari-server.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Database consistency check result: DB_CHECK_WARNING
An unexpected error occured during starting Ambari Server.
org.apache.ambari.server.ServiceNotFoundException: Service not found, clusterName=hdf_kg, serviceName=AMBARI_INFRA
        at org.apache.ambari.server.state.cluster.ClusterImpl.getService(ClusterImpl.java:864)
        at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1240)
        at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:532)
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1067)

Thanks in advance!

Re: Manually start AMBARI_INFRA service

Expert Contributor

@Gulshan Agivetova I see ambari-infra started, Ambari-server is failing due to DB inconsistency, looks like you have installed Ambari-infra after taking the back up of DB (which you have restored now), Share the output of below command from ambari DB

# select * from hostcomponentstate where service_name = 'AMBARI_INFRA'

# select * from servicecomponentdesiredstate where service_name = 'AMBARI_INFRA'

Re: Manually start AMBARI_INFRA service

Contributor

@scharan, here is the result of commands you asked. I'm trying to restore my Ambari after unsuccessful upgrade from HDF 3.0 to HDF 3.1

ambari=# select * from ambari.hostcomponentstate where service_name = 'AMBARI_INFRA';
 id  | cluster_id |  component_name   | version | current_state | host_id | service_name | upgrade_state | security_state 
-----+------------+-------------------+---------+---------------+---------+--------------+---------------+----------------
 105 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |     101 | AMBARI_INFRA | NONE          | UNKNOWN
   4 |          2 | INFRA_SOLR        | UNKNOWN | STARTED       |      51 | AMBARI_INFRA | NONE          | UNKNOWN
 104 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |     103 | AMBARI_INFRA | NONE          | UNKNOWN
 106 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |     102 | AMBARI_INFRA | NONE          | UNKNOWN
  20 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |      51 | AMBARI_INFRA | NONE          | UNKNOWN
  21 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |       4 | AMBARI_INFRA | NONE          | UNKNOWN
  24 |          2 | INFRA_SOLR_CLIENT | UNKNOWN | INSTALLED     |       1 | AMBARI_INFRA | NONE          | UNKNOWN
(7 rows)


ambari=# select * from ambari.servicecomponentdesiredstate where service_name = 'AMBARI_INFRA';
 id |  component_name   | cluster_id | desired_state | service_name | recovery_enabled | desired_repo_version_id | repo_state 
----+-------------------+------------+---------------+--------------+------------------+-------------------------+------------
  4 | INFRA_SOLR_CLIENT |          2 | INSTALLED     | AMBARI_INFRA |                0 |                      51 | CURRENT
  3 | INFRA_SOLR        |          2 | STARTED       | AMBARI_INFRA |                1 |                      51 | CURRENT
(2 rows)

Can you please help to start the INFRA_SOLR_CLIENT services?

With kind regards!

Don't have an account?
Coming from Hortonworks? Activate your account here