# ML is available but not enabled

**URL:** https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357
**Category:** Elasticsearch
**Tags:** elastic-stack-machine-learning
**Created:** [May 16, 2019, 9:50am UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357 "2019-05-16T09:50:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![robertvolkmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robertvolkmann/32/46341_2.png) [@robertvolkmann](https://discuss.elastic.co/u/robertvolkmann)
#### Post date: [May 16, 2019, 9:50am UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/1 "2019-05-16T09:50:22Z")

</div>

Hi everyone,

we started with our trial licence to evaluate the machine learning features. But after following the elasticsearch documentation machine-learning remains disabled.

Start point:  
Elasicsearch 6.6.2  
xpack.ml disabled on all nodes  
node.ml disabled on all nodes

We do the following steps:

1. We enabled xpack.ml on all master nodes (node.master: true) and we do a rolling restart of them
2. We enabled xpack.ml and node.ml for exactly one node
3. We enabled xpack.ml for kibana

Outcome:  
\_xpack:

```
...
"ml" : {
  "description" : "Machine Learning for the Elastic Stack",
  "available" : true,
  "enabled" : false,
  "native_code_info" : {
    "version" : "N/A",
    "build_hash" : "N/A"
  }
},
...

```

\_xpack/usage

```
...
  "ml" : {
"available" : true,
"enabled" : true,
"jobs" : {
  "_all" : {
    "count" : 0,
    "detectors" : {
      "total" : 0.0,
      "min" : 0.0,
      "avg" : 0.0,
      "max" : 0.0
    },
    "model_size" : {
      "total" : 0.0,
      "min" : 0.0,
      "avg" : 0.0,
      "max" : 0.0
    },
    "forecasts" : {
      "forecasted_jobs" : 0,
      "total" : 0
    }
  }
},
"datafeeds" : {
  "_all" : {
    "count" : 0
  }
},
"node_count" : 1

```

},  
....

Should we enable xpack.ml on all data nodes? (node.master: false, node.data: true)

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [May 16, 2019, 3:20pm UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/2 "2019-05-16T15:20:50Z")

</div>

See: [https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-settings.html)

The setting that you're probably not setting correctly is:

`xpack.ml.enabled: true`

It is not called "xpack.ml"

---

<div class="post-metadata">

### Author: ![robertvolkmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robertvolkmann/32/46341_2.png) [@robertvolkmann](https://discuss.elastic.co/u/robertvolkmann)
#### Post date: [May 16, 2019, 6:55pm UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/3 "2019-05-16T18:55:45Z")

</div>

Thank you for your suggestion, but it is already in place and does not work. Below are the truncated responses of the cluster configuration.

GET \_cat/nodes

```
10.81.13.41 23 100 6 0.12 0.18 0.14 di - db6
10.81.13.36 39 99 11 0.41 0.40 0.41 m - db1-master
10.81.13.36 41 99 13 0.41 0.40 0.41 di - db1
10.81.13.38 10 99 9 0.21 0.15 0.14 di - db3
10.81.13.39 12 99 10 0.24 0.34 0.43 di - db4
10.81.13.37 26 99 6 0.04 0.10 0.11 di - db2
10.81.13.37 45 99 6 0.04 0.10 0.11 m - db2-master
10.81.13.38 28 99 9 0.21 0.15 0.14 m * db3-master
10.81.13.40 37 41 0 0.00 0.01 0.05 i - db5

```

GET \_nodes/db1-master/settings  
GET \_nodes/db2-master/settings  
GET \_nodes/db3-master/settings  
GET \_nodes/db5/settings

```
"xpack" : {
  "watcher" : {
    "enabled" : "false"
  },
  "security" : {
    "enabled" : "false"
  },
  "monitoring" : {
    "enabled" : "true",
    "collection" : {
      "enabled" : "true"
    }
  },
  "ml" : {
    "enabled" : "true"
  }
},

```

GET \_nodes/db1/settings  
GET \_nodes/db2/settings  
GET \_nodes/db3/settings  
GET \_nodes/db4/settings  
GET \_nodes/db6/settings

```
"xpack" : {
  "watcher" : {
    "enabled" : "false"
  },
  "security" : {
    "enabled" : "false"
  },
  "monitoring" : {
    "enabled" : "true",
    "collection" : {
      "enabled" : "true"
    }
  },
  "ml" : {
    "enabled" : "false"
  }
},
```

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [May 16, 2019, 7:54pm UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/4 "2019-05-16T19:54:55Z")

</div>

Please refer to:

> [@Separate machine learning node configs](https://discuss.elastic.co/t/separate-machine-learning-node-configs/145201):
>
> Hello i have a 3 node cluster up and running and on all the nodes node.ml is set to "false".Now i want to include a extra node into cluster which will only perform machine learning jobs. As far as my understanding node.ml is to make the node as machine learning node and xpack.ml.enabled is to make the node to perform machine learning jobs. SO setting the node.ml true for one node which is the new node i am introducing and xpack.ml.enabled true on all nodes should make the cluster with one ml no…

In that post you should see that:

> `xpack.ml.enable` should be true on all nodes as it is required for the nodes to talk 'ml' to each other. `node.ml` should only be set on the node you want the machine learning jobs to run on.

Seems like you should set `xpack.ml.enable` to be true on all nodes and then only set `node.ml` to be `true` on `db5`

---

<div class="post-metadata">

### Author: ![robertvolkmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robertvolkmann/32/46341_2.png) [@robertvolkmann](https://discuss.elastic.co/u/robertvolkmann)
#### Post date: [May 17, 2019, 1:38pm UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/5 "2019-05-17T13:38:39Z")

</div>

Thank you for your suggestion. Yesterday evening I activate `xpack.ml.enable` on `db1` and nothing changed. But waiting ten hours(\*) changed everything. It works. 😉

(\*) Maybe our cluster is an old man.

Greetings

---

<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: [June 14, 2019, 1:38pm UTC](https://discuss.elastic.co/t/ml-is-available-but-not-enabled/181357/6 "2019-06-14T13:38:42Z")

</div>

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