You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Akira AJISAKA (JIRA)" <ji...@apache.org> on 2016/01/28 05:32:39 UTC

[jira] [Commented] (AMBARI-14823) filter_text in logger.py fails to replace non-ascii text

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

Akira AJISAKA commented on AMBARI-14823:
----------------------------------------

The error message is:
{noformat}
Execution of 'cat /var/run/hive/hive.pid 1>/tmp/tmpkxw7s8 2>/tmp/tmpk0zKyV' returned 1. cat: /var/run/hive/hive.pid: そのようなファイルやディレクトリはありません
{noformat}
When {{LANG=C}}, it would be:
{noformat}
Execution of 'cat /var/run/hive/hive.pid 1>/tmp/tmpkxw7s8 2>/tmp/tmpk0zKyV' returned 1. cat: /var/run/hive/hive.pid: No such file or directory
{noformat}

In this example, Hive Metastore did not start because of UnicodeDecodeError.

> filter_text in logger.py fails to replace non-ascii text
> --------------------------------------------------------
>
>                 Key: AMBARI-14823
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14823
>             Project: Ambari
>          Issue Type: Bug
>         Environment: Ambari 2.2.0, HDP 2.3.4, LANG=ja_JP.UTF-8
>            Reporter: Akira AJISAKA
>              Labels: i18n
>
> If the error message includes non-ascii string, filter_text fails.
> {noformat}
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 245, in <module>
>     HiveMetastore().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/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 60, in start
>     hive_service('metastore', action='start', upgrade_type=upgrade_type)
>   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/HIVE/0.12.0.2.0/package/scripts/hive_service.py", line 68, in hive_service
>     pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.hive_user, is_checked_call=False)[1]
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/get_user_call_output.py", line 58, in get_user_call_output
>     err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_string, code, all_output))
>   File "/usr/lib/python2.6/site-packages/resource_management/core/logger.py", line 98, in filter_text
>     text.replace(unprotected_string, protected_string)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 117: ordinal not in range(128)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)