Describe the bug
{"id":"go.micro.client.transport","code":500,"detail":"404 Not Found: 404 page not found\n","status":"Internal Server Error"}main.go code:
reg := etcdv3.NewRegistry(func(op *registry.Options){
op.Addrs = []string{
config.Get("etcd_addr").String(""),
}
})
// New Service
service := micro.NewService(
micro.Name("go.micro.srv.test"),
micro.Version("latest"),
micro.Registry(reg),
)
// Initialise service
service.Init()
// Register Handler
test.RegisterTestServiceHandler(service.Server(), &handler.Test{})
// Run service
if err := service.Run(); err != nil {
log.Fatal(err)
}
How to reproduce the bug:
Client use go-micro v1.16.0 instead of v1.17.1 in go.mod file
github.com/micro/go-micro v1.16.0
Another way to reproduce the bug:
Fallow the instructions on the greeter example.
From a web browser open http://localhost:8080/greeter/say/hello?name=John and refresh the page quickly until you see the error message.
This has been fixed on master; there should be a point release soon.
I want to know which pr fixed the problem?Is that OK? @milosgajdos83
I also found this bug,it does not matter transport method; using default transport(http) return "404 Not Found", using grpc return "all SubConns are in TransientFailure, latest connection error: connection closed", It's random return, not all response fail.
but when i change broker from mdns to nats or rabbitmq (version v1.16.0), it's works well @asim @milosgajdos83 。
you can try change broker to nats @ljxqxq
can you reproduce the issue with current master? if issue present - can you say what kind of registry and transport used?
I also found this bug,it does not matter transport method; using default transport(http) return "404 Not Found", using grpc return "all SubConns are in TransientFailure, latest connection error: connection closed", It's random return, not all response fail.
but when i change broker from mdns to nats or rabbitmq (version v1.16.0), it's works well @asim @milosgajdos83 。
you can try change broker to nats @ljxqxq
I got same issues. randomly response fail .
I also found this bug,it does not matter transport method; using default transport(http) return "404 Not Found", using grpc return "all SubConns are in TransientFailure, latest connection error: connection closed", It's random return, not all response fail.
but when i change broker from mdns to nats or rabbitmq (version v1.16.0), it's works well @asim @milosgajdos83 。
you can try change broker to nats @ljxqxqI got same issues. randomly response fail .
try to change default broker
@yingce i use the default, also had the problem. {"id":"go.micro.client","code":500,"detail":"connection error: dial tcp 172.16.7.16:35997: connect: connection refused","status":"Internal Server Error"}
my version is:
github.com/coreos/etcd v3.3.18
github.com/micro/go-micro v1.16.0
or
github.com/micro/go-micro v1.17.0
this is really old versions of go-micro =(
please, update to github.com/micro/go-micro/v2 to latest release and if problem persist - file new issue.
I found a problem, this problem is due to restarting the service, the old service was not destroyed in time, the selector selected the old service during load balancing, resulting in an abnormal request.
use the command:
etcdctl --endpoints "http://xxx:9002,http://xxx:9004,http://xxx:9006" get --prefix /micro/registry/
restart the service, i can see:
... "address":"172.16.7.16:40587"
... "address":"172.16.7.16:44799"
... "address":"172.16.7.16:37101"
and i found the error:
{"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.16.7.16:40587: connect: connection refused\"","status":"Internal Server Error"}
and after a while, i retry the command, to see the register service:
... "address":"172.16.7.16:44799"
... "address":"172.16.7.16:37101"
so, can see the old service is over, and service is normal
Most helpful comment
I want to know which pr fixed the problem?Is that OK? @milosgajdos83