Support Questions

Find answers, ask questions, and share your expertise

Error " Host checks were skipped on 3 hosts that failed to register.

avatar
Contributor

Hi All..I installed three nodes on VM (Centos7) machines and installed ambari server also on master node.. I logged in to ambari server console i given three FQDN in Target hosts and key also. After click on registration and confirm i got " Host checks were skipped on 3 hosts that failed to register." please help on this.

9 REPLIES 9

avatar
Master Mentor

@Lokesh Mukku

Just be sure everything was correctly done, did you follow the hortonworks documentation for preparing the environment,

- Enable NTP 
- Disable SELinux 
- Disable IPTables

See this document to install ambari agents manually and point it to the ambari server that should work out of the box .

After the installation and configuration of the agents then go back to ambari and when you get to regstering hosts choose the manual step your 2 hosts should register successfully.

Please let me know

avatar
Contributor

@Geoffrey Shelton Okot

Yeah evrything is correct..I tried to install manually i got below error on two nodes node2 and node 3 but on master server ambari-agent started successfully.

ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/am bari-agent.out: ==================== Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 387, in <mo dule> main(heartbeat_stop_callback) File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 355, in mai n (retries, connected, stopped) = netutil.try_to_connect(server_url, MAX_RETRI ES, logger) UnboundLocalError: local variable 'server_url' referenced before assignment ==================== Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log

avatar
Contributor
@Geoffrey Shelton Okot

I uninstalled ambari-agent and reinstalled .. In all nodes ambari-agent is running and i giben FQDN in target hosts and selected manual registration ..getting below error for on all nodes

Registering with the server...

Registration with the server failed.

avatar
Master Mentor

@Lokesh Mukku

As you are getting the following error. (Which indicates a bug)

Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 387, in <module> main(heartbeat_stop_callback) File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 355, in 
mai n (retries, connected, stopped) = netutil.try_to_connect(server_url, MAX_RETRI ES, logger) UnboundLocalError: local variable 'server_url' referenced before assignment 

This seems to be related to: https://issues.apache.org/jira/browse/AMBARI-19246

Which is addressed in Ambari 2.5, So can you please let us know which version of ambari binaries are you using?

If using previous version of ambari then is it possible for you to upgrade to ambari 2.5 or later?

If you can not upgrade then try the Workaround to manually edit the "/usr/lib/python2.6/site-packages/ambari_agent/main.py" script of ambari agent as mentioned in: https://reviews.apache.org/r/54890/diff/1#index_header

Basically move the "server_url" inside the main.py script outside the try block.

avatar
Contributor

Ambari 2.4.x and HDP 2.5.x

avatar
Master Mentor

@Lokesh Mukku

Is there any specific reason hat you are planning to use ambari 2.4.x, Which is too old. The current ambari release is "2.6.1.5". Which has lot many bug fixex as well as many enhancements. Also as mentioned in my previous update that the error that you are getting is because of the BUG AMBARI-19246 so have you applied the workaround?
Are you getting a new error ?

avatar
Master Mentor

@Lokesh Mukku

Did you edit /etc/ambari-agent/conf/ambari-agent.ini to point to your ambari-server-host FQDN?? i.e the $NEW FULLY.QUALIFIED.DOMAIN.NAME should be the output of

$ hostname -f 

from you ambari host

[server] 
hostname=$NEW FULLY.QUALIFIED.DOMAIN.NAME 
url_port=8440 
secured_url_port=8441

Then restart the ambari-agent do this on both node2 and node3

avatar
Contributor

@Geoffrey Shelton Okot Thanks for reply..

Yes replace localhost to master ambari sever hostname on all nodes /etc/ambai-agent/conf/ambari.-agent.ini

avatar
Master Mentor

@Lokesh Mukku

Did you restart the agents on node2 and 3 ?and proceed with manual registration?

If you encountered error can you share?