Loraserver on Kubernetes doesn't process messages

Hi!
I’m deploying the LoRa server on Azure Kubernetes Services and configured the cluster IP service for LoRa App Server (ports 8080, 8003, 8001) and LoRa Server (8000) with its other components (LoRa Gateway Bridge, MQTT, Redis, and Postgresql).

I’m using a configMap to provide the TOML file and work well.

When the applications are running not show errors, but when the LoRa gateway push messages on the MQTT the LoRa Server show errors.

This is de LoRa App Server configuration:

[postgresql]
    dsn="postgres://XX:YY@postgres/NN?sslmode=disable"

    [redis]
    url="redis://redis-cluster-ip-service:6379"

    [application_server.integration.mqtt]
    server="tcp://eclipse-moquitto:1883"

    [application_server.api]
    bind="0.0.0.0:8001"

    public_host="localhost:8001"

    [application_server.external_api]
    bind="0.0.0.0:8080"

    jwt_secret="mySecret"

    [application_server.codec.js]
    max_execution_time="100ms"

    [join_server]
    bind="0.0.0.0:8003"

This is de LoRa Server configuration:

    [general]
    log_level=3

    [postgresql]
    dsn="postgres://XXX:YYYY@postgres/NNN?sslmode=disable"

    [redis]
    url="redis://redis-cluster-ip-service:6379"

    [network_server]
    net_id="000000"

    [network_server.band]
    name="US_902_928"

    [network_server.network_settings]
    enabled_uplink_channels=[8, 9, 10, 11, 12, 13, 14, 15]
    disable_mac_commands=true
    disable_adr=true

    [network_server.network_settings.rejoin_request]
    enabled=false

    [network_server.api]
    bind="0.0.0.0:8000"

    [network_server.gateway.backend.mqtt]
    server="tcp://eclipse-moquitto:1883"

    [join_server.default]
    server="http://lora-app-server-cluster-ip-service:8003"

This is the complete log from the LoRa Server when trying to process the messages.

time="2019-10-22T20:27:19Z" level=error msg="processing uplink frame error" data_base64="QHScBQCAAAABnKnuoIEs1JSYULGwlHhCMuafrqA5INUI/QFsMR38yDrKTv3Z8NUZyHc0Z6E=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-10-22T20:28:57Z" level=error msg="processing uplink frame error" data_base64="QHScBQCAAAABlKm9oIEtYZ6YZ7C6lE9DM+SfrqA5INUI/QFsMR38yDrKTv3Z8NUZyJz4s/M=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-10-22T20:32:47Z" level=error msg="processing uplink frame error" data_base64="QHScBQCAAQABvajR1ZIAKWq9gKEmhymU6Au47FYUxRYHRiLR19zh7fWgefGr22rNju5Q5Lk=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-10-22T20:32:56Z" level=error msg="processing uplink frame error" data_base64="QHScBQCAAgABmzZ+qxBiE2xzr8cCClFkxv7KEcpuB4x1DNjLMnqt9G6xqQXcWvFeW1m5A+I=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-10-22T20:33:11Z" level=warning msg="creating insecure application-server client" server="localhost:8001"
time="2019-10-22T20:33:11Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost:8001 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused\". Reconnecting..."
time="2019-10-22T20:33:11Z" level=error msg="processing uplink frame error" data_base64="QDjIQQCAAAABjKKxfR3uG06mHmYL7uiAiCNfXxeaSb/E62cwzzIK7e1vBCdQQJQbDaCWOJg=" error="get application-server client error: create application-server api client error: dial application-server api error: context deadline exceeded"
time="2019-10-22T20:33:37Z" level=warning msg="creating insecure application-server client" server="localhost:8001"
time="2019-10-22T20:33:37Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost:8001 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused\". Reconnecting..."
time="2019-10-22T20:33:37Z" level=error msg="processing uplink frame error" data_base64="QDjIQQCAAAABjKK6fR3uEUymHmYJ7uiAiCNfXxeaSb/E62cwzzIK7e1vBCdQQJQbDdyOfpc=" error="get application-server client error: create application-server api client error: dial application-server api error: context deadline exceeded"
time="2019-10-22T20:34:03Z" level=warning msg="creating insecure application-server client" server="localhost:8001"
time="2019-10-22T20:34:03Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost:8001 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused\". Reconnecting..."
time="2019-10-22T20:34:04Z" level=error msg="processing uplink frame error" data_base64="QDjIQQCAAAABjKK1fR3uEEOmHmYG7uiAiCNfXxeaSb/E62cwzzIK7e1vBCdQQJQbDe12NtY=" error="get application-server client error: create application-server api client error: dial application-server api error: context deadline exceeded"
time="2019-10-22T20:34:30Z" level=warning msg="creating insecure application-server client" server="localhost:8001"
time="2019-10-22T20:34:30Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost:8001 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:8001: connect: connection refused\". Reconnecting..."

I think what is a configuration error, but I don`t know which.

Hi!
I found in the postgresBD a field called “routing_profile.as_id” with this value “localhost:8001” and I changed by “lora-app-server-cluster-ip-service:8001” and work well!
But I don’t know how to configure this field from a configuration file?? and one error appears sometimes.

time="2019-10-23T19:53:10Z" level=error msg="processing uplink frame error" data_base64=gDUSACaA0D4I88MkeHQHqltoSRMrWg48 error="get device-session error: device-session does not exist or invalid fcnt or mic"

Do you know anything about this??

See the following section:

  # Public ip:port of the application-server API.
  #
  # This is used by LoRa Server to connect to LoRa App Server. When running
  # LoRa App Server on a different host than LoRa Server, make sure to set
  # this to the host:ip on which LoRa Server can reach LoRa App Server.
  # The port must be equal to the port configured by the 'bind' flag
  # above.
  public_host="localhost:8001"

https://www.loraserver.io/lora-app-server/install/config/

2 Likes

i’ve the same problem, @isma90 how did you solve that? thanks