Pivotal Knowledge Base

Follow

Nagios server fails to start on Ambari

Environment

Product Version
Pivotal HD 3.0.x
OS RHEL 6.x

Symptom

Starting Nagios on Ambari web UI fails with the error message:

"Configuration parameter 'templeton.port' was not found in configurations dictionary!"

Error Message:

Error logs is shown in Ambari web UI:

stderr: 
2015-11-20 16:00:36,014 - Error while executing command 'restart':
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 123, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 233, in restart
self.start(env)
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/scripts/nagios_server.py", line 48, in start
self.configure(env) # done for updating configs after Security enabled
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/scripts/nagios_server.py", line 39, in configure
nagios()
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/scripts/nagios.py", line 62, in nagios
nagios_server_config()
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/scripts/nagios_server_config.py", line 39, in nagios_server_config
nagios_server_configfile( 'hadoop-services.cfg')
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/scripts/nagios_server_config.py", line 92, in nagios_server_configfile
mode = mode
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 148, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 149, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 115, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/providers/template_config.py", line 42, in action_create
content = Template(template_name, extra_imports=self.resource.extra_imports)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 148, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 149, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 115, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 96, in action_create
content = self._get_content()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 138, in _get_content
return content()
File "/usr/lib/python2.6/site-packages/resource_management/core/source.py", line 47, in __call__
return self.get_content()
File "/usr/lib/python2.6/site-packages/resource_management/core/source.py", line 126, in get_content
rendered = self.template.render(self.context)
File "/usr/lib/python2.6/site-packages/ambari_jinja2/environment.py", line 891, in render
return self.environment.handle_exception(exc_info, True)
File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2", line 761, in top-level template code
check_command check_templeton_status!{{ templeton_port }}!v1!{{ str(security_enabled).lower() }}!{{ nagios_keytab_path }}!{{ nagios_principal_name }}!{{ kinit_path_local }}
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py", line 79, in __getattr__
raise Fail("Configuration parameter '"+self.name+"' was not found in configurations dictionary!")
Fail: Configuration parameter 'templeton.port' was not found in configurations dictionary! 

Cause

The error message indicates that the configuration parameter templeton.port is not found. Further check shows this parameter is missing in webhcat-site.xml for WebHCat server.

Resolution

Add property templeton.port on Ambari web UI, here is the navigation path:

Ambari > Services > Hive > Configs > "Custom webhcat-site" > "Add Property"

Key: templeton.port

Value: 50111

Note: 50111 is the default port. Change it according to the settings on your site.

Comments

Powered by Zendesk