# I can't start apm servicemap

**URL:** <https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [May 18, 2020, 5:54am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033 "2020-05-18T05:54:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [May 18, 2020, 5:54am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/1 "2020-05-18T05:54:20Z")

</div>

yaml context

> ```
> kind: ApmServer
> metadata:
> name: apm-server
> spec:
> version: 7.7.0
> count: 1
> http:
> tls:
> selfSignedCertificate:
> disabled: true
> service:
> spec:
> type: NodePort
> ports:
> - name: http
> nodePort: 31822
> port: 8200
> protocol: TCP
> targetPort: 8200
> config:
> apm-server.rum.enabled: true
> apm-server.rum.allow_origins: ['*']
> elasticsearchRef:
> name: elasticsearch-master
> 
> ```

 ![servicemap](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e7f3683e65e39c008a94e6b85c4a9bc7f513c5b.gif)

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [May 20, 2020, 10:48am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/2 "2020-05-20T10:48:42Z")

</div>

Hey @wajika, thanks for reporting. It's not clear for me on which button you clicked based on the provided gif.  
When I spin up the 7.7.0 stack locally I can successfully access the service map (`https://kibana-url:5601/app/apm#/service-map`), which then prompts me to enable a trial license. Which can be done [this way](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-licensing.html#k8s_start_a_trial) in ECK.

---

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [May 21, 2020, 12:13am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/3 "2020-05-21T00:13:36Z")

</div>

![123](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06bc60ac8133d123d84a5e5be78c4969daafbf06.gif)  
It refreshed the page and returned to /app/kibana#/home  
@sebgl

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [May 25, 2020, 10:37am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/4 "2020-05-25T10:37:26Z")

</div>

@wajika you need to enable trial licenses at ECK-level, you cannot do it at Kibana level.  
You can follow [those instructions](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-licensing.html#k8s_start_a_trial).

---

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [May 26, 2020, 12:39am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/5 "2020-05-26T00:39:59Z")

</div>

@sebgl I have used a trial license and it still has no effect

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a1685017a060883134ed391fbeee71c232e8c57b.png)

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [May 26, 2020, 9:22am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/6 "2020-05-26T09:22:21Z")

</div>

Unfortunately you ran into a corner case by starting a trial once via Kibana and then again via ECK. ECK enforces the license it is running on in all clusters it manages. When you clicked the "start trial" button in Kibana, ECK immediately reverted your cluster back to a Basic license (because ECK itself was Basic licensed at that time). When you then started the ECK trial your existing cluster was not upgraded to trial again, because you can start a trial only once. I realise that this behaviour is frustrating and opened [https://github.com/elastic/cloud-on-k8s/issues/3141](https://github.com/elastic/cloud-on-k8s/issues/3141) to improve ECK in that respect. Sorry about that!

Your options are now:

- create a new Elasticsearch cluster to try out APM service map (it should pick up the trial license from ECK)
- if you are in contact with a sales representative from Elastic you can ask for a trial extension which you could install to get your existing cluster back into trial mode.

---

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [May 27, 2020, 1:29am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/7 "2020-05-27T01:29:15Z")

</div>

@pebrc  
I have operated kubectl delete -f a few times before, and the data directory of elasticsearch is also deleted, but every time I re-kubectl create -f, this problem still exists

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [May 27, 2020, 11:47am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/8 "2020-05-27T11:47:09Z")

</div>

Can you check whether the ECK trial has been started successfully by following the instructions [here](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-licensing.html#k8s_get_usage_data) and running

```auto
kubectl -n elastic-system get configmap elastic-licensing -o json | jq .data

```

This is assuming you have installed the operator in the `elastic-system` namespace and that you have [`jq`](https://stedolan.github.io/jq/) installed.

You should see "eck\_license\_level": "enterprise\_trial" as part of the returned JSON document.

---

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [May 28, 2020, 1:23am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/9 "2020-05-28T01:23:06Z")

</div>

My situation is a bit different from that in the documentation. Instead of deploying elastic under the elastic-system namespace, I placed it directly under the defaults ns, but I see that lic will appear under elastic-system ns regardless of whether the namespace is added , Does this have an impact on authorization?

cat lic.yaml  
\> apiVersion: v1  
\> kind: Secret  
\> metadata:  
\> name: eck-trial-license  
\> labels:  
\> [license.k8s.elastic.co/type:](http://license.k8s.elastic.co/type:) enterprise\_trial  
\> annotations:  
\> [elastic.co/eula:](http://elastic.co/eula:) accepted

```
> kubectl get configmap elastic-licensing -o json | jq .data
> {
> "eck_license_level": "basic",
> "enterprise_resource_units": "1",
> "timestamp": "2020-05-28T00:59:04Z",
> "total_managed_memory": "9.13GB"
> }

```

I re-executed kubectl create -f . -nelastic-system(redeploy),the license\_level obtained is still basic

```
> kubectl -n elastic-system get configmap elastic-licensing -o json | jq .data
> {
> "eck_license_level": "basic",
> "enterprise_resource_units": "1",
> "timestamp": "2020-05-28T01:21:04Z",
> "total_managed_memory": "9.13GB"
> }
```

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [May 28, 2020, 8:53am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/10 "2020-05-28T08:53:02Z")

</div>

The licensing configmap data shows that the trial has not been successfully activated in your ECK installation.

> [@wajika](#):
>
> but I see that lic will appear under elastic-system ns regardless of whether the namespace is added ,

The license secret needs to be created in a namespace the operator can read from. In your case the natural choice would be the `default` namespace as this is where you installed the operator. Our examples use `elastic-system` because that is our recommend way of deploying ECK and that is also what is used in the YAML manifest we release with ECK, but other namespaces work just as well.

For a definitive answer we would need to know better how exactly you deployed ECK (which namespaces does it have access to, did you change any of the RBAC permissions, which of the [config options](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html) are you using and with what values? Maybe you can share your manifest?)

It might also help to enable [debug logging](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-eck-debug-logs.html) to see why your trial is not started.

---

<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, 7:58am UTC](https://discuss.elastic.co/t/i-cant-start-apm-servicemap/233033/11 "2022-11-04T07:58:36Z")

</div>


