Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRPC server fails to start or serve responses #174

Open
d1820 opened this issue Mar 10, 2022 · 0 comments
Open

GRPC server fails to start or serve responses #174

d1820 opened this issue Mar 10, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@d1820
Copy link

d1820 commented Mar 10, 2022

Can not connect to the server instance and actually get a response. From bloom i get "2 UNKNOWN: Stream removed" from services calling container to container i get

{"@t":"2022-03-09T15:50:14.8670483Z","@m":"Call failed with gRPC error status. Status code: 'Unavailable', Message: '\"Error starting gRPC call. HttpRequestException: Connection refused (camouflage.svc.cluster.local:5057) SocketException: Connection refused\"'.","@i":"bcfa385f","StatusCode":"Unavailable","StatusMessage":"Error starting gRPC call. HttpRequestException: Connection refused (camouflage.svc.cluster.local:5057) SocketException: Connection refused","EventId":{"Id":3,"Name":"GrpcStatusError"},"SourceContext":"Grpc.Net.Client.Internal.GrpcCall","GrpcMethodType":"Unary","GrpcUri":"/KBX.CRE.ReferenceData.Contracts.v1.Services.ChargeTypeGrpcService/GetChargeTypeByCode","RequestId":"0HMG1SHRNUFVR:00000001","RequestPath":"/KBX.CRE.RateManagement.Contracts.v1.Services.RateGrpcService/CreateRates","ConnectionId":"0HMG1SHRNUFVR"}

I was hoping the log would give more insight. If i remove the mock server and point back to another container with the live service all is fine. I was thinking this could be related to how .netcore handles GRPC calls with the client vs other clients.

Url used in .net for connecting is "http://camouflage.svc.cluster.local:5057"

  1. Folder Structure ....
    image
    image

  2. Proto

syntax = "proto3";
package KBX.CRE.ReferenceData.Contracts.v1.Services;
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";

message ChargeType {
   string ChargeTypeId = 1;
   string TenantId = 2;
   string ChargeTypeCode = 3;
   string ChargeTypeDesc = 4;
   string CreateBy = 5;
   .google.protobuf.Timestamp CreateDateTime = 6;
   string LastChangeBy = 7;
   .google.protobuf.Timestamp LastChangeDateTime = 8;
   .google.protobuf.Timestamp RowVersion = 9;
}

message ChargeTypeQueryByCodeRequest {
   string ChargeType = 1;
}

message Error {
   int32 ErrorCode = 1;
   string Message = 2;
   string Domain = 3;
   map<string,string> MetaData = 4;
   int32 RetryDelayInMs = 5;
}

message GrpcChargeTypeListResponse {
   StatusCode Status = 1;
   bool HasError = 2;
   Error Error = 3;
   repeated ChargeType Result = 4;
}
message GrpcChargeTypeResponse {
   StatusCode Status = 1;
   bool HasError = 2;
   Error Error = 3;
   ChargeType Result = 4;
}
enum StatusCode {
   OK = 0;
   Cancelled = 1;
   Unknown = 2;
   InvalidArgument = 3;
   DeadlineExceeded = 4;
   NotFound = 5;
   AlreadyExists = 6;
   PermissionDenied = 7;
   Unauthenticated = 16;
   ResourceExhausted = 8;
   FailedPrecondition = 9;
   Aborted = 10;
   OutOfRange = 11;
   Unimplemented = 12;
   Internal = 13;
   Unavailable = 14;
   DataLoss = 15;
}
service ChargeTypeGrpcService {
   rpc GetChargeTypeByCode (ChargeTypeQueryByCodeRequest) returns (GrpcChargeTypeResponse);
}

MOCK

{"Status":0,"HasError":false,"Error":null,"Result":{"ChargeTypeId":"3b624fea-590c-4594-b674-990076a17598","TenantId":"11111","ChargeTypeCode":"LH","ChargeTypeDesc":"LINE HAUL","CreateBy":"user","CreateDateTime":"2021-05-12T20:47:08.089927Z","LastChangeBy":"user","LastChangeDateTime":"2021-05-12T20:47:08.089927Z","RowVersion":"2021-05-12T20:47:08.089963Z"}}

YAML

version: '3.4'

volumes:
  camouflage_data: {}

services:
  camouflage_ui:
    image: shubhendumadhukar/camouflage-filemanager:latest
    container_name: camouflage_ui
    volumes:
      - camouflage_data:/opt/virtual_services
    environment:
      FS_ROOT: /opt/virtual_services
      WRITE_PROTECTED: "false"
      PORT: 3001
    ports:
      - "3001:3001"
    labels:
      org.label-schema.group: "camouflage"
  camouflage:
    image: shubhendumadhukar/camouflage:latest
    container_name: camouflage
    hostname: camouflage.svc.cluster.local
    volumes:
      - camouflage_data:/app
    restart: unless-stopped
    ports:
      - "5057:5057"
      - "5051:5051"
      - "5555:5555"
    labels:
      org.label-schema.group: "camouflage"
networks:
  default:
    name: nat

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
BLOOMRPC
image
DOCKER LOGS
image

Desktop (please complete the following information):

  • Windows
  • Docker Image
    image

Additional context
camouflage.log

Attach camouflage.log file

@d1820 d1820 added the bug Something isn't working label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants