Getting Data In

日本語の Windows OS で diagコマンドを実行した際に、UnicodeDecodeErrorが発生し、diag が作成できません。

CurryPan
Communicator

Splunk ver.6.3.2 にて、日本語の Window 環境で diag を作成しようとした際に、下記のように、UnicodeDecodeError が発生して diag の作成に失敗します。英語環境では、発生しません。

Copying Splunk dispatch files...
Exception occurred while generating diag, we are deeply sorry.
Traceback (most recent call last):
  File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\clilib\info_
gather.py", line 2907, in main
    create_diag(options, log_buffer)
  File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\clilib\info_
gather.py", line 2797, in create_diag
    copy_dispatch_dir()
  File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\clilib\info_
gather.py", line 1432, in copy_dispatch_dir
    listing = get_dir_listing(dispatch_dir)
  File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\clilib\info_
gather.py", line 2113, in get_dir_listing
    return cmd + "\n" + cmd_output
UnicodeDecodeError: 'utf8' codec can't decode byte 0xba in position 1: invalid s
tart byte

--disable=dispatch オプションを付加した場合には、問題なく Diag が作成されます。しかし、この場合、dispatch ディレクトリが除外されますので、事象によっては、相応しい workaround ではありません。本件は、製品の不具合なのでしょうか。

0 Karma
1 Solution

CurryPan
Communicator

本件は、既知の不具合となります。info_gather.py ファイルに対する修正版の適用が必要になりますので、本不具合に遭遇された場合には、お手数ではございますが、Splunk Support へご連絡ください。

View solution in original post

0 Karma

tkomatsubara_sp
Splunk Employee
Splunk Employee

コマンドラインで、chcp 437 として、一旦英語モードにするとうまく取れますよ。

http://pocketstudio.jp/log3/2012/02/13/change_language_and_chcp/

Windows 2008 R2 + Splunk 6.3.2 にて確認とれました。

CurryPan
Communicator

本件は、既知の不具合となります。info_gather.py ファイルに対する修正版の適用が必要になりますので、本不具合に遭遇された場合には、お手数ではございますが、Splunk Support へご連絡ください。

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...