Not able to connect to APM of 8.15.2 version

Hi,
My apm is not connecting to elasticsearch.Below is my docker-compose file is below.
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.2
container_name: elasticsearch
hostname: elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1g -Xmx1g
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- elastic_data:/usr/share/elasticsearch/data/
ports:
- 9200:9200
networks:
- elk-network

APM:
image: docker.elastic.co/apm/apm-server:8.15.2
container_name: apm-server
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- output.elasticsearch.hosts=["http://elasticsearch:9200"]
- apm-server.host=0.0.0.0:8200
- apm-server.ssl.enabled=false
volumes:
- /home/vikas/Videos/nousername-apm/apm-server:/usr/share/apm-server/
ports:
- 8200:8200
depends_on:
- elasticsearch
networks:
- elk-network
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:8.15.2
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
depends_on:
- elasticsearch
networks:
- elk-network
volumes:
elastic_data: {}
networks:
elk-network:
All the containers is up but in kibana it is showing .No APM Server detected. Please make sure it is running and you have updated to 7.0 or higher.
Please can anyone help on this,it will be very grateful.Below is image of error.

Hi @vikascateina,

Have you checked the APM server logs to make sure it is available and responding to pings? There may be errors or warnings that can help you figure out what is going on. I would also check the troubleshooting guide to see if any of those steps yield any insights.

As an aside, I see you've disabled SSL and security settings. Is there a particular reason for that? It's not something we would recommend.

Let us know!

Hi,
The apm is up and I can ping.I want to check first that without username and password first it works or not.

Ok, thanks for confirming. Do you see any errors or warnings in the logs at all?

No,I am not seeing any errors in any of my containers, including Elasticsearch, Kibana, and APM.

Could someone assist me with this?

Hi @vikascateina,

It's difficult to say what the issue is without any errors or diagnostic information. Have you checked the common problems troubleshooting to see if you can find any further information?