Same error message as in
Rpc error: code = Unimplemented desc = unknown service ns.NetworkServerService (code: 2).
My Chirpstack is started with as a docker container using https://github.com/chirpstack/chirpstack-docker/blob/v3/ (so, Chirpstack v3), with just the ports: - 8080:8080
statement changed to ports: - 8081:8080
(A different service is already bound to port 8080 on my system.)
My Python packages are
chirpstack-api==3.12.4
protobuf==3.20.3
grpcio==1.60.0
My script
#!/usr/bin/env python3
import os
import grpc
from chirpstack_api.ns import NetworkServerServiceStub
from chirpstack_api.ns.ns_pb2 import CreateMACCommandQueueItemRequest, GetServiceProfileRequest
host = "127.0.0.1:8081"
channel = grpc.insecure_channel(host)
ns = NetworkServerServiceStub(channel)
x = GetServiceProfileRequest()
x.id = bytes.fromhex("a37664ba-a32a-4df2-965f-6be6bf9e7e60".replace("-", ""))
#x.name = "service"
print("Sending command")
adr_algos = ns.GetServiceProfile(x)
print("Done")
Outputs
Sending command
Traceback (most recent call last):
File "/home/max/sf_fixer/./sf_fixer.py", line 24, in <module>
adr_algos = ns.GetServiceProfile(x)
File "/home/max/.local/lib/python3.10/site-packages/grpc/_channel.py", line 1160, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/home/max/.local/lib/python3.10/site-packages/grpc/_channel.py", line 1003, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = "unknown service ns.NetworkServerService"
debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:8081 {created_time:"2024-01-23T14:10:59.347840581+01:00", grpc_status:12, grpc_message:"unknown service ns.NetworkServerService"}"
Which is inexplicable to me, because I do match the v3 chirpstack-api Python package with a running Chirpstack v3.
The frontend is regularly reachable.