Last active
September 13, 2018 21:32
-
-
Save dasgoll/1073b154dc0b4f345881 to your computer and use it in GitHub Desktop.
ambari-agent hostname error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR 2015-12-22 09:51:40,916 main.py:146 - Ambari agent machine hostname (ip-172-29-2-93.eu-west-1.compute.internal) does not match expected ambari server hostname (namenode1.dscluster200.prod.souq.com). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly | |
ERROR 2015-12-22 09:51:40,916 main.py:315 - Fatal exception occurred: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module> | |
main(heartbeat_stop_callback) | |
File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 265, in main | |
perform_prestart_checks(expected_hostname) | |
File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 147, in perform_prestart_checks | |
sys.exit(1) | |
SystemExit: 1 | |
INFO 2015-12-22 09:51:40,917 ExitHelper.py:53 - Performing cleanup before exiting... | |
', None) | |
(' perform_prestart_checks(expected_hostname) | |
File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 147, in perform_prestart_checks | |
sys.exit(1) | |
SystemExit: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim /etc/ambari-agent/conf/ambari-agent.ini | |
under [agent] | |
hostname_script=/etc/ambari-agent/conf/hostname_script.sh | |
public_hostname_script=/etc/ambari-agent/conf/hostname_script.sh | |
vim /etc/ambari-agent/conf/hostname_script.sh | |
#!/bin/bash | |
echo $(hostname -f) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment