smallnest / rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
https://rpcx.io
Other
8.11k stars 1.17k forks source link

端口被占用或者无效,无法抛出错误信息,这种情况如何处理? #744

Closed super-l closed 2 years ago

super-l commented 2 years ago

端口被占用或者无效,无法抛出错误信息,这种情况如何处理?

func runServer() error { flag.Parse() s := server.NewServer() s.RegisterName("DataRepeat", new(service.DataRepeat), "") s.AuthFunc = auth err := s.Serve("tcp", *addr) return err }

比如端口号是1 , err 是 nil。不会显示错误信息

supermario1990 commented 2 years ago

我这边在mac下测试,端口为1会报错,请问你是在什么环境下测试的?

smallnest commented 2 years ago

缺乏信息。正常如果端口被占用会抛出错误信息的