Elastic APM throws error illegal_state_exception with reason There are no ingest nodes in this cluster, unable to forward request to an ingest node

When I try to run the elastic apm server (oss version) I get the error There are no ingest nodes in this cluster, unable to forward request to an ingest node.

on running apm-server setup --pipeline it says pipelines are created successfully

What is this? Is there any setting that needs to be set on Elasticsearch

Elasticsearch version: 7.3.2

APM Server version: 7.3.2 oss

Original install method (e.g. download page, yum, deb, from source, etc.) and version: docker.elastic.co/apm/apm-server-oss:7.3.2

**Is there anything special in your setup?*Using Elastsearch 7.3.2 open distro version
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Kibana should indicate that APM is connected to elasticsearch and apm
index is created.

Steps to reproduce:

  1. Run:
    docker run --rm -it --name=apm-server --user=apm-server --volume="$(pwd)/apm-server.docker.yml:/usr/share/apm-server/apm-server.yml:ro" -p 8200:8200 docker.elastic.co/apm/apm-server-oss:7.3.2 --strict.perms=false -E "apm-server.jaeger.http.enabled=true" -e

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

2020-03-11T12:46:01.851Z INFO elasticsearch/client.go:743 Attempting to connect to Elasticsearch version 7.3.2
2020-03-11T12:46:01.852Z WARN [index-management] idxmgmt/manager.go:90 Automatically disabled ILM as configured Elasticsearch not eligible for auto enabling.
2020-03-11T12:46:02.034Z INFO template/load.go:88 Template apm-7.3.2 already exists and will not be overwritten.
2020-03-11T12:46:02.034Z INFO [index-management] idxmgmt/manager.go:180 Finished loading index template.
2020-03-11T12:46:02.215Z INFO template/load.go:88 Template apm-7.3.2-span already exists and will not be overwritten.
2020-03-11T12:46:02.215Z INFO [index-management] idxmgmt/manager.go:195 Finished template setup for apm-7.3.2-span.
2020-03-11T12:46:02.397Z INFO template/load.go:88 Template apm-7.3.2-transaction already exists and will not be overwritten.
2020-03-11T12:46:02.397Z INFO [index-management] idxmgmt/manager.go:195 Finished template setup for apm-7.3.2-transaction.
2020-03-11T12:46:02.576Z INFO template/load.go:88 Template apm-7.3.2-error already exists and will not be overwritten.
2020-03-11T12:46:02.576Z INFO [index-management] idxmgmt/manager.go:195 Finished template setup for apm-7.3.2-error.
2020-03-11T12:46:02.756Z INFO template/load.go:88 Template apm-7.3.2-metric already exists and will not be overwritten.
2020-03-11T12:46:02.756Z INFO [index-management] idxmgmt/manager.go:195 Finished template setup for apm-7.3.2-metric.
2020-03-11T12:46:02.756Z INFO [index-management] idxmgmt/manager.go:128 Finished index management setup.
2020-03-11T12:46:03.126Z INFO [pipelines] pipeline/register.go:53Pipeline already registered: apm
2020-03-11T12:46:03.308Z INFO [pipelines] pipeline/register.go:53Pipeline already registered: apm_user_agent
2020-03-11T12:46:03.488Z INFO [pipelines] pipeline/register.go:53Pipeline already registered: apm_user_geo
2020-03-11T12:46:03.488Z INFO [pipelines] pipeline/register.go:56Registered Ingest Pipelines successfully.
2020-03-11T12:46:03.488Z INFO pipeline/output.go:105 Connection to backoff(elasticsearch(https://es-url:443)) established
2020-03-11T12:46:03.669Z ERROR elasticsearch/client.go:343 Failed to perform any bulk index operations: 500 Internal Server Error: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"There are no ingest nodes in this cluster, unable to forward request to an ingest node."}],"type":"illegal_state_exception","reason":"There are no ingest nodes in this cluster, unable to forward request to an ingest node."},"status":500}
2020-03-11T12:46:03.841Z INFO instance/beat.go:432 apm-server stopped.

@Vipin_Menon Elasticsearch has multiple node types. You'll need to configure at least one ingest node.