Hi, I have HDP2.3.2 Ambari-automated install on 5-node cluster on CentOS 6.4 and all services but Metrics Collector are running. When starting metrics collector I got the “Unicode Encode Error” message as in the stderr file below.
Any recommendations or suggestions?
Thanks!
stderr: /var/lib/ambari-agent/data/errors-939.txt
Traceback (most recent call last):
File “/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py”, line 131, in <module>
AmsCollector().execute()
File “/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py”, line 219, in execute
method(env)
File “/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py”, line 44, in start
self.configure(env, action = ‘start’) # for security
File “/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py”, line 41, in configure
ams(name=’collector’)
File “/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py”, line 89, in thunk
return fn(*args, **kwargs)
File “/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py”, line 202, in ams
group=params.user_group
File “/usr/lib/python2.6/site-packages/resource_management/core/base.py”, line 154, in __init__
self.env.run()
File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 152, in run
self.run_action(resource, action)
File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 118, in run_action
provider_action()
File “/usr/lib/python2.6/site-packages/resource_management/libraries/providers/xml_config.py”, line 67, in action_create
encoding = self.resource.encoding
File “/usr/lib/python2.6/site-packages/resource_management/core/base.py”, line 154, in __init__
self.env.run()
File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 152, in run
self.run_action(resource, action)
File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 118, in run_action
provider_action()
File “/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py”, line 90, in action_create
content = self._get_content()
File “/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py”, line 127, in _get_content
return content()
File “/usr/lib/python2.6/site-packages/resource_management/core/source.py”, line 51, in __call__
return self.get_content()
File “/usr/lib/python2.6/site-packages/resource_management/core/source.py”, line 142, 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 “<template>”, line 5, in top-level template code
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u2028′ in position 1874: ordinal not in range(128)
stdout: /var/lib/ambari-agent/data/output-939.txt
2015-11-01 14:37:20,792 – Group[‘hadoop’] {}
2015-11-01 14:37:20,793 – Group[‘users’] {}
2015-11-01 14:37:20,793 – Group[‘knox’] {}
2015-11-01 14:37:20,793 – Group[‘spark’] {}
2015-11-01 14:37:20,794 – User[‘oozie’] {‘gid’: ‘hadoop’, ‘groups’: [‘users’]}
2015-11-01 14:37:20,794 – User[‘hive’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,795 – User[‘ambari-qa’] {‘gid’: ‘hadoop’, ‘groups’: [‘users’]}
2015-11-01 14:37:20,796 – User[‘flume’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,796 – User[‘hdfs’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,797 – User[‘knox’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,798 – User[‘storm’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,799 – User[‘spark’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,799 – User[‘mapred’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,800 – User[‘accumulo’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,801 – User[‘hbase’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,801 – User[‘tez’] {‘gid’: ‘hadoop’, ‘groups’: [‘users’]}
2015-11-01 14:37:20,802 – User[‘zookeeper’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,803 – User[‘mahout’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,803 – User[‘kafka’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,804 – User[‘falcon’] {‘gid’: ‘hadoop’, ‘groups’: [‘users’]}
2015-11-01 14:37:20,805 – User[‘sqoop’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,805 – User[‘yarn’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,806 – User[‘hcat’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,806 – User[‘ams’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,807 – User[‘atlas’] {‘gid’: ‘hadoop’, ‘groups’: [‘hadoop’]}
2015-11-01 14:37:20,808 – File[‘/var/lib/ambari-agent/tmp/changeUid.sh’] {‘content’: StaticFile(‘changeToSecureUid.sh’), ‘mode’: 0555}
2015-11-01 14:37:20,809 – Execute[‘/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa’] {‘not_if’: ‘(test $(id -u ambari-qa) -gt 1000) || (false)’}
2015-11-01 14:37:20,813 – Skipping Execute[‘/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa’] due to not_if
2015-11-01 14:37:20,814 – Directory[‘/tmp/hbase-hbase’] {‘owner’: ‘hbase’, ‘recursive’: True, ‘mode’: 0775, ‘cd_access’: ‘a’}
2015-11-01 14:37:20,815 – File[‘/var/lib/ambari-agent/tmp/changeUid.sh’] {‘content’: StaticFile(‘changeToSecureUid.sh’), ‘mode’: 0555}
2015-11-01 14:37:20,816 – Execute[‘/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase’] {‘not_if’: ‘(test $(id -u hbase) -gt 1000) || (false)’}
2015-11-01 14:37:20,820 – Skipping Execute[‘/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase’] due to not_if
2015-11-01 14:37:20,820 – Group[‘hdfs’] {‘ignore_failures’: False}
2015-11-01 14:37:20,820 – User[‘hdfs’] {‘ignore_failures’: False, ‘groups’: [‘hadoop’, ‘hdfs’]}
2015-11-01 14:37:20,821 – Directory[‘/etc/hadoop’] {‘mode’: 0755}
2015-11-01 14:37:20,837 – File[‘/usr/hdp/current/hadoop-client/conf/hadoop-env.sh’] {‘content’: InlineTemplate(…), ‘owner’: ‘hdfs’, ‘group’: ‘hadoop’}
2015-11-01 14:37:20,837 – Directory[‘/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir’] {‘owner’: ‘hdfs’, ‘group’: ‘hadoop’, ‘mode’: 0777}
2015-11-01 14:37:20,850 – Execute[(‘setenforce’, ‘0’)] {‘not_if’: ‘(! which getenforce ) || (which getenforce && getenforce | grep -q Disabled)’, ‘sudo’: True, ‘only_if’: ‘test -f /selinux/enforce’}
2015-11-01 14:37:20,854 – Skipping Execute[(‘setenforce’, ‘0’)] due to not_if
2015-11-01 14:37:20,855 – Directory[‘/var/log/hadoop’] {‘owner’: ‘root’, ‘mode’: 0775, ‘group’: ‘hadoop’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:20,857 – Directory[‘/var/run/hadoop’] {‘owner’: ‘root’, ‘group’: ‘root’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:20,857 – Directory[‘/tmp/hadoop-hdfs’] {‘owner’: ‘hdfs’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:20,862 – File[‘/usr/hdp/current/hadoop-client/conf/commons-logging.properties’] {‘content’: Template(‘commons-logging.properties.j2’), ‘owner’: ‘hdfs’}
2015-11-01 14:37:20,864 – File[‘/usr/hdp/current/hadoop-client/conf/health_check’] {‘content’: Template(‘health_check.j2’), ‘owner’: ‘hdfs’}
2015-11-01 14:37:20,864 – File[‘/usr/hdp/current/hadoop-client/conf/log4j.properties’] {‘content’: …, ‘owner’: ‘hdfs’, ‘group’: ‘hadoop’, ‘mode’: 0644}
2015-11-01 14:37:20,874 – File[‘/usr/hdp/current/hadoop-client/conf/hadoop-metrics2.properties’] {‘content’: Template(‘hadoop-metrics2.properties.j2’), ‘owner’: ‘hdfs’}
2015-11-01 14:37:20,875 – File[‘/usr/hdp/current/hadoop-client/conf/task-log4j.properties’] {‘content’: StaticFile(‘task-log4j.properties’), ‘mode’: 0755}
2015-11-01 14:37:20,875 – File[‘/usr/hdp/current/hadoop-client/conf/configuration.xsl’] {‘owner’: ‘hdfs’, ‘group’: ‘hadoop’}
2015-11-01 14:37:20,880 – File[‘/etc/hadoop/conf/topology_mappings.data’] {‘owner’: ‘hdfs’, ‘content’: Template(‘topology_mappings.data.j2’), ‘only_if’: ‘test -d /etc/hadoop/conf’, ‘group’: ‘hadoop’}
2015-11-01 14:37:20,883 – File[‘/etc/hadoop/conf/topology_script.py’] {‘content’: StaticFile(‘topology_script.py’), ‘only_if’: ‘test -d /etc/hadoop/conf’, ‘mode’: 0755}
2015-11-01 14:37:21,139 – Directory[‘/etc/ams-hbase/conf’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘recursive’: True}
2015-11-01 14:37:21,141 – Directory[‘/var/lib/ambari-metrics-collector/hbase-tmp’] {‘owner’: ‘ams’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:21,141 – Directory[‘/var/lib/ambari-metrics-collector/hbase-tmp/local/jars’] {‘owner’: ‘ams’, ‘cd_access’: ‘a’, ‘group’: ‘hadoop’, ‘mode’: 0775, ‘recursive’: True}
2015-11-01 14:37:21,142 – XmlConfig[‘hbase-site.xml’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘conf_dir’: ‘/etc/ams-hbase/conf’, ‘configuration_attributes’: {}, ‘configurations’: …}
2015-11-01 14:37:21,154 – Generating config: /etc/ams-hbase/conf/hbase-site.xml
2015-11-01 14:37:21,154 – File[‘/etc/ams-hbase/conf/hbase-site.xml’] {‘owner’: ‘ams’, ‘content’: InlineTemplate(…), ‘group’: ‘hadoop’, ‘mode’: None, ‘encoding’: ‘UTF-8’}
2015-11-01 14:37:21,180 – XmlConfig[‘hbase-policy.xml’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘conf_dir’: ‘/etc/ams-hbase/conf’, ‘configuration_attributes’: {}, ‘configurations’: {‘security.admin.protocol.acl’: ‘*’, ‘security.masterregion.protocol.acl’: ‘*’, ‘security.client.protocol.acl’: ‘*’}}
2015-11-01 14:37:21,189 – Generating config: /etc/ams-hbase/conf/hbase-policy.xml
2015-11-01 14:37:21,189 – File[‘/etc/ams-hbase/conf/hbase-policy.xml’] {‘owner’: ‘ams’, ‘content’: InlineTemplate(…), ‘group’: ‘hadoop’, ‘mode’: None, ‘encoding’: ‘UTF-8’}
2015-11-01 14:37:21,201 – File[‘/etc/ams-hbase/conf/hbase-env.sh’] {‘content’: InlineTemplate(…), ‘owner’: ‘ams’}
2015-11-01 14:37:21,205 – File[‘/etc/ams-hbase/conf/hadoop-metrics2-hbase.properties’] {‘content’: Template(‘hadoop-metrics2-hbase.properties.j2’), ‘owner’: ‘ams’, ‘group’: ‘hadoop’}
2015-11-01 14:37:21,206 – TemplateConfig[‘/etc/ams-hbase/conf/regionservers’] {‘owner’: ‘ams’, ‘template_tag’: None}
2015-11-01 14:37:21,208 – File[‘/etc/ams-hbase/conf/regionservers’] {‘content’: Template(‘regionservers.j2’), ‘owner’: ‘ams’, ‘group’: None, ‘mode’: None}
2015-11-01 14:37:21,208 – Directory[‘/var/run/ambari-metrics-collector/’] {‘owner’: ‘ams’, ‘recursive’: True}
2015-11-01 14:37:21,208 – Directory[‘/var/log/ambari-metrics-collector’] {‘owner’: ‘ams’, ‘recursive’: True}
2015-11-01 14:37:21,209 – Directory[‘/var/lib/ambari-metrics-collector/hbase’] {‘owner’: ‘ams’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:21,209 – File[‘/var/run/ambari-metrics-collector//distributed_mode’] {‘owner’: ‘ams’, ‘action’: [‘delete’]}
2015-11-01 14:37:21,209 – File[‘/etc/ams-hbase/conf/log4j.properties’] {‘content’: …, ‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘mode’: 0644}
2015-11-01 14:37:21,210 – Directory[‘/etc/ams-hbase/conf’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘recursive’: True}
2015-11-01 14:37:21,210 – Directory[‘/var/lib/ambari-metrics-collector/hbase-tmp’] {‘owner’: ‘ams’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:21,211 – Directory[‘/var/lib/ambari-metrics-collector/hbase-tmp/local/jars’] {‘owner’: ‘ams’, ‘cd_access’: ‘a’, ‘group’: ‘hadoop’, ‘mode’: 0775, ‘recursive’: True}
2015-11-01 14:37:21,211 – XmlConfig[‘hbase-site.xml’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘conf_dir’: ‘/etc/ams-hbase/conf’, ‘configuration_attributes’: {}, ‘configurations’: …}
2015-11-01 14:37:21,220 – Generating config: /etc/ams-hbase/conf/hbase-site.xml
2015-11-01 14:37:21,220 – File[‘/etc/ams-hbase/conf/hbase-site.xml’] {‘owner’: ‘ams’, ‘content’: InlineTemplate(…), ‘group’: ‘hadoop’, ‘mode’: None, ‘encoding’: ‘UTF-8’}
2015-11-01 14:37:21,246 – XmlConfig[‘hbase-policy.xml’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘conf_dir’: ‘/etc/ams-hbase/conf’, ‘configuration_attributes’: {}, ‘configurations’: {‘security.admin.protocol.acl’: ‘*’, ‘security.masterregion.protocol.acl’: ‘*’, ‘security.client.protocol.acl’: ‘*’}}
2015-11-01 14:37:21,256 – Generating config: /etc/ams-hbase/conf/hbase-policy.xml
2015-11-01 14:37:21,256 – File[‘/etc/ams-hbase/conf/hbase-policy.xml’] {‘owner’: ‘ams’, ‘content’: InlineTemplate(…), ‘group’: ‘hadoop’, ‘mode’: None, ‘encoding’: ‘UTF-8’}
2015-11-01 14:37:21,268 – File[‘/etc/ams-hbase/conf/hbase-env.sh’] {‘content’: InlineTemplate(…), ‘owner’: ‘ams’}
2015-11-01 14:37:21,302 – File[‘/etc/ams-hbase/conf/hadoop-metrics2-hbase.properties’] {‘content’: Template(‘hadoop-metrics2-hbase.properties.j2’), ‘owner’: ‘ams’, ‘group’: ‘hadoop’}
2015-11-01 14:37:21,302 – TemplateConfig[‘/etc/ams-hbase/conf/regionservers’] {‘owner’: ‘ams’, ‘template_tag’: None}
2015-11-01 14:37:21,304 – File[‘/etc/ams-hbase/conf/regionservers’] {‘content’: Template(‘regionservers.j2’), ‘owner’: ‘ams’, ‘group’: None, ‘mode’: None}
2015-11-01 14:37:21,305 – Directory[‘/var/run/ambari-metrics-collector/’] {‘owner’: ‘ams’, ‘recursive’: True}
2015-11-01 14:37:21,305 – Directory[‘/var/log/ambari-metrics-collector’] {‘owner’: ‘ams’, ‘recursive’: True}
2015-11-01 14:37:21,305 – File[‘/etc/ams-hbase/conf/log4j.properties’] {‘content’: …, ‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘mode’: 0644}
2015-11-01 14:37:21,306 – Directory[‘/etc/ambari-metrics-collector/conf’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘recursive’: True}
2015-11-01 14:37:21,306 – Directory[‘/var/lib/ambari-metrics-collector/checkpoint’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘recursive’: True, ‘cd_access’: ‘a’}
2015-11-01 14:37:21,307 – XmlConfig[‘ams-site.xml’] {‘owner’: ‘ams’, ‘group’: ‘hadoop’, ‘conf_dir’: ‘/etc/ambari-metrics-collector/conf’, ‘configuration_attributes’: {}, ‘configurations’: …}
2015-11-01 14:37:21,316 – Generating config: /etc/ambari-metrics-collector/conf/ams-site.xml
2015-11-01 14:37:21,316 – File[‘/etc/ambari-metrics-collector/conf/ams-site.xml’] {‘owner’: ‘ams’, ‘content’: InlineTemplate(…), ‘group’: ‘hadoop’, ‘mode’: None, ‘encoding’: ‘UTF-8’}