-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
google.golang.org/grpc v1.36.0-dev.0.20210122012134-2c42474aca0c
go version go1.15.6 linux/arm
linux rpi
lis, err := net.Listen("tcp", ":9999")
if err != nil {
return errors.Wrapf(err, "create network listener")
}
s := grpc.NewServer()
RegisterAudiorServer(s, &Server{})
reflection.Register(s)
func (self *Server) Record(ctx context.Context, req *Request) (*Response, error) {
fmt.Println("called!!!!")
return &Response{ErrorType: "audior"}, nil
}
syntax = "proto3";
package audior;
service Audior {
rpc Record (Request) returns (Response) {}
}
message Request{
enum event {
None = 0;
AudioRecordStart = 1;
AudioRecordStop = 2;
}
event Event = 1;
}
message Response {
string ErrorType = 1;
string Error = 2;
}
protoc --gofast_out=plugins=grpc:. pkg/node/audior/audior.proto
What did you expect to see?
It works with ip4 , but not ip6 , the same error when using grpccurl or calling from grpc client from go.
What did you see instead?
grpcurl -plaintext -d '{"Event": 2}' [fe80::6396:e2a6:8607:e10f]:9990 audior.Audior/Record
Failed to dial target host "[fe80::6396:e2a6:8607:e10f]:9990": dial tcp [fe80::6396:e2a6:8607:e10f]:9990: connect: invalid argument
netstat -tulpn | grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 556/sshd
tcp 0 0 127.0.0.1:32903 0.0.0.0:* LISTEN 9612/node
tcp6 0 0 :::22 :::* LISTEN 556/sshd
tcp6 0 0 :::9990 :::* LISTEN 12523/i360
tcp6 0 0 :::9999 :::* LISTEN 12523/i360
root@raspberrypi:~/src/github.com/arribada/i360# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::6396:e2a6:8607:e10f prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:d2:00:b6 txqueuelen 1000 (Ethernet)
RX packets 312650 bytes 102090189 (97.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 1242
TX packets 263220 bytes 52487031 (50.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0