mpous / helium-data-hotspot

12 stars 16 forks source link

Packet forwarder crashes #2

Closed pe1mew closed 2 years ago

pe1mew commented 3 years ago

The packet forwarder crashes with this message:

 packet-forwarder  INFO: fake GPS is enabled
 packet-forwarder  ERROR: [up] getaddrinfo on address helium-miner (PORT 1680) returned No address associated with hostname

When in the file sx1301/local_conf.json the address helium-miner was replaced with localhost the forwarder starts:

{
  "gateway_conf": {
    "server_address": "localhost",
    "serv_port_up": 1680,
    "serv_port_down": 1680,
    "servers": [ {
      "server_address": "localhost",
      "serv_port_up": 1680,
      "serv_port_down": 1680,
      "serv_enabled": true
    } ],

It seems as if helium-miner was not resolved.

pe1mew commented 3 years ago

Further investigation learns that although the forwarders stay alive it is not connected to gateway-rs. A ping reveals that pinging to the gatewayrs container is not responding while pinging to the ip-address works

root@c6a89d1a7f24:/opt/iotloragateway/packet_forwarder# ping gatewayrs
PING gatewayrs (172.18.0.3) 56(84) bytes of data.
^C
64 bytes from 172.18.0.3: icmp_seq=1 ttl=64 time=0.360 ms

--- gatewayrs ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.360/0.360/0.360/0.000 ms
root@c6a89d1a7f24:/opt/iotloragateway/packet_forwarder# 
root@c6a89d1a7f24:/opt/iotloragateway/packet_forwarder# ping 172.18.0.3
PING 172.18.0.3 (172.18.0.3) 56(84) bytes of data.
64 bytes from 172.18.0.3: icmp_seq=1 ttl=64 time=0.417 ms
64 bytes from 172.18.0.3: icmp_seq=2 ttl=64 time=0.280 ms
64 bytes from 172.18.0.3: icmp_seq=3 ttl=64 time=0.335 ms
64 bytes from 172.18.0.3: icmp_seq=4 ttl=64 time=0.293 ms
etc
mpous commented 3 years ago

Was this solved @pe1mew ?

mpous commented 2 years ago

@pe1mew i just merged a PR and test and it works:

root@603c6b466618:/opt# ping helium-miner
PING helium-miner (172.17.0.2) 56(84) bytes of data.
64 bytes from helium-miner_4582549_2076948_e2ff04fe692257c944c45d76ec992141.1900307_default (172.17.0.2): icmp_seq=1 ttl=64 time=0.259 ms
64 bytes from helium-miner_4582549_2076948_e2ff04fe692257c944c45d76ec992141.1900307_default (172.17.0.2): icmp_seq=2 ttl=64 time=0.216 ms