ambari-agent in not running
ERROR 2023-04-06 09:24:25,787 Controller.py:453 - Controller thread failed with exception:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 438, in run
self.actionQueue = ActionQueue(self.config, controller=self)
File "/usr/lib/python2.6/site-packages/ambari_agent/ActionQueue.py", line 85, in __init__
self.customServiceOrchestrator = CustomServiceOrchestrator(config, controller)
File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 82, in __init__
self.load_ClusterHostInfo()
File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 269, in load_ClusterHostInfo
self.clusterHostInfo = json.load(f)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
# cat -An /usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py|grep -A5 -B5 269
264 $
265 def load_ClusterHostInfo(self):$
266 file_path = os.path.join(self.tmp_dir, "clusterHostInfo.json")$
267 if os.path.isfile(file_path):$
268 with open(file_path) as f:$
269 self.clusterHostInfo = json.load(f)$
270 $
271 def requestComponentStatus(self, command):$
272 """$
273 Component status is determined by exit code, returned by runCommand().$
274 Exit code 0 means that component is running and any other exit code means that$
find / -name clusterHostInfo.json
cd /var/lib/ambari-agent/data/
vim clusterHostInfo.json
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 438, in run
self.actionQueue = ActionQueue(self.config, controller=self)
File "/usr/lib/python2.6/site-packages/ambari_agent/ActionQueue.py", line 85, in __init__
self.customServiceOrchestrator = CustomServiceOrchestrator(config, controller)
File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 82, in __init__
self.load_ClusterHostInfo()
File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 269, in load_ClusterHostInfo
self.clusterHostInfo = json.load(f)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
# cat -An /usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py|grep -A5 -B5 269
264 $
265 def load_ClusterHostInfo(self):$
266 file_path = os.path.join(self.tmp_dir, "clusterHostInfo.json")$
267 if os.path.isfile(file_path):$
268 with open(file_path) as f:$
269 self.clusterHostInfo = json.load(f)$
270 $
271 def requestComponentStatus(self, command):$
272 """$
273 Component status is determined by exit code, returned by runCommand().$
274 Exit code 0 means that component is running and any other exit code means that$
find / -name clusterHostInfo.json
cd /var/lib/ambari-agent/data/
vim clusterHostInfo.json