0

my python client code is:

def run():
    try:
        channel = grpc.insecure_channel('api-auth.uid.ir')
        stub = session_api_pb2_grpc.SessionServiceStub(channel)
        response = stub.RegisterUserSession(
            session_api_pb2.RegisterUserSessionRequest(
                context={'requestHeader': {}, 'appInfo': {}, 'apiInfo': {}, 'panelInfo': {}},
                user={
                    'businessInformation': {
                        'projectName': 'Direct',
                        'businessId': '**************************',
                        'businessToken': '**************************'
                    },
                    'userInformation': {
                        'nationalId': '0874534879',
                        'nationalIdSerial': '1234567',
                        'sex': 1
                    }}))

        print(response)
    except Exception as e:
        print(e)

and after run , return error with grpc_status 14

<_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "failed to connect to all addresses; last error: UNAVAILABLE: Socket closed"
    debug_error_string = "UNKNOWN:Failed to pick subchannel {created_time:"2022-11-02T10:50:26.638744+03:30", children:[UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: Socket closed {grpc_status:14, created_time:"2022-11-02T10:50:26.638736+03:30"}]}"
>

please help me for resolve this issue

sadng
  • 1
  • 1
  • 2

0 Answers0