Community Articles

Find and share helpful community-sourced technical articles.
avatar
Rising Star

Affected versions:

1.2.x, 1.3.0

Symptoms:

The SmartSense view if not displayed even if the HST-Server is up and running. Also , refer the steps that were executed during the upgrade process . It is possible this error has occurred during “hst upgrade-ambari-service” step.

Un-installing old view ...

Installing new view ...

('request method', 'GET') ('request data', None) ('request url', 'http://ambari-server.abcxyz.net:8083/api/v1/views/HORTONWORKS_SMARTSENSE') ('request type', 'http') ('request host', 'ambari-server.abcxyz.net:8083') ('request selector', '/api/v1/views/HORTONWORKS_SMARTSENSE') ('request header', [('Host', 'ambari-server.abcxyz.net:8083'), ('Authorization', 'Basic YWRtaW46Y24zild6MmT9ODVw'), ('User-agent', 'Python-urllib/2.7')]) ('response code', None) ('response content', None)

Traceback (most recent call last): 
File "/usr/sbin/hst-server.py", line 1384, in <module> main(sys.argv) 
File "/usr/sbin/hst-server.py", line 1361, in main upgrade_ambari_plugin(options) 
File "/usr/sbin/hst-server.py", line 1077, in upgrade_ambari_plugin UpgradeService120().upgrade()
File "/usr/hdp/share/hst/hst-agent/lib/hst_agent/upgrade/UpgradeService120.py", line 71, in upgrade self.install_new_view()
File "/usr/hdp/share/hst/hst-agent/lib/hst_agent/upgrade/UpgradeService120.py", line 143, in install_new_view response_code, response_json = self.execute_ambari_api("/api/v1/views/HORTONWORKS_SMARTSENSE")
File "/usr/hdp/share/hst/hst-agent/lib/hst_agent/upgrade/UpgradeService120.py", line 329, in execute_ambari_api response = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeott)
File "/usr/lib/python2.7/urllib2.py", line 406, in open response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response 'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 404: Not Found 

Reason:

This issue can occur if the ambari-server hostname is setup differently in Ambari. For example :

Hostname –f shows hostname as ambari-server.abcxyz.net where as Ambari hosts information show the ip of this host instead of the fully qualified domain name. SmartSense still identifies the Ambari-Server based on its actual hostname rather than the ip being used as hostname in Ambari setup.

Solution:

Firstly, the actual hostname and the hostname configured in Ambari should be in sync.

This issue is fixed in SmartSense 1.3.1 onwards so upgrading to higher version can fix this issue. Otherwise, copy the jar /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/files/view/smartsense-ambari-view-[version].jar to /var/lib/ambari-server/resources/views/ and restart Ambari-Server and HST Server.

1,123 Views