You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go run main.go demo2
2025-03-03 16:30:37.731 [DEBU] service register: &{Head: Deployment: Namespace: Name:demo2 Version: Endpoints:192.168.100.1:56586,192.168.2.15:56586 Metadata:map[protocol:grpc]}
2025-03-03 16:30:37.736 [DEBU] etcd put success with key "/service/default/default/demo2/latest/192.168.100.1:56586,192.168.2.15:56586", value "{"protocol":"grpc"}", lease "7587884632992045171"
2025-03-03 16:30:37.736 [INFO] pid[48656]: grpc server started listening on [:56586]
2025-03-03 16:30:39.709 [DEBU] Watch key "/service/default/default/demo2/latest/"
2025-03-03 16:30:39.711 [DEBU] client conn updated with addresses [{"Addr":"192.168.100.1:56586","ServerName":"demo2","Attributes":{"protocol":"grpc","RawService":"\u003c0xc0002e2930\u003e"},"BalancerAttributes":null,"Metadata":null},{"Addr":"192.168.2.15:56586","ServerName":"demo2","Attributes":{"protocol":"grpc","RawService":"\u003c0xc0002e2930\u003e"},"BalancerAttributes":null,"Metadata":null}]
2025-03-03 16:30:39.712 [DEBU] client conn updated with addresses [{"Addr":"192.168.100.1:56586","ServerName":"demo2","Attributes":{"protocol":"grpc","RawService":"\u003c0xc000688570\u003e"},"BalancerAttributes":null,"Metadata":null},{"Addr":"192.168.2.15:56586","ServerName":"demo2","Attributes":{"protocol":"grpc","RawService":"\u003c0xc000688570\u003e"},"BalancerAttributes":null,"Metadata":null}]
2025-03-03 16:30:39.712 [INFO] &api.HelloRes{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000388170)}, sizeCache:0, unknownFields:[]uint8(nil), Reply:"gogf-server-reply:hello demo2"}
2025-03-03 16:30:59.186 [INFO] signal received: interrupt, gracefully shutting down
2025-03-03 16:30:59.186 [DEBU] service deregister: &{Service:0xc00010c380 Endpoints:192.168.100.1:56586,192.168.2.15:56586 Metadata:map[protocol:grpc]}
2、servername = "gogf-grpcx/demo2"
go run main.go gogf-grpcx/demo2
2025-03-03 16:15:12.353 [DEBU] service register: &{Head: Deployment: Namespace: Name:gogf-grpcx/demo2 Version: Endpoints:192.168.100.1:55358,192.168.2.15:55358 Metadata:map[protocol:grpc]}
2025-03-03 16:15:12.354 [INFO] pid[29984]: grpc server started listening on [:55358]
2025-03-03 16:15:15.060 [DEBU] Watch key "/service/default/default/gogf-grpcx/demo2/latest/"
panic: invalid address "latest"for creating endpoint, endpoint address is like "ip:port"
2025-03-03 16:15:15.060 [DEBU] Watch key "/service/default/default/gogf-grpcx/demo2/latest/"
panic: invalid address "latest"for creating endpoint, endpoint address is like "ip:port"
panic: invalid address "latest"for creating endpoint, endpoint address is like "ip:port"
goroutine 19 [running]:
github.com/gogf/gf/v2/net/gsvc.NewEndpoint({0xc0000f462a, 0x6})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/v2@v2.8.3/net/gsvc/gsvc_endpoint.go:30 +0x125
github.com/gogf/gf/v2/net/gsvc.NewEndpoints({0xc0000f462a?, 0x56?})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/v2@v2.8.3/net/gsvc/gsvc_endpoints.go:19 +0x95
github.com/gogf/gf/v2/net/gsvc.NewServiceWithKV({0xc0000f4600, 0x57}, {0xc000037200, 0x34})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/v2@v2.8.3/net/gsvc/gsvc_service.go:57 +0xa5
github.com/gogf/gf/contrib/registry/file/v2.(*Registry).getServiceByFilePath(0x119392f?, {0xc00025ecb0, 0x6d})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/contrib/registry/file/v2@v2.8.3/file_discovery.go:120 +0xdd
github.com/gogf/gf/contrib/registry/file/v2.(*Registry).getServices(0xc000049190, {0x129a7c8, 0xc00013ad20})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/contrib/registry/file/v2@v2.8.3/file_discovery.go:86 +0x118
github.com/gogf/gf/contrib/registry/file/v2.(*Registry).Search(0xc000049190, {0x129a7c8?, 0xc00013ad20?}, {{0xc0000371ca, 0x31}, {0x0, 0x0}, {0x0, 0x0}, 0x0})
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/contrib/registry/file/v2@v2.8.3/file_discovery.go:24 +0x37
github.com/gogf/gf/contrib/rpc/grpcx/v2/internal/resolver.(*Resolver).watch(0xc0002523c0)
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/contrib/rpc/grpcx/v2@v2.8.3/internal/resolver/resolver_resolver.go:41 +0x62
created by github.com/gogf/gf/contrib/rpc/grpcx/v2/internal/resolver.(*Builder).Build in goroutine 14
C:/Users/LY/go/pkg/mod/github.com/gogf/gf/contrib/rpc/grpcx/v2@v2.8.3/internal/resolver/resolver_builder.go:56 +0x268
exit status 2
What did you expect to see?
The text was updated successfully, but these errors were encountered:
ynwcel
added
the
bug
It is confirmed a bug, but don't worry, we'll handle it.
label
Mar 3, 2025
Issues-translate-bot
changed the title
os/gtime: issue grpcx.Server.ServerConfig.Name 包含 "/" 会报错
os/gtime: issue grpcx.Server.ServerConfig.Name contains "/" and will report an error
Mar 3, 2025
ynwcel
changed the title
os/gtime: issue grpcx.Server.ServerConfig.Name contains "/" and will report an error
grpcx: grpcx.Server.ServerConfig.Name contains "/" and will report an error
Mar 3, 2025
Go version
go 1.24.0
GoFrame version
2.8.3
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
1. hello.proto
2. main.go
What did you see happen?
运行情况
1、servername = "demo2"
2、servername = "gogf-grpcx/demo2"
What did you expect to see?
The text was updated successfully, but these errors were encountered: