Docker Network-Server Problem


#1

Hi

i have the following issue:

two VMs, running docker on each. and on each VM a App-Server and a Lora-Server running as container.
now i can login to both App-Server websides. when i try to register (or change) a network-server in the webinterface its only possible form the other VM
Example: VM 1 -> App-Server can register NS-Server from VM2, but not from VM1

If i try so, i get the following message:

time=“2019-04-30T15:1``2:46Z” level=warning msg=“creating insecure network-server client” server=“vltz24.migroszh.ch:8000”
time=“2019-04-30T15:12:46Z” level=warning msg=“grpc: addrConn.createTransport failed to connect to {vltz24.migroszh.ch:8000 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp 10.15.13.233:8000: operation was canceled”. Reconnecting…”
time=“2019-04-30T15:12:46Z” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = context deadline exceeded” grpc.code=Unknown grpc.method=Update grpc.service=api.NetworkServerService grpc.start_time=“2019-04-30T15:12:46Z” grpc.time_ms=521.864 peer.address=“127.0.0.1:41312” span.kind=server system=grpc

i never saw this “operation was canceled” before? Has anyone a idea?

thx and regards,
sil


#2

The loraserver-docker repo only exposes ports for the App Server web UI, gateway bridge, and mosquitto. If you want to access the network server from outside the docker compose network, you will need to expose the appropriate ports (and verify connectivity, etc).


#3

hello @bconway

thx for your replay. Sorry for my late answer - i had some days off.
i dont know if i made my scenario clear. i am not using docker compose at the moment - just the docker image for appserver and ns-server.

i have 2 Hosts with docker installed:

Host 1:

  • Docker: LoraAppServer
  • Docker: LoraNsServer

Host 2:

  • Docker: LoraAppServer
  • Docker: LoraNsServer

Now:

  • I can Register or Rename (for example) the NS-Server on Host 1 from the App-Server on Host 2
  • I can Register or Rename (for example) the NS-Server on Host 2 from the App-Server on Host 1
  • I can’t Register or Rename (for example) the NS-Server on Host 1 from the App-Server on Host 1
  • I can’t Register or Rename (for example) the NS-Server on Host 2 from the App-Server on Host 2

So out of my view, the port (8000) is exposed - then a appserver on a different host can access, but not on the same host. any idea? the bind is on 0.0.0.0:8000 - is this a problem, if the ns-container and the appserver container is on the same docker-host?

thanks and regards,
Sil


#4

i think now i am one step further. i linked the two containers on the same host.
then i can add the ns-server with the docker internal ip address.

but if i use the hostname (and i added it as entry in the hostfile) it still uses the public ip address instead of the internal docker ip. any further help would be great.

thx


#5

i found my error. there was the firewall running, which blocked the local traffic… sorry, and you can close the topic.

regards, sil


closed #6