# Elastic APM Server and openshift

**URL:** <https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602>\
**Category:** APM\
**Tags:** server\
**Created:** [January 5, 2022, 11:33pm UTC](https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602 "2022-01-05T23:33:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortya](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mortya](https://discuss.elastic.co/u/mortya)\
**Post date:** [January 5, 2022, 11:33pm UTC](https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602/1 "2022-01-05T23:33:57Z")

</div>

**Kibana version** :  
n/a

**Elasticsearch version** :  
openshift operator 4.6.0-202112140939

**APM Server version** :  
7.16.2

**APM Agent language and version** :  
n/a

**Browser version** :  
n/a

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:  
ECK operator's APM or standalone APM server

**Fresh install or upgraded from other version?**  
fresh install

**Is there anything special in your setup?**  
Talking to openshift's Elasticsearch in openshift-logging

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
I'm trying to get elastic's APM CRD or apm server to talk to openshift's Elasticsearch operator 4.6.0-202112140939. In most cases, I get a compatibility error. If I specify certain older version of APM, I get a compatibility error, which recommends using the OSS version. But the OSS version seems to still give an error. Am I missing something?

With APM server 7.16.2, I get:

```auto
{"log.level":"error","@timestamp":"2022-01-04T22:51:17.166Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/output.go","file.line":154},"message":"Failed to connect to backoff(elasticsearch(https://elasticsearch.openshift-logging.svc:9200)): Connection marked as failed because the onConnect callback failed: could not connect to a compatible version of Elasticsearch: 400 Bad Request: {\"error\":{\"root_cause\":[{\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [_license], must not start with '_'.\",\"index_uuid\":\"_na_\",\"index\":\"_license\"}],\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [_license], must not start with '_'.\",\"index_uuid\":\"_na_\",\"index\":\"_license\"},\"status\":400}","service.name":"apm-server","ecs.version":"1.6.0"}

```

With the APM CRD, specifying older versions, I get similar errors unless I go back to 7.12.1 or certain earlier versions. With those, I get:

```auto
{"log.level":"error","@timestamp":"2021-12-06T23:14:37.387Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/output.go","file.line":154},"message":"Failed to connect to backoff(elasticsearch(https://elasticsearch.openshift-logging.svc:9200)): Connection marked as failed because the onConnect callback failed: Apm-Server requires the default distribution of Elasticsearch. Please update to the default distribution of Elasticsearch for full access to all free features, or switch to the OSS distribution of Apm-Server.","ecs.version":"1.6.0"}

```

Is there any way to make this work? Either using the OSS or the COTS versions of the APM server? Or maybe we just can't get there from here.

**Steps to reproduce** :

1. See above. Issue happens at startup.
2. 
3. 

**Errors in browser console (if relevant)**:  
n/a

**Provide logs and/or server output (if relevant)**:  
See above

---

<div class="post-metadata">

**Author:** ![marclop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marclop/32/119339_2.png) [@marclop](https://discuss.elastic.co/u/marclop)\
**Post date:** [January 6, 2022, 4:13am UTC](https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602/2 "2022-01-06T04:13:15Z")

</div>

Welcome to our community!

Reading the definitions that `openshift operator 4.6.0-202112140939` uses, it seems that it relies on on [Elasticsearch 6 in an image](https://github.com/openshift/elasticsearch-operator/blob/release-4.6/manifests/05-deployment.yaml#L35-L36) that is maintained by [Openshift themselves](https://quay.io/repository/openshift/origin-logging-elasticsearch6/manifest/sha256:5b4859542143adfa8df22621d0ab3273b19569c58cd5ac2b4799264021615fe3).

The log message is not the most comprehensible but it is logged since Elasticsearch 6.8.x is indeed incompatible with APM Server 7.16.2. I would advise using a compatible Elasticsearch version instead.

It seems that you're already using [ECK](https://operatorhub.io/operator/elastic-cloud-eck) for the APM Server's CRDs, so I'd advise using a dedicated Elasticsearch deployment for APM data, since the OpenShift logging Elasticsearch cluster relies on 6.x.

---

<div class="post-metadata">

**Author:** ![mortya](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mortya](https://discuss.elastic.co/u/mortya)\
**Post date:** [January 6, 2022, 4:47pm UTC](https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602/3 "2022-01-06T16:47:38Z")

</div>

Thank you, Marc.

---

<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:** [January 27, 2022, 12:48pm UTC](https://discuss.elastic.co/t/elastic-apm-server-and-openshift/293602/4 "2022-01-27T12:48:06Z")

</div>

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