这是indexloc提供的服务,不要输入任何密码
Skip to content

nats: no responders available for request #2741

@begmaroman

Description

@begmaroman

Description of the bug

I'm building an example of the microservices project built using go-micro with two simple services: https://github.com/begmaroman/go-micro-boilerplate/blob/feature/k8s/docker-compose.yaml

The first service is rest-api-svc and built using go micro web framework. Another one is account-svc built using go-micro.

They use nats server for discovery, transport and as a broker. I tried all other options for the transport but the following bug still appears:

{"id":"go.micro.client.transport","code":500,"detail":"nats: no responders available for request","status":"Internal Server Error"}

The interesting point is that the bug is flaky and appears ~ once per 10 request.

How to reproduce the bug

  1. Clone the repo
  2. Run go mod download
  3. Run make build-base-image
  4. Run docker compose up --build
  5. Send request to GET http://localhost:3004/user few times

Environment

Go Version: 1.23.0

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