Postgress sql error while running nework server using docker-compose file

HI,

I have cloned network server source from https://github.com/brocaar/chirpstack-network-server.git and used docker for building, docker-compose build pull and up +. I am getting this error chirpstack-network-server_1 | time=“2020-02-06T06:53:23Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“dial tcp 127.0.0.1:5432: connect: connection refused” while running the container (docker-compose up). Help Needed

is the postgresql running in the same docker ?
check your postgresql is up and listening on port 5432.

Yes it is running and I can see the logs also

This docker-compose.yml file is only for development and testing, not to run the NS. Please use: https://github.com/brocaar/chirpstack-docker/

1 Like

Hi @brocaar, I understand but my primary goal is to check when and how(SF, Tx power) the ADR algorithm triggers, If I can see the logs from n/w server container when ADR triggers it is fine for me or else I need to keep some extra logs(basically fmt.Println(“Triggered for so on so parameters”)) when optimal parameters it found, for this I thought of modifying adr.go. BTW I am very new to LoRaWan and Lora.
Thanks

This kind of testing I’m usually doing outside Docker containers. Especially when you want to test modifications to multiple components I find it easier to not use Docker. On my machine I have all dependencies (PostgreSQL, Redis, Mosquitto) and then I run the services I need.

In order to set this up, you can follow the Debian / Ubuntu tutorial, without the “apt-get …” steps. Then compile your own binaries and start these from the cli :slight_smile:

You can do it using docker-compose, but you would need to make modifications to make this working. This is not something that is supported in the compose files that I’m providing.

1 Like

Hi @brocaar, Thanks for the response, I was able to do it. I need to clarify on one thing, currently we are adding gateways, gateways profile, device profiles and service profiles etc … manually using UI running on port 8080, but is there any way I can save those configuration details as a json file or something and directly use for another setup running on another PC or any API ?, because I need to setup multiple PC’s with the same setup (Different Gateway).

You could use the API for this :slight_smile:

@brocaar, can you provide me the links for reference if any? Thanks.