# Installing ELSER Model on Docker Instance Fails

**URL:** <https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 7, 2024, 10:01pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988 "2024-03-07T22:01:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Stefanovich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_stefanovich/32/107702_2.png) [@Steve\_Stefanovich](https://discuss.elastic.co/u/Steve_Stefanovich)\
**Post date:** [March 7, 2024, 10:01pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/1 "2024-03-07T22:01:52Z")

</div>

I followed the official documentation to create a single-node 8.12.2 cluster. Trial license is activated. When I attempt to deploy the elser\_model\_2\_linux-x86\_64 model, I receive the following 429 error: Could not start deployment because no ML nodes with sufficient capacity were found

WSL is set to allow 8GB

I think the relevant node stats are up to the requirements but maybe I've missed something:

```auto
"roles": [
        "data",
        "data_cold",
        "data_content",
        "data_frozen",
        "data_hot",
        "data_warm",
        "ingest",
        "master",
        "ml",
        "remote_cluster_client",
        "transform"
      ],
      "attributes": {
        "ml.allocated_processors_double": "4.0",
        "ml.allocated_processors": "4",
        "ml.machine_memory": "5368709120",
        "transform.config_version": "10.0.0",
        "xpack.installed": "true",
        "ml.config_version": "12.0.0",
        "ml.max_jvm_size": "2684354560"
      }

```

Any suggestions? Thanks!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 7, 2024, 11:09pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/2 "2024-03-07T23:09:40Z")

</div>

> [@Steve\_Stefanovich](#):
>
> WSL is set to allow 8GB

Can you run

`GET /_cluster/stats`

And show

```auto
    "os": {
....
      "mem": {
        "total_in_bytes": 8326275072,
        "adjusted_total_in_bytes": 8326275072,
        "free_in_bytes": 247734272,
        "used_in_bytes": 8078540800,
        "free_percent": 3,
        "used_percent": 97
      }
    },

    "jvm": {
      "max_uptime_in_millis": 749367870,
      "versions": [
        {
          "version": "21.0.2",
          "vm_name": "OpenJDK 64-Bit Server VM",
          "vm_version": "21.0.2+13-58",
          "vm_vendor": "Oracle Corporation",
          "bundled_jdk": true,
          "using_bundled_jdk": true,
          "count": 1
        }
      ],
      "mem": {
        "heap_used_in_bytes": 1733976392,
        "heap_max_in_bytes": 4164943872
      },

and
```

---

<div class="post-metadata">

**Author:** ![Steve\_Stefanovich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_stefanovich/32/107702_2.png) [@Steve\_Stefanovich](https://discuss.elastic.co/u/Steve_Stefanovich)\
**Post date:** [March 7, 2024, 11:22pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/3 "2024-03-07T23:22:47Z")

</div>

> [@stephenb](#):
>
> GET /\_cluster/stats

Here you go:

```auto
"mem": {
        "total_in_bytes": 5368709120,
        "adjusted_total_in_bytes": 5368709120,
        "free_in_bytes": 1440641024,
        "used_in_bytes": 3928068096,
        "free_percent": 27,
        "used_percent": 73
      }

 "jvm": {
      "max_uptime_in_millis": 9577615,
      "versions": [
        {
          "version": "21.0.2",
          "vm_name": "OpenJDK 64-Bit Server VM",
          "vm_version": "21.0.2+13-58",
          "vm_vendor": "Oracle Corporation",
          "bundled_jdk": true,
          "using_bundled_jdk": true,
          "count": 1
        },
 "mem": {
        "heap_used_in_bytes": 171326576,
        "heap_max_in_bytes": 2684354560
      },

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 7, 2024, 11:45pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/4 "2024-03-07T23:45:56Z")

</div>

Oh and @Steve_Stefanovich Welcome to the community

So what yours says is

The total host Docker Container RAM is 5GB

Your Total JVM is 2.5GB

That is shared between Elasticsearch normal Data Stuff and the ML Node.

I think you are short on RAM

ELSER says it needs 2GB Off Heap...

 ![Screenshot 2024-03-07 at 3.36.23 PM](https://us1.discourse-cdn.com/elastic/original/3X/2/8/2837a3902288ad44bed09cce078d5e5c2fdfc6c3.png)

I deployed Mine Single Node Docker with 8GB Available to the Container which results in 4GB HEAP

 ![Screenshot 2024-03-07 at 3.38.01 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d99d536c1c00362b417aaabd33ee72e2a532d8c5.png)

If you are running other stuff in your Docker ENV before you start elasticsearch... Elaticsearch will get the "leftovers" then JVM is 50% of that...

I will try with a Heap your size and see what happens

---

<div class="post-metadata">

**Author:** ![Steve\_Stefanovich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_stefanovich/32/107702_2.png) [@Steve\_Stefanovich](https://discuss.elastic.co/u/Steve_Stefanovich)\
**Post date:** [March 8, 2024, 8:57pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/5 "2024-03-08T20:57:57Z")

</div>

Thanks Stephen. I bumped WSL to 12GB then recreated the image using:

`docker run -e ES_JAVA_OPTS="-Xms4g -Xmx4g" --name es01 --net elastic -p 9200:9200 -it -m 5GB docker.elastic.co/elasticsearch/elasticsearch:8.12.2`

but I'm still facing the same issue. The node stats reflect the updated memory:

```auto
"jvm": {
      "max_uptime_in_millis": 308187,
      "versions": [
        {
          "version": "21.0.2",
          "vm_name": "OpenJDK 64-Bit Server VM",
          "vm_version": "21.0.2+13-58",
          "vm_vendor": "Oracle Corporation",
          "bundled_jdk": true,
          "using_bundled_jdk": true,
          "count": 1
        }
      ],
      "mem": {
        "heap_used_in_bytes": 931135488,
        "heap_max_in_bytes": 4294967296
      },
      "threads": 85
    },

```

Any other ides what I should be checking?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 8, 2024, 9:02pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/6 "2024-03-08T21:02:55Z")

</div>

I clarified that 2GB for the model is off heap so it is not part of the JVM but they're still has to be room for it.

> [@Steve\_Stefanovich](#):
>
> it -m 5GB

Is that saying that the whole container of memory is 5gb

If so, that's probably still not enough.

Can you show the OS like I showed above? Always show both OS and JVM.

---

<div class="post-metadata">

**Author:** ![Steve\_Stefanovich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_stefanovich/32/107702_2.png) [@Steve\_Stefanovich](https://discuss.elastic.co/u/Steve_Stefanovich)\
**Post date:** [March 8, 2024, 9:24pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/7 "2024-03-08T21:24:58Z")

</div>

Sorry, missed the "off heap" portion. I tried one more time, assigning 6GB to the container and 1GB to the JVM heap. It's still complaining.

```auto
"os": {
      "available_processors": 4,
      "allocated_processors": 4,
      "names": [
        {
          "name": "Linux",
          "count": 1
        }
      ],
      "pretty_names": [
        {
          "pretty_name": "Ubuntu 20.04.6 LTS",
          "count": 1
        }
      ],
      "architectures": [
        {
          "arch": "amd64",
          "count": 1
        }
      ],
      "mem": {
        "total_in_bytes": 6442450944,
        "adjusted_total_in_bytes": 6442450944,
        "free_in_bytes": 3937071104,
        "used_in_bytes": 2505379840,
        "free_percent": 61,
        "used_percent": 39
      }
    },
	
"jvm": {
      "max_uptime_in_millis": 205021,
      "versions": [
        {
          "version": "21.0.2",
          "vm_name": "OpenJDK 64-Bit Server VM",
          "vm_version": "21.0.2+13-58",
          "vm_vendor": "Oracle Corporation",
          "bundled_jdk": true,
          "using_bundled_jdk": true,
          "count": 1
        }
      ],
      "mem": {
        "heap_used_in_bytes": 651999304,
        "heap_max_in_bytes": 1073741824
      },
      "threads": 84
    },

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 8, 2024, 11:51pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/8 "2024-03-08T23:51:40Z")

</div>

can you try without the `-m 5GB`

---

<div class="post-metadata">

**Author:** ![Steve\_Stefanovich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_stefanovich/32/107702_2.png) [@Steve\_Stefanovich](https://discuss.elastic.co/u/Steve_Stefanovich)\
**Post date:** [March 11, 2024, 5:00pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/9 "2024-03-11T17:00:26Z")

</div>

That worked! Thank you for all the assistance..

---

<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:** [April 8, 2024, 5:01pm UTC](https://discuss.elastic.co/t/installing-elser-model-on-docker-instance-fails/354988/10 "2024-04-08T17:01:19Z")

</div>

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