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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...