# Logstash doesn't start due to Charset issue

**URL:** <https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291>\
**Category:** Logstash\
**Created:** [June 16, 2020, 12:11pm UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291 "2020-06-16T12:11:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [June 16, 2020, 12:11pm UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/1 "2020-06-16T12:11:30Z")

</div>

hi all  
I installed logstash v. 6.6 on windows. my config file is as following:

```
input {
      beats {
        port => 5044
      }
    }
    output {

elasticsearch { 
    hosts => ["localhost:9200"]
	index => "my_log"

	}
	

	
	stdout { codec => rubydebug }

}

```

when i want to start logstash using cmd , it cannot be started due to following error. it is noted that, this config file is using in another logstash on another vm and works great. could you please advise me about this.

```
D:\Logstash\bin>logstash -f my_logstash.conf
Unable to get Charset 'sun.stdout.encoding', using default UTF-8
java.nio.charset.UnsupportedCharsetException: cp720
        at java.nio.charset.Charset.forName(Unknown Source)
        at org.apache.logging.log4j.util.PropertiesUtil.getCharsetProperty(PropertiesUtil.java:172)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Target.getCharset(ConsoleAppender.java:89)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Target$1.getDefaultCharset(ConsoleAppender.java:74)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:222)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:189)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
```

---

<div class="post-metadata">

**Author:** ![defalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defalt/32/71379_2.png) [@defalt](https://discuss.elastic.co/u/defalt)\
**Post date:** [June 16, 2020, 12:16pm UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/2 "2020-06-16T12:16:39Z")

</div>

Maybe this helps:

```auto
input {
  beats {
    port => 5044
    codec => json { charset => "UTF-8" }
  }  
}

```

Do you have any irregular characters in your data?

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [June 16, 2020, 12:17pm UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/3 "2020-06-16T12:17:54Z")

</div>

data is same for this vm and another one which logstash works great.

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [June 16, 2020, 12:24pm UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/4 "2020-06-16T12:24:57Z")

</div>

It is noted that, filebeat using following codec, but it is shipping logs to both VMs which one VM is ok but the other one faced to mentioned error

` encoding: windows-1256`

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [June 20, 2020, 7:48am UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/5 "2020-06-20T07:48:47Z")

</div>

Dear defalt

the problem has been solved by adding following java options to jvm.options file of logstash:

```
-Dsun.stdout.encoding=UTF-8
-Dsun.stderr.encoding=UTF-8

```

Regards

---

<div class="post-metadata">

**Author:** ![defalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defalt/32/71379_2.png) [@defalt](https://discuss.elastic.co/u/defalt)\
**Post date:** [June 22, 2020, 6:15am UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/6 "2020-06-22T06:15:00Z")

</div>

Great!  
Please mark this as a solution so that others can find it easier 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 20, 2020, 6:15am UTC](https://discuss.elastic.co/t/logstash-doesnt-start-due-to-charset-issue/237291/7 "2020-07-20T06:15:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
