Connection refused to influxdb

In order to format the data retrieved by my IOT server (chirpstack) on grafana, I downloaded a github file which contains (infludb+grafana+telegraf). To install the different containers I ran the docker-compose up command. But when I connect to grafana I can’t find my database. In order to test each container alone to know what is the problem I ran the following command: sudo docker logs for each one. My problem is that sudo docker logs telegraf gives me the following error: outputs.influxdb] When writing to [http://influxdb:8086]: database “maBase” creation failed: Post “http://influxdb:8086/query”: dial tcp 172.22.0.4:8086: connect: connection refused

Any solutions please?
why did I get this error? and what does this address represent?

Thanks to you

That is probably is a network related error. The 172.22.0.4 is probably the IP address of the InfluxDB docker container (or it should have been, as the connection is refused).

@brocaar Thank you for your replay, how should I proceed in this case?