# "Enterprise search" throws java error about UTF8 on Linux server

**URL:** <https://discuss.elastic.co/t/enterprise-search-throws-java-error-about-utf8-on-linux-server/297674>\
**Category:** Elastic Search\
**Created:** [February 19, 2022, 10:04pm UTC](https://discuss.elastic.co/t/enterprise-search-throws-java-error-about-utf8-on-linux-server/297674 "2022-02-19T22:04:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ugnius\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ugnius_v/32/86874_2.png) [@Ugnius\_V](https://discuss.elastic.co/u/Ugnius_V)\
**Post date:** [February 19, 2022, 10:04pm UTC](https://discuss.elastic.co/t/enterprise-search-throws-java-error-about-utf8-on-linux-server/297674/1 "2022-02-19T22:04:41Z")

</div>

Hi!

We have been using the "Enterprise search (next as ENS)" product for a long time. The problem appeared after that when we updated our ENS to v8. Before was used 7.x.x (I can't remember version that have been used before). When we trying to start ENS on our Ubuntu server, we always get JAVA error about UTF8.

```auto
Found java executable in PATH
Java version detected: 11.0.13 (major version: 11)
Enterprise Search is starting...

ERROR: Encoding must be UTF-8!
Please set `JAVA_OPTS='-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8'`

```

I tried to inspect (not so deeply, just a bit) `bin/enterprise-search` sh file and found this:

```auto
ENT_SEARCH_JAVA_OPTS=(
  '-Dsun.jnu.encoding=UTF-8'
  '-Dfile.encoding=UTF-8'
  ...
)

```

So I think there are declared defaults JAVA\_OPTS.

* * *

So, maybe someone had this problem? And knows how to fix this? Maybe any server settings cause this problem?

Thanks for any help and if there would be a need to know more data, let me know and I'll share.

---

<div class="post-metadata">

**Author:** ![maryna.cherniavska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maryna.cherniavska/32/89935_2.png) [@maryna.cherniavska](https://discuss.elastic.co/u/maryna.cherniavska)\
**Post date:** [February 21, 2022, 9:50am UTC](https://discuss.elastic.co/t/enterprise-search-throws-java-error-about-utf8-on-linux-server/297674/2 "2022-02-21T09:50:59Z")

</div>

Hello @Ugnius_V , sorry that you're having problems with Enterprise Search. There was a [very similar topic quite recently and it was successfully resolved](https://discuss.elastic.co/t/cant-enable-read-only-mode/297476/4) - take a look; perhaps it'll be helpful.

---

<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:** [November 4, 2022, 8:34am UTC](https://discuss.elastic.co/t/enterprise-search-throws-java-error-about-utf8-on-linux-server/297674/3 "2022-11-04T08:34:18Z")

</div>


