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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...