> For the complete documentation index, see [llms.txt](https://docs.elastiflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elastiflow.com/additional-resources-reference-articles/faq/license_invalid_segments.md).

# license/error Invalid Segments

### SYMPTOM

The collector's log indicates:

```log
2023-09-09T18:07:48.009Z        fatal   flowcoll        flowcoll/main.go:41     exiting because of a license error      {"code": "license/error", "reason": "token contains an invalid number of segments"}
```

### PROBLEM

This error message typically happens when the Elasticsearch enrollment token is used in the ElastiFlow parameter `EF_LICENSE_KEY`.

### SOLUTION

The correct license key is provided by ElastiFlow when you make a request via our website, or after purchasing a Standard or Premium [subscription](https://www.elastiflow.com/subscriptions). These are the three primary license-related configuration parameters:

```yaml
EF_LICENSE_ACCEPTED: true
EF_ACCOUNT_ID: '<ElastiFlow Account ID>'
EF_LICENSE_KEY: '<ElastiFlow License Key>'
```

### REFERENCE

* [Community, Basic, Standard & Premium Subscriptions](https://www.elastiflow.com/subscriptions)
* [30-day Trial License Sign Up](https://www.elastiflow.com/get-started)
* [Basic License Sign Up](https://www.elastiflow.com/basic-license)
* [EF\_LICENSE\_KEY](/flowcoll/configuration/config_gen/license.md#ef_license_key)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.elastiflow.com/additional-resources-reference-articles/faq/license_invalid_segments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
