Greg Hill created AMBARI-10570:
----------------------------------
Summary: ambari-agent fails when cluster name has spaces in it
Key: AMBARI-10570
URL: https://issues.apache.org/jira/browse/AMBARI-10570
Project: Ambari
Issue Type: Bug
Components: ambari-agent
Affects Versions: 1.7.0
Reporter: Greg Hill
Because of this line of code:
https://github.com/apache/ambari/blob/trunk/ambari-agent/src/main/python/ambari_agent/Controller.py#L390
If 'cluster_name' has spaces in it, this request fails because it fails to
URL-encode the value and httplib chokes on it. This causes all of the agents
to go to HEARTBEAT_LOST state and everything fails, but the error it spits out
in the agent log is hugely misleading:
{noformat}
ERROR 2015-04-08 18:30:20,312 Controller.py:140 - Unable to connect to:
https://ambari.local:8441/agent/v1/register/ambari.local
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 128,
in registerWithServer
self.addToStatusQueue(ret['statusCommands'])
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 172,
in addToStatusQueue
self.updateComponents(commands[0]['clusterName'])
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 360,
in updateComponents
response = self.sendRequest(self.componentsUrl + cluster_name, None)
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 353,
in sendRequest
+ '; Response: ' + str(response))
IOError: Response parsing failed! Request data: None; Response:
{noformat}
It connected fine, and parsed the response fine, but then died during
processing of the response. Probably shouldn't be trapping every Exception
here:
https://github.com/apache/ambari/blob/trunk/ambari-agent/src/main/python/ambari_agent/Controller.py#L170
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)