Skip to content

Help wanted. connect to backends fails. #2

@fjoesne

Description

@fjoesne

I have a nodejs backend grpc-server (condor) that is up and running, but it seems the grpc-gateway is unable to establish connection to the backend(s). There are no information whatsoever about what goes wrong.

You can look at the configurations etc, but it would be sufficient if I can get some help making the gateway server more verbose for debugging as I have very limited go-experience.

PS
I've forked docker-grpc-gateway to make it useable in our workflow. There may be some obvious mistakes made by the config-generator script, but as far as I can see the config file generated is ok. Also manually creating the config files makes no difference.

config generated / used

{
  "gateway": {
    "listen": ":8081"
  },
  "backends": [{
    "package": "info",
    "backend": "localhost:5100",
    "services": {
      "InfoService": "/info/"
    }
  }]
}

protofile: protos/info/informer.proto

syntax = "proto3";

package info;

import "google/api/annotations.proto";
////
//// Service definition
////
service InfoService {

    // setinfo adds a Info item to the database.
    rpc SetInfo (AddInfoRequest) returns (Confirmation){
        option (google.api.http) = {
            put: "/info/setinfo/{info.uuid}"
            body: "auth"
        };
    }

    // getInfo retrieves a Info item from database based on uuid.
    rpc GetInfo (GetInfoRequest) returns (InfoResponse){
        option (google.api.http) = {
            post: "/info/getinfo/{uuid}"
            body: ""
        };
    }

    // listCategories retrieves list of all categories available in database
    rpc ListCategories (CategoryListRequest) returns (CategoryList){
        option (google.api.http) = {
            post: "/info/listcategories"
            body: ""
        };
    }

    // listHeader retrieves list of all info headers in database, with uuid.
    rpc ListHeaders (HeaderListRequest) returns (HeaderList){
        option (google.api.http) = {
            post: "/info/listheaders"
            body: ""
        };
    }

}

////
//// Message definitions
////

// SetInfo messages

message AddInfoRequest{
    Info info = 1;
    Auth auth = 2;
//    Timestamp timestamp = 3;
}

message Confirmation {
    string type = 1;
    string comment = 2;
    string error = 3;
//    Timestamp timestamp = 5;
}

// GetInfo messages

message GetInfoRequest{
    string uuid = 1;
    Auth auth = 2;
}

message InfoResponse{
    Info info = 1;
    string error = 2;
}

// ListCategories messages

message CategoryListRequest{
    Auth auth = 2;
}

message CategoryList{
    repeated string categories = 1;
    string error = 2 ;
}

// listHeaders messages

message HeaderListRequest{
    repeated string categories = 1;
    Auth auth = 2;
}

message HeaderList{
    repeated UuidAndHeader headers = 1;
    string error = 2;
}

message UuidAndHeader{
    string uuid = 1;
    string header = 2;
}

// global messages

message Info {
    string uuid = 1;
    string category = 2;
    repeated string subcategories = 3;
    string header = 4;
    string summary = 5;
    string body = 6;
    string author = 7;
}

message Auth{
    string user = 1;
    string password = 2;
    string token = 3;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions