Created 02-15-2017 08:59 AM
I am installing 4 node cluster using ambari. I installed ambari server and ambari agent on master node. In addition to that i have installed ambari agents on 2 slave nodes. Ambari server and ambari agents on master node is running.But i am unable to start ambari-agent on my slave nodes due to the error "Ambari Agent start fails with local variable 'server_url' referenced before assignment". This seems like jira bug but it has already been fixed.
https://issues.apache.org/jira/browse/AMBARI-19246
I am using ambari version 2.4.2
Could anyone please help me in starting agents on slave nodes?
Created 02-15-2017 09:19 AM
Although the workaround is quite simple. Just edit the file "/usr/lib/python2.6/site-packages/ambari_agent/main.py"
Just change the line "server_ip = socket.gethostbyname(server_hostname)" as mentioned in:
This need to be done on all the ambari-agent hosts and then followed by "ambari-agent restart"
.
NOTE: It should help only if your issue is exactly same as the one mentioned in :
https://issues.apache.org/jira/browse/AMBARI-19246
Created 02-15-2017 03:03 PM
Are you sure that when you are running the following command on those hosts individually then you are getting the correct FQDN?
- Ambari agent sends registration request to ambari-server every time when agent is restarted. In the registration request it sends the FQDN information of it's own as well. Agent uses the following approach to findout the FQDN using python. So please check if all your hosts are returning correct hostname
.
Also in local system it might get using which is not actually FQDN as above. So local agent might behave bit differently then remote.