Machine learning API Disabled

hello Team,

I installed the x-pack for a trial period of 30 days. Although there is still a week left before the free license expires, the machine learning APIs are reported to be disabled every time I start ElasticSearch.

I checked with trying to set the xpack.ml.enabled to true in elasticsearch,yml file, however, that did not work.

Can you guys point out as to what the problem could be?

First, please double check what license the cluster thinks is installed - see https://www.elastic.co/guide/en/x-pack/current/listing-licenses.html

Second, how many nodes are in your cluster? Do they all have the same version of Elasticsearch installed? Do they all have the corresponding version of X-Pack installed? Do all nodes have either xpack.ml.enabled: true or not present (as true is the default) in their elasticsearch.yml?

If all of that's consistent, are the system clocks on all nodes in the cluster set to the correct time?

Finally, did machine learning work initially and then stop working? Or did you only try it for the very first time a week before the license was about to expire?

1 Like

The license is apparently active and is of type trial.
{
"license" : {
"status" : "active",
"uid" : "xxx",
"type" : "trial",
"issue_date" : "2017-06-21T14:24:31.620Z",
"issue_date_in_millis" : 1498055071620,
"expiry_date" : "2017-07-21T14:24:31.620Z",
"expiry_date_in_millis" : 1500647071620,
"max_nodes" : 1000,
"issued_to" : "elasticsearch",
"issuer" : "elasticsearch",
"start_date_in_millis" : -1
}
}

There is only one node in the cluster. I am using an elasticsearch-5.4.0 and have the corresponding x-pack version installed. The propertly x-pack.ml.enabled is set to true. This is what I saw in the json response for the node information. Despite the default behaviour, I did update this value in elasticsearch.yml, however, there was still no change.

I could not verify the system clocks. Can you describe this ?

I did not check this before when I installed the x-pack a month ago. I am doing the machine learning with x-pack course offering, which I am doing in the spare time. Until yesterday I wasn't at a point where I needed to actually run a machine learning job. I actually didn't observe the message before.

By "verify the system clocks" I meant check the operating system's opinion of the current time is roughly correct. If you're on Windows or Mac, does the clock in the corner of the desktop show the correct date and time? If you're on Linux, go to a terminal and run date - does it print the correct date and time?

Another thing you could try is to shut down your current node and install a new Elasticsearch node into a different directory using the zip or tar bundle (not deb/rpm/msi). Then install X-Pack into the new node, start it up, and see if ML works in that new node. The new node will get a brand new 30 day trial license. If ML doesn't work in the new node either then there must be some other condition on your machine that's stopping ML working. There may be clues in the Elasticsearch log file. (If you don't want to keep this new node long-term, just shut it down, delete the directory and restart the original node.)

1 Like

The system time and the instance license times are coherent. Nevertheless, this was my last resort. I simply got the latest ELK stack and installed x-pack plugins. It functions now. I still do not know why it didnt work originally, but now since I have a working instance, I do not have any motivation to find out why.

Thanks for the reply.

Hello again, I reinstalled the latest version of elasticsearch and kibana with xpack plugin. It seems to work i the beginning and now after 1 week of use, the Machine learning and Graph APIs have been disabled.

There must be something about your environment that's making the Elasticsearch JVM's opinion of the time go haywire. If you could describe the environment in which you're running Elasticsearch that will help to narrow down what the problem might be.

For example, are you running your node in a virtual machine? If so, what is the host OS, what is the guest OS, and which virtualization software are you using?

Are you running your node on a laptop? If so, does it ever hibernate while Elasticsearch is running? Again, which OS is it running?

1 Like

I am running a MacBook Pro macOS Sierra 10.12.5. There is a no VM that I run.

However, I do leave elastic stack running when I hibernate my computer.

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