Containers of same host cannot access each other

I have a prometheus container and Grafana container running on same host each container is bind with different port. when I try to add a data source to Grafana container as prometheus container(${host_name}:9090), I get a no route to host.

Hitting the ${hostname}:9090 and ${hostname}:3000 works fine on the browser.

when Starting the container I used a network

docker network create --driver bridge prometheus

docker run --network prometheus -d -v /vvs/prometheus/conf:/etc/prometheus/ -v /vvs/prometheus/data:/prometheus -u 90900:90900 -p 9090:9090 --name prometheus1 prom/prometheus:v2.14.0 --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus

docker run --network prometheus -d -v /vvs/grafana:/var/lib/grafana -p 3000:3000 --name Grafana grafana/grafana

docker network inspect prometheus shows both containers are part of the prometheus network.

performing a curl from within Grafana to reach prometheus({hostname}:9090) gives me no route to host and vice versa to Grafana from prometheus container

Any help is appreciated.

Source: StackOverflow