brocaar / chirpstack-network-server

ChirpStack Network Server is an open-source LoRaWAN network-server.
https://www.chirpstack.io
MIT License
1.5k stars 546 forks source link

Gateway doesn't come online, Unimplemented as.ApplicationServerService #551

Closed Morpheus0x closed 3 years ago

Morpheus0x commented 3 years ago

What happened?

I configured a Cisco LoRaWAN Gateway as described in the docs. It sends data to the Gateway Bridge basic_station running on my server. Gateway is not coming online in application server. Following error occurs on the Network Server: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService

All Services are running in separate VMs

Possible related Problem: https://forum.chirpstack.io/t/problem-with-loraserver-and-loraappserver-api/6138 Proposed solution: Incorrect entry in PostgreSQL database table loraserver_ns/routing_profile Content of my chirpstack_ns/routing_profile table:

          created_at           |          updated_at           |          routing_profile_id          |       as_id        | ca_cert | tls_cert | tls_key
-------------------------------+-------------------------------+--------------------------------------+--------------------+---------+----------+---------
 2021-10-06 12:23:17.529176+02 | 2021-10-06 12:35:03.576205+02 | 6d5db27e-4ce2-4b2b-b5d7-91f069397978 | 10.0.23.100:8000 |         |          |
(1 row)

10.0.23.100 is the IP of the Network Server

What did you expect?

Gateway coming online in Application Server Web UI

Steps to reproduce this issue

Steps:

  1. Install Bridge, Network and Application Server
  2. Add Network Server to the Application Server (in Web UI)
  3. Create A Service Profile: firefox_Vgh6hB1zX8
  4. Add Gateway (other options not in screenshot are unchanged from default): firefox_LPP7ZfXRBE
  5. Configured Cisco LoRaWAN Gateway according to Chirpstack docs
  6. Look at sudo journalctl -f -n 100 -u chirpstack-network-server.service for problems

Could you share your log output?

Gateway Bridge:

Oct 06 12:31:59 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T12:31:59.523014009+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=7854d31f-2276-42b6-87bf-7688c44d68ff topic=gateway/cc028d20254ef001/event/stats

Network Server:

Oct 06 12:31:59 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T12:31:59.523850574+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=7854d31f-2276-42b6-87bf-7688c44d68ff
Oct 06 12:31:59 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T12:31:59.525974891+02:00" level=info msg="storage: gateway state updated" ctx_id=7854d31f-2276-42b6-87bf-7688c44d68ff gateway_id=cc028d20254ef001
Oct 06 12:31:59 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T12:31:59.527020394+02:00" level=error msg="finished client unary call" ctx_id=7854d31f-2276-42b6-87bf-7688c44d68ff error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="173.078µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc
Oct 06 12:31:59 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T12:31:59.527057439+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=7854d31f-2276-42b6-87bf-7688c44d68ff error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService"

No related log output on the Application Server.

Your Environment

Component Version
Application Server v3.17.1
Network Server v3.15.1
Gateway Bridge v3.13.1
Chirpstack API
Geolocation
Concentratord
Morpheus0x commented 3 years ago

Config Files

Gateway Bridge ``` # Gateway backend configuration. [backend] # Backend type. type="basic_station" # Semtech UDP packet-forwarder backend. [backend.semtech_udp] udp_bind = "10.0.23.98:4201" # Basic Station backend. [backend.basic_station] # ip:port to bind the Websocket listener to. bind="10.0.23.98:4202" # Region. region="EU868" # Minimal frequency (Hz). frequency_min=863000000 # Maximum frequency (Hz). frequency_max=870000000 # Integration configuration. [integration] marshaler="protobuf" # MQTT integration configuration. [integration.mqtt] # Event topic template. event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}" # Command topic template. command_topic_template="gateway/{{ .GatewayID }}/command/#" # MQTT authentication. [integration.mqtt.auth] type="generic" # Generic MQTT authentication. [integration.mqtt.auth.generic] # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://10.0.23.99:1883" # Connect with the given username (optional) username="" # Connect with the given password (optional) password="" ```
Network Server ``` [postgresql] dsn="postgres://chirpstack_ns:@10.0.23.101/chirpstack_ns?sslmode=disable" # Redis settings # # Please note that Redis 2.6.0+ is required. [redis] url="redis://10.0.23.102:6379" # Network-server settings. [network_server] # Network identifier (NetID, 3 bytes) encoded as HEX (e.g. 010203) net_id="000000" [network_server.band] name="EU868" # LoRaWAN network related settings. [network_server.network_settings] [[network_server.network_settings.extra_channels]] frequency=867100000 min_dr=0 max_dr=5 [[network_server.network_settings.extra_channels]] frequency=867300000 min_dr=0 max_dr=5 [[network_server.network_settings.extra_channels]] frequency=867500000 min_dr=0 max_dr=5 [[network_server.network_settings.extra_channels]] frequency=867700000 min_dr=0 max_dr=5 [[network_server.network_settings.extra_channels]] frequency=867900000 min_dr=0 max_dr=5 # Class B settings [network_server.network_settings.class_b] # Ping-slot data-rate. ping_slot_dr=0 ping_slot_frequency=0 # Network-server API [network_server.api] # ip:port to bind the api server bind="10.0.23.100:8000" # Backend defines the gateway backend settings. # # The gateway backend handles the communication with the gateway(s) part of # the LoRaWAN network. [network_server.gateway.backend] # Backend type="mqtt" # MQTT gateway backend settings. # # This is the backend communicating with the LoRa gateways over a MQTT broker. [network_server.gateway.backend.mqtt] # Event topic template. event_topic="gateway/+/event/+" command_topic_template="gateway/{{ .GatewayID }}/command/{{ .CommandType }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://10.0.23.99:1883" # Connect with the given username (optional) username="" # Connect with the given password (optional) password="" # Metrics collection settings. [metrics] timezone="Local" # Join-server settings. [join_server] [join_server.default] server="http://10.0.23.83:8003" ```
Morpheus0x commented 3 years ago

Here the Full log of enabling the common packet forwarder on the gateway and then adding the gw to the application server:

Gateway Bridge ``` Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.515686626+02:00" level=info msg="backend/basicstation: router-info request received" gateway_id=cc028d20254ef001 remote_addr="10.172.10.10:48656" router_uri="ws://10.0.23.98:4202/gateway/cc028d20254ef001" Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.519286769+02:00" level=info msg="backend/basicstation: gateway connected" gateway_id=cc028d20254ef001 remote_addr="10.172.10.10:48658" Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.52020555+02:00" level=info msg="backend/basicstation: gateway version received" firmware=2.0.5 gateway_id=cc028d20254ef001 model=cisco package=2.0.5 protocol=2 station="2.0.5(cisco/std)" Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.520486205+02:00" level=info msg="backend/basicstation: router-config message sent to gateway" gateway_id=cc028d20254ef001 Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.583470777+02:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="gateway/cc028d20254ef001/command/#" Oct 06 13:21:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:21:52.583897529+02:00" level=info msg="integration/mqtt: publishing state" gateway_id=cc028d20254ef001 qos=0 state=conn topic=gateway/cc028d20254ef001/state/conn Oct 06 13:22:22 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:22:22.519730733+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=18f2ccf9-a501-48dd-998d-ac32c06542e0 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:22:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:22:52.520161362+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=43748dec-7835-46fc-a3fc-b2066f5d5830 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:23:22 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:22.519859829+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=8ff82ee1-58c1-4237-ad81-a0abaa95f0c9 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:23:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:52.519906321+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=43434bd4-96da-49b5-bb73-185f6b204d41 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:23:57 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:57.355307327+02:00" level=info msg="backend/basicstation: raw packet-forwarder event received" gateway_id=cc028d20254ef001 raw_id=9897c023-26ec-41b7-bda7-55fd55beacb2 Oct 06 13:23:57 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:57.355405527+02:00" level=info msg="integration/mqtt: publishing event" event=raw qos=0 raw_id=9897c023-26ec-41b7-bda7-55fd55beacb2 topic=gateway/cc028d20254ef001/event/raw Oct 06 13:23:57 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:57.356208295+02:00" level=info msg="backend/basicstation: raw packet-forwarder event received" gateway_id=cc028d20254ef001 raw_id=f59d9805-1e65-47d2-8c2d-a6f5282d0cdc Oct 06 13:23:57 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:23:57.356262236+02:00" level=info msg="integration/mqtt: publishing event" event=raw qos=0 raw_id=f59d9805-1e65-47d2-8c2d-a6f5282d0cdc topic=gateway/cc028d20254ef001/event/raw Oct 06 13:24:22 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:24:22.520474442+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=e2337aef-478a-4387-aa03-0837f0b13593 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:24:52 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:24:52.5201167+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=469b9a86-d2d4-40a8-8a7a-bc669bd1e935 topic=gateway/cc028d20254ef001/event/stats Oct 06 13:25:22 prod-backend-bridge-01 chirpstack-gateway-bridge[114260]: time="2021-10-06T13:25:22.520261322+02:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=56547779-8a25-4792-b4e3-356bf48a502f topic=gateway/cc028d20254ef001/event/stats ```
Network Server ``` Oct 06 13:22:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:22.522011478+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=18f2ccf9-a501-48dd-998d-ac32c06542e0 Oct 06 13:22:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:22.524227441+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=18f2ccf9-a501-48dd-998d-ac32c06542e0 error="update gateway state error: object does not exist" Oct 06 13:22:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:52.521938084+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=43748dec-7835-46fc-a3fc-b2066f5d5830 Oct 06 13:22:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:52.523531635+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=43748dec-7835-46fc-a3fc-b2066f5d5830 error="update gateway state error: object does not exist" Oct 06 13:22:57 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:57.23263071+02:00" level=info msg="storage: gateway created" ctx_id=5415a2d6-0d20-49d5-9208-6de788947c10 gateway_id=cc028d20254ef001 Oct 06 13:22:57 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:22:57.235163278+02:00" level=info msg="finished unary call with code OK" ctx_id=5415a2d6-0d20-49d5-9208-6de788947c10 grpc.code=OK grpc.method=CreateGateway grpc.service=ns.NetworkServerService grpc.start_time="2021-10-06T13:22:57+02:00" grpc.time_ms=3.598 peer.address="10.0.23.83:43846" span.kind=server system=grpc Oct 06 13:23:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:22.520833297+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=8ff82ee1-58c1-4237-ad81-a0abaa95f0c9 Oct 06 13:23:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:22.523432489+02:00" level=info msg="storage: gateway state updated" ctx_id=8ff82ee1-58c1-4237-ad81-a0abaa95f0c9 gateway_id=cc028d20254ef001 Oct 06 13:23:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:22.526831389+02:00" level=error msg="finished client unary call" ctx_id=8ff82ee1-58c1-4237-ad81-a0abaa95f0c9 error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="301.87µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc Oct 06 13:23:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:22.527142503+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=8ff82ee1-58c1-4237-ad81-a0abaa95f0c9 error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" Oct 06 13:23:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:52.52209175+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=43434bd4-96da-49b5-bb73-185f6b204d41 Oct 06 13:23:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:52.524253387+02:00" level=info msg="storage: gateway state updated" ctx_id=43434bd4-96da-49b5-bb73-185f6b204d41 gateway_id=cc028d20254ef001 Oct 06 13:23:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:52.525496382+02:00" level=error msg="finished client unary call" ctx_id=43434bd4-96da-49b5-bb73-185f6b204d41 error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="259.78µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc Oct 06 13:23:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:23:52.525540242+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=43434bd4-96da-49b5-bb73-185f6b204d41 error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" Oct 06 13:24:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:22.522038037+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=e2337aef-478a-4387-aa03-0837f0b13593 Oct 06 13:24:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:22.52438645+02:00" level=info msg="storage: gateway state updated" ctx_id=e2337aef-478a-4387-aa03-0837f0b13593 gateway_id=cc028d20254ef001 Oct 06 13:24:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:22.525561108+02:00" level=error msg="finished client unary call" ctx_id=e2337aef-478a-4387-aa03-0837f0b13593 error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="189.861µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc Oct 06 13:24:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:22.525602179+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=e2337aef-478a-4387-aa03-0837f0b13593 error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" Oct 06 13:24:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:52.522168139+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=469b9a86-d2d4-40a8-8a7a-bc669bd1e935 Oct 06 13:24:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:52.52499263+02:00" level=info msg="storage: gateway state updated" ctx_id=469b9a86-d2d4-40a8-8a7a-bc669bd1e935 gateway_id=cc028d20254ef001 Oct 06 13:24:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:52.526186819+02:00" level=error msg="finished client unary call" ctx_id=469b9a86-d2d4-40a8-8a7a-bc669bd1e935 error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="289.112µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc Oct 06 13:24:52 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:24:52.526376338+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=469b9a86-d2d4-40a8-8a7a-bc669bd1e935 error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" Oct 06 13:25:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:25:22.521959841+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=cc028d20254ef001 stats_id=56547779-8a25-4792-b4e3-356bf48a502f Oct 06 13:25:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:25:22.524127446+02:00" level=info msg="storage: gateway state updated" ctx_id=56547779-8a25-4792-b4e3-356bf48a502f gateway_id=cc028d20254ef001 Oct 06 13:25:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:25:22.525282876+02:00" level=error msg="finished client unary call" ctx_id=56547779-8a25-4792-b4e3-356bf48a502f error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="203.659µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc Oct 06 13:25:22 prod-backend-network-01 chirpstack-network-server[106260]: time="2021-10-06T13:25:22.525321022+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=56547779-8a25-4792-b4e3-356bf48a502f error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" ```
Application Server ``` Oct 06 13:22:19 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:19.008189405+02:00" level=info msg="finished unary call with code OK" ctx_id=4a76d506-544d-497b-b162-e2ddf26f34cb grpc.code=OK grpc.method=List grpc.service=api.ServiceProfileService grpc.start_time="2021-10-06T13:22:19+02:00" grpc.time_ms=4.533 peer.address="[::1]:35948" span.kind=server system=grpc Oct 06 13:22:26 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:26.915595084+02:00" level=info msg="finished unary call with code OK" ctx_id=00b881e2-71da-4e25-8d84-28bd4e5df20a grpc.code=OK grpc.method=List grpc.service=api.ServiceProfileService grpc.start_time="2021-10-06T13:22:26+02:00" grpc.time_ms=3.459 peer.address="[::1]:35948" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.102848551+02:00" level=info msg="finished unary call with code OK" ctx_id=747459ab-0de7-446e-86f4-e21a0ac8c719 grpc.code=OK grpc.method=Settings grpc.service=api.InternalService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=0.035 peer.address="[::1]:35938" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.104318469+02:00" level=info msg="finished unary call with code OK" ctx_id=a43568f5-eaae-4dbe-91b0-a2de23b1ec5c grpc.code=OK grpc.method=GetGatewaysSummary grpc.service=api.InternalService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=3.031 peer.address="[::1]:35938" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.105094005+02:00" level=info msg="finished unary call with code OK" ctx_id=1f77cdf7-2fd9-45b4-95ff-8e2c1dd1ff9a grpc.code=OK grpc.method=GetDevicesSummary grpc.service=api.InternalService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=4.415 peer.address="[::1]:35938" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.140161026+02:00" level=info msg="finished unary call with code OK" ctx_id=bc849931-ea16-4594-bbea-99c935b195ee grpc.code=OK grpc.method=Profile grpc.service=api.InternalService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=2.706 peer.address="[::1]:35938" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.255858999+02:00" level=info msg="finished unary call with code OK" ctx_id=98e234c4-f2df-46c1-8f26-7086e08c7a4f grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=114.873 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.256598231+02:00" level=info msg="finished unary call with code OK" ctx_id=c975cca3-45fe-493e-a8e5-0b168cce7790 grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=115.131 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.442685102+02:00" level=info msg="finished unary call with code OK" ctx_id=23f13602-a779-4742-943a-085cc25897c9 grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=40.08 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.444061557+02:00" level=info msg="finished unary call with code OK" ctx_id=d133388b-d9df-4703-99d3-94a6b6b74354 grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=39.185 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.903756926+02:00" level=info msg="finished unary call with code OK" ctx_id=11a329ad-966a-4318-82de-b68e42062f3d grpc.code=OK grpc.method=Settings grpc.service=api.InternalService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=0.055 peer.address="[::1]:35938" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.911836306+02:00" level=info msg="finished unary call with code OK" ctx_id=209428af-774e-4ae2-a3b6-70a0d44f6717 grpc.code=OK grpc.method=Get grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=2.134 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.913413059+02:00" level=info msg="finished unary call with code OK" ctx_id=9e4c3525-1089-4c24-9c6c-53a05fe74358 grpc.code=OK grpc.method=List grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=4.05 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:42 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:42.941713494+02:00" level=info msg="finished unary call with code OK" ctx_id=825d6a1f-e954-4474-9507-acb25ba422e3 grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:42+02:00" grpc.time_ms=31.886 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:43 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:43.02200726+02:00" level=info msg="finished unary call with code OK" ctx_id=633ffe95-34ef-49ac-99c7-1b26143f8f18 grpc.code=OK grpc.method=List grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:43+02:00" grpc.time_ms=2.607 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:43 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:43.030279813+02:00" level=info msg="finished unary call with code OK" ctx_id=971779b7-a172-44f4-8c4d-a0d4947646cd grpc.code=OK grpc.method=Get grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:43+02:00" grpc.time_ms=1.612 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:44 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:44.083380144+02:00" level=info msg="finished unary call with code OK" ctx_id=f9bd88b7-bc0b-4348-8515-56a9c1f3a1ed grpc.code=OK grpc.method=Get grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:44+02:00" grpc.time_ms=1.611 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:45 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:45.253720665+02:00" level=info msg="finished unary call with code OK" ctx_id=ffe53dd3-0068-4c1b-81e5-9220f6137a62 grpc.code=OK grpc.method=List grpc.service=api.OrganizationService grpc.start_time="2021-10-06T13:22:45+02:00" grpc.time_ms=2.627 peer.address="[::1]:35944" span.kind=server system=grpc Oct 06 13:22:45 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:45.398267522+02:00" level=info msg="finished unary call with code OK" ctx_id=a3165a27-d3b1-4875-a5fd-447d11c80279 grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:45+02:00" grpc.time_ms=3.156 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:53 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:53.249245157+02:00" level=info msg="finished unary call with code OK" ctx_id=89946a85-d2bf-498f-a41b-430df2a6ec4f grpc.code=OK grpc.method=List grpc.service=api.ServiceProfileService grpc.start_time="2021-10-06T13:22:53+02:00" grpc.time_ms=3.236 peer.address="[::1]:35948" span.kind=server system=grpc Oct 06 13:22:55 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:55.648777415+02:00" level=info msg="finished unary call with code OK" ctx_id=4db6480d-e837-45c9-89a5-2cb071c9233e grpc.code=OK grpc.method=List grpc.service=api.ServiceProfileService grpc.start_time="2021-10-06T13:22:55+02:00" grpc.time_ms=3.198 peer.address="[::1]:35948" span.kind=server system=grpc Oct 06 13:22:55 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:55.660493021+02:00" level=info msg="finished unary call with code OK" ctx_id=48f1cc22-ea65-47db-a7a2-1235ba65d52f grpc.code=OK grpc.method=List grpc.service=api.ServiceProfileService grpc.start_time="2021-10-06T13:22:55+02:00" grpc.time_ms=3.47 peer.address="[::1]:35948" span.kind=server system=grpc Oct 06 13:22:57 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:57.229702942+02:00" level=info msg="gateway created" ctx_id=4173c2bb-c935-449d-9766-4e888ada0b54 id=cc028d20254ef001 name=test-gateway Oct 06 13:22:57 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:57.235227349+02:00" level=info msg="finished client unary call" ctx_id=4173c2bb-c935-449d-9766-4e888ada0b54 grpc.code=OK grpc.ctx_id=5415a2d6-0d20-49d5-9208-6de788947c10 grpc.duration=4.564261ms grpc.method=CreateGateway grpc.service=ns.NetworkServerService span.kind=client system=grpc Oct 06 13:22:57 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:57.236259307+02:00" level=info msg="finished unary call with code OK" ctx_id=4173c2bb-c935-449d-9766-4e888ada0b54 grpc.code=OK grpc.method=Create grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:57+02:00" grpc.time_ms=11.433 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:22:59 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:22:59.286696328+02:00" level=info msg="finished unary call with code OK" ctx_id=f5aca46e-9536-4889-a88b-0af92497aeee grpc.code=OK grpc.method=List grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:22:59+02:00" grpc.time_ms=3.33 peer.address="[::1]:35940" span.kind=server system=grpc Oct 06 13:23:01 prod-frontend-app-01 chirpstack-application-server[106203]: time="2021-10-06T13:23:01.194518194+02:00" level=info msg="finished unary call with code OK" ctx_id=cc2880d4-c72b-4356-aa46-c3c43243d6c2 grpc.code=OK grpc.method=GetStats grpc.service=api.GatewayService grpc.start_time="2021-10-06T13:23:01+02:00" grpc.time_ms=2.225 peer.address="[::1]:35940" span.kind=server system=grpc ```
Cisco LoRaWAN Gateway Common Packet Forwarder Log ``` 2021-10-06 11:42:03.927 [SYN:INFO] Time sync qualities: min=37 q90=43 max=43 (previous q90=100) 2021-10-06 11:42:05.038 [SYN:INFO] MCU/SX130X drift stats: min: +373.1ppm q50: +373.1ppm q80: +373.1ppm max: +373.1ppm - threshold q90: +373.1ppm 2021-10-06 11:42:05.038 [SYN:INFO] Mean MCU drift vs SX130X#0: 373.1ppm 2021-10-06 11:42:05.030 [SYN:ERRO] Repeated excessive clock drifts between MCU/SX130X#0 (540 retries): 373.1ppm (threshold 100.0ppm) 2021-10-06 11:42:05.275 [RAL:INFO] /etc/cpf/IXM_PLATFORM_CONF.log has been reset... 2021-10-06 11:42:05.276 [RAL:DEBU] local_bcn_enable=0, bcn.ctrl=0x0, bcn.dr=0, bcn.nb_freq=0, bcn.layout=[0, 0, 0] 2021-10-06 11:42:05.276 [RAL:DEBU] bcn.freqs=[0, 0, 0, 0, 0, 0, 0, 0] 2021-10-06 11:42:05.276 [SYS:INFO] Logging : /var/log/station.log (maxsize=10000000, rotate=3) 2021-10-06 11:42:05.276 [SYS:INFO] Station Ver : 2.0.5(cisco/std) 2021-03-29 12:24:03 2021-10-06 11:42:05.276 [SYS:INFO] Package Ver : 2.0.5 2021-10-06 11:42:05.276 [SYS:INFO] proto EUI : cc02:8d20:254e:f001 (station.conf) 2021-10-06 11:42:05.276 [SYS:INFO] prefix EUI : ::0 (station.conf) 2021-10-06 11:42:05.276 [SYS:INFO] Station EUI : cc02:8d20:254e:f001 2021-10-06 11:42:05.276 [SYS:INFO] Station home: /etc/cpf/ (--home) 2021-10-06 11:42:05.276 [SYS:INFO] Station temp: /var/tmp/ (builtin) 2021-10-06 11:42:05.276 [SYS:INFO] GPS device: /dev/ttyS1 2021-10-06 11:42:05.276 [SYS:WARN] Station in NO-CUPS mode 2021-10-06 11:42:05.483 [TCE:INFO] Starting TC engine 2021-10-06 11:42:05.485 [TCE:INFO] Connecting to INFOS: ws://10.0.23.98:4202 2021-10-06 11:42:05.485 [AIO:DEBU] ------------------------------ 2021-10-06 11:42:05.486 [AIO:DEBU] sending msg...len=32 2021-10-06 11:42:05.486 [AIO:DEBU] [7|WS] > {"router":"cc02:8d20:254e:f001"} 2021-10-06 11:42:05.486 [AIO:DEBU] ------------------------------ 2021-10-06 11:42:05.486 [TCE:INFO] Infos: cc02:8d20:254e:f001 cc02:8d20:254e:f001 ws://10.0.23.98:4202/gateway/cc028d20254ef001 2021-10-06 11:42:05.486 [AIO:DEBU] [7] ws_close reason=1000 2021-10-06 11:42:05.486 [AIO:DEBU] [7] Connection closed unexpectedly 2021-10-06 11:42:05.486 [AIO:DEBU] [7] WS connection shutdown... 2021-10-06 11:42:05.487 [TCE:VERB] Connecting to MUXS... 2021-10-06 11:42:05.488 [TCE:VERB] Connected to MUXS. 2021-10-06 11:42:05.488 [AIO:DEBU] ------------------------------ 2021-10-06 11:42:05.488 [AIO:DEBU] sending msg...len=139 2021-10-06 11:42:05.488 [AIO:DEBU] [7|WS] > {"msgtype":"version","station":"2.0.5(cisco/std)","firmware":"2.0.5","package":"2.0.5","model":"cisco","protocol":2,"features":"rmtsh gps"} 2021-10-06 11:42:05.488 [AIO:DEBU] ------------------------------ 2021-10-06 11:42:05.489 [S2E:DEBU] ------------------------------ 2021-10-06 11:42:05.489 [S2E:DEBU] receiving msg...len=305 2021-10-06 11:42:05.489 [S2E:DEBU] {"msgtype":"router_config","NetID":null,"JoinEui":null,"regi 2021-10-06 11:42:05.489 [S2E:DEBU] on":"EU863","hwspec":"sx1301/0","freq_range":[863000000,8700 2021-10-06 11:42:05.489 [S2E:DEBU] 00000],"DRs":[[12,125,0],[11,125,0],[10,125,0],[9,125,0],[8, 2021-10-06 11:42:05.489 [S2E:DEBU] 125,0],[7,125,0],[7,250,0],[0,0,0],[-1,0,0],[-1,0,0],[-1,0,0 2021-10-06 11:42:05.489 [S2E:DEBU] ],[-1,0,0],[-1,0,0],[-1,0,0],[-1,0,0],[-1,0,0]],"sx1301_conf 2021-10-06 11:42:05.489 [S2E:DEBU] ":[]} 2021-10-06 11:42:05.489 [S2E:DEBU] ------------------------------ 2021-10-06 11:42:05.490 [RAL:WARN] Ignoring unsupported/unknown field: gps_conf 2021-10-06 11:42:05.490 [RAL:INFO] Board#0 sx1301ar library version: 5.1.0 2021-10-06 11:42:05.496 [RAL:VERB] __ BRD#0 : 866.5MHz bw=7.0MHz MASTER 2021-10-06 11:42:05.496 [RAL:VERB] rf 0 : RX TX 2021-10-06 11:42:05.496 [RAL:VERB] rf 1 : RX TX 2021-10-06 11:42:05.496 [RAL:VERB] SX1301#0 : 868.0MHz rf_chain=0 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,0 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,1 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,2 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,3 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,4 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,5 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,6 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,7 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,8 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 0,9 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] SX1301#1 : 868.0MHz rf_chain=1 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,0 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,1 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,2 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,3 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,4 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,5 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,6 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,7 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,8 : disabled 2021-10-06 11:42:05.496 [RAL:VERB] ch 1,9 : disabled 2021-10-06 11:42:09.673 [RAL:INFO] Station device: /dev/spidev1.0 (PPS capture enabled) 2021-10-06 11:42:09.673 [S2E:INFO] Configuring for region: EU863 -- 863.0MHz..870.0MHz 2021-10-06 11:42:09.673 [S2E:VERB] DR0 SF12/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR1 SF11/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR2 SF10/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR3 SF9/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR4 SF8/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR5 SF7/BW125 2021-10-06 11:42:09.673 [S2E:VERB] DR6 SF7/BW250 2021-10-06 11:42:09.673 [S2E:VERB] DR7 FSK 2021-10-06 11:42:09.673 [S2E:VERB] DR8 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR9 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR10 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR11 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR12 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR13 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR14 undefined 2021-10-06 11:42:09.673 [S2E:VERB] DR15 undefined 2021-10-06 11:42:09.673 [S2E:VERB] TX power: 16.0 dBm EIRP 2021-10-06 11:42:09.673 [S2E:VERB] 27.0 dBm EIRP for 869.4MHz..869.65MHz 2021-10-06 11:42:09.673 [S2E:VERB] JoinEui list: 0 entries 2021-10-06 11:42:09.673 [S2E:VERB] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF 2021-10-06 11:42:09.673 [S2E:VERB] Dev/test settings: nocca=0 nodc=0 nodwell=0 2021-10-06 11:42:09.673 [S2E:DEBU] Local beacon config is disabled. ```
Morpheus0x commented 3 years ago

I also tried a Kerlink Wirnet iFemtoCell Gateway which results in the same error. At first if there is no GW configured in the Application server, I get this error:

Oct 06 16:27:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:27:26.91967144+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=7276ff0039040a44 stats_id=a563a113-f2fc-4dd7-98a4-62b1446a7b40
Oct 06 16:27:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:27:26.920718386+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=a563a113-f2fc-4dd7-98a4-62b1446a7b40 error="update gateway state error: object does not exist"

That makes sense, because the Network Server doesn't know the GW yet.

As soon as I add the GW the error changes to the initial error:

Oct 06 16:29:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:29:26.954490126+02:00" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=7276ff0039040a44 stats_id=07e538d3-bd0c-4296-90ce-8015d5944b6e
Oct 06 16:29:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:29:26.95638435+02:00" level=info msg="storage: gateway state updated" ctx_id=07e538d3-bd0c-4296-90ce-8015d5944b6e gateway_id=7276ff0039040a44
Oct 06 16:29:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:29:26.957370436+02:00" level=error msg="finished client unary call" ctx_id=07e538d3-bd0c-4296-90ce-8015d5944b6e error="rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService" grpc.code=Unimplemented grpc.duration="239.935µs" grpc.method=HandleGatewayStats grpc.service=as.ApplicationServerService span.kind=client system=grpc
Oct 06 16:29:26 prod-backend-network-01 chirpstack-network-server[109445]: time="2021-10-06T16:29:26.957405327+02:00" level=error msg="gateway: handle gateway stats error" ctx_id=07e538d3-bd0c-4296-90ce-8015d5944b6e error="handle gateway stats error: rpc error: code = Unimplemented desc = unknown service as.ApplicationServerService"