You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "jun aoki (JIRA)" <ji...@apache.org> on 2014/08/16 00:15:19 UTC

[jira] [Commented] (AMBARI-5693) Namenode start utf8 error on non-english linux

    [ https://issues.apache.org/jira/browse/AMBARI-5693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099259#comment-14099259 ] 

jun aoki commented on AMBARI-5693:
----------------------------------

To reproduce this, I'm thinking to set  one of following locale values into LANG variable in  /etc/sysconfig/i18n .

[~Slaytanic], Could you please share which locale exactly you set? 
Is /etc/sysconfig/i18n the right place?

[root]# locale -a |grep zh
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8

> Namenode start utf8 error on non-english linux
> ----------------------------------------------
>
>                 Key: AMBARI-5693
>                 URL: https://issues.apache.org/jira/browse/AMBARI-5693
>             Project: Ambari
>          Issue Type: Bug
>          Components: agent, build
>    Affects Versions: 1.5.1, 1.6.0
>         Environment: CentOS 6.5 with Chinese locale setting
>            Reporter: Lei Xiang
>              Labels: easyfix, patch
>
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/namenode.py", line 71, in <module>
>     NameNode().execute()
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 105, in execute
>     method(env)
>   File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/namenode.py", line 40, in start
>     namenode(action="start")
>   File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py", line 61, in namenode
>     only_if=dfs_check_nn_status_cmd #skip when HA not active
>   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 235, in action_run
>     wait_for_finish=self.resource.wait_for_finish, timeout=self.resource.timeout)
>   File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 35, in checked_call
>     return _call(command, logoutput, True, cwd, env, preexec_fn, user, wait_for_finish, timeout)
>   File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 89, in _call
>     err_msg = ("Execution of '%s' returned %d. %s") % (command[-1], code, out)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 239: ordinal not in range(128)
> ---------------------------------------
> Add #encoding:utf-8 on top line with each scripts? can resolve?



--
This message was sent by Atlassian JIRA
(v6.2#6252)