grpc: Getting an error when trying to start server

when the server is running in a docker, the error will come, but when the server is running in local Mac os, It’s ok.

E0527 11:38:43.953469741 32144 server_chttp2.cc:40] {"created":"@1558928323.953405859","description":"No address added out of total 1 resolved","file":"../deps/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc","file_line":348,"referenced_errors":[{"created":"@1558928323.953401090","description":"Failed to add port to server","file":"../deps/grpc/src/core/lib/iomgr/tcp_server_custom.cc","file_line":402,"referenced_errors":[{"created":"@1558928323.953399233","description":"Failed to bind to port","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":72,"grpc_status":14,"os_error":"invalid argument"}]}]}

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 4
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Hi all!

maybe if this help someone I am using nestjs to create a microservice with grpc inside docker where I got the error below

{
  "created": "@1617308285.324323759",
  "description": "Only 1 addresses added out of total 2 resolved",
  "file": "../deps/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc",
  "file_line": 403,
  "referenced_errors": [
    {
      "created": "@1617308285.324318726",
      "description": "Failed to add port to server",
      "file": "../deps/grpc/src/core/lib/iomgr/tcp_server_custom.cc",
      "file_line": 403,
      "referenced_errors": [
        {
          "created": "@1617308285.324313958",
          "description": "Failed to bind to port",
          "file": "../deps/grpc/src/core/lib/iomgr/tcp_uv.cc",
          "file_line": 72,
          "grpc_status": 14,
          "os_error": "address not available"
        }
      ]
    }
  ]
}

@nestjs/microservices start running by default in localhost:5000 but it was resolved defining the url to 0.0.0.0:5000 in options { ..., url: '0.0.0.0:5000', ... } and the error gone!

any news on this?