After getting everything running using the docker-compose.yml file (yea!) with all of the services, I started working on security, beginning with generating my own certs for the lora-app-server. To do that, I created a little Dockerfile to pull a version of the lora-app-server and build new certs (see below). However, using this version of the container yields the following error. The only thing different in the two yml files is the version of lora-app-server.
appserver_1 | time=“2017-12-07T18:06:59Z” level=info msg="grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8000 }"
Here is the Dockerfile to build the new lora-app-server. I’m doing something stupid, but I can’t for the life of me see what it might be
Instead of re-building a new Docker image, I would recommend to use volumes. That way you’re able to share the certificate files from your host machine with the Docker container.
E.g. -v /host/certs:/etc/lora-app-server/certs would make certificates on your host located at /host/certs available to the container at /etc/lora-app-server/certs. This config option is also available within docker-compose, so you might need to 1 or 2 extra lines for this.
The issue here is that LoRa App Server tries to connect to LoRa Server (note that 8000 is the default --bind port of LoRa Server). However LoRa Server is not running on 127.0.0.1:8000. Probably you need to set the NS_SERVER config variable. See the 0.13.3 config options: https://github.com/brocaar/lora-app-server/blob/0.13.3/docs/content/install/config.md
In the meantime, if I am using exactly the same yml file, differing only in the version of lora-app-server that is either (a) pulled from the docker repository or (b) pulled from github and built as a docker image, why am I getting ip/port errors?
Is there something different across the two version?
The docker-compose.yml mentioned on the documentation page does not have all the configuration needed for the 0.13.3 version, as there were a couple of config changes in the last release.