Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Users report grpcurl failing with "unknown service" errors when using grpc.NewTransport(). The gRPC transport uses gRPC as a communication layer (like NATS or RabbitMQ) but doesn't provide native gRPC interoperability. Native gRPC clients require the gRPC server/client packages instead.

Changes

  • New guide guides/grpc-compatibility.md: Documents transport vs server/client distinction, when to use each, complete examples, and common error solutions
  • Updated transport.md: Added warning section clarifying transport ≠ native gRPC compatibility
  • Updated plugins.md: Added Server/Client to interfaces list with gRPC example
  • Updated guides/comparison.md: Fixed gRPC integration example to show both server and client

Correct Usage

import (
    grpcServer "go-micro.dev/v5/server/grpc"
    grpcClient "go-micro.dev/v5/client/grpc"
)

service := micro.NewService(
    micro.Server(grpcServer.NewServer()),  // Native gRPC compatible
    micro.Client(grpcClient.NewClient()),
)
Component Import Path Native gRPC Compatible
Transport go-micro.dev/v5/transport/grpc ❌ No
Server go-micro.dev/v5/server/grpc ✅ Yes
Client go-micro.dev/v5/client/grpc ✅ Yes
Original prompt

This section details on the original issue you should resolve

<issue_title>[QUESTION] Why are other GRPC clients not able to access my go-micro service?</issue_title>
<issue_description>## Your question
I have a Go Micro client and it works fine when I call the Go Micro Server, but when I use grpcurl to call the server I get the error: Unimplemented.

What have you tried?

grpcurl -proto ./helloworld/proto/helloworld.proto -plaintext -d '{"name":"Alice"}' localhost:8080 helloworld.Say.Hello

ERROR:
  Code: Unimplemented
  Message: unknown service helloworld.Say
grpcurl -proto ./helloworld/proto/helloworld.proto -plaintext -d '{"name":"Alice"}' localhost:8080 list

Warning: The -d argument is not used with 'list' or 'describe' verb.
helloworld.Say
helloworld.Whistle

Code sample

syntax = "proto3";

package helloworld;
option go_package = "/proto;helloworld";

service Say {
    rpc Hello(Request) returns (Response) {}
    rpc Bye(Request)   returns (Response) {}
}

message Request {
    string name = 1;
}

message Response {
    string message = 1;
}

service Whistle {
    rpc High(Request) returns (Response) {}
}

This is my main.go, if relevant:

package main

import (
	"context"

	"go-micro.dev/v5"
	grpc "go-micro.dev/v5/transport/grpc"
	pb "example.com/helloworld/proto"
)

type Say struct{}

func (s *Say) Hello(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
	rsp.Message = "Hello " + req.Name
	return  nil
}

func (s *Say) Bye(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
	rsp.Message = "Bye " + req.Name
	return nil
}

type Whistle struct{}

func (w *Whistle) High(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
	rsp.Message = "high pitch whistling - " + req.Name 
	return nil
}

func main() {
	t := grpc.NewTransport()
	service := micro.NewService(
		micro.Name("helloworld"),
		micro.Address(":8080"),
		micro.Transport(t),
	)
	service.Init()
	pb.RegisterSayHandler(service.Server(), &Say{})
	// service.Handle(new(Say))
	// service.Handle(new(Whistle))
	service.Run()
}

Context

Nothing else. Can provide additional info., if needed.

Resources you've checked

Helpful links

<agent_instructions>Create a section in the documentation that highlights the need for the grpc client and server packages when needing native grpc compatibility. Otherwise the grpc transport just leverages the protocol like we would rabbitmq, nats or Kafka.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@asim You need to use the grpc server not the transport. The transport enables you to use grpc like you would rabbitmq, nats or Kafka but there's no guarantees about interoperability. But the grpc client and server look to be compatible with native grpc.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 25, 2025 07:24
…er packages

Co-authored-by: asim <17530+asim@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix gRPC client access issue for Go Micro service Add documentation for native gRPC compatibility vs transport Nov 25, 2025
Copilot AI requested a review from asim November 25, 2025 07:27
@asim asim marked this pull request as ready for review November 25, 2025 07:28
@asim asim merged commit 00a1194 into master Nov 25, 2025
1 check failed
@asim asim deleted the copilot/fix-grpc-url-access-issue branch November 25, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QUESTION] Why are other GRPC clients not able to access my go-micro service?

2 participants