running curl localhost:8080 fails
con-ji opened this issue · comments
I'm trying to run the example as
letmetestserver --port=8080 && letmegrpc --addr=localhost:3149 --port=8080 serve.proto
However, running curl localhost:8080
returns curl: (56) Recv failure: Connection reset by peer
For reference, I'm running this server and attempting to curl on the same machine. curl localhost:3149
simply says Connection refused
Any solutions?
You need to curl http://localhost:8080/ServiceName/MethodName not just localhost:8080
Same issue: at this point, I'm thinking it's a network problem
* About to connect() to localhost port 8080 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /Label/Produce HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8080
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
Did you type in the right Service and Method name? Maybe check the generated code?
Another thing to try is to also generated the code using protoc
https://github.com/gogo/letmegrpc#customization
Yep, I typed the link from the example. The generated code also seems fine - this is a network issue on my end, I'll close the issue.