Code Monkey home page Code Monkey logo

grpc-go-course's Introduction

gRPC Go

Go Unit Tests Lint protobuf cross-platform Udemy

COUPON: START_AUG

Notes

Windows

  • I recommend you use powershell (try to update: see) for following this course, you might have unexepected behavior if you use Git bash or other (especially with OpenSSL)
  • I recommend you use Chocolatey as package installer (see Install)

Build

Linux/MacOS

make all

*all is a Makefile rule - check the other rules

Windows - Chocolatey

choco install make
make all

*all is a Makefile rule - check the other rules

Windows - Without Chocolatey

protoc -Igreet/proto --go_opt=module=github.com/Clement-Jean/grpc-go-course --go_out=. --go-grpc_opt=module=github.com/Clement-Jean/grpc-go-course --go-grpc_out=. greet/proto/*.proto

protoc -Icalculator/proto --go_opt=module=github.com/Clement-Jean/grpc-go-course --go_out=. --go-grpc_opt=module=github.com/Clement-Jean/grpc-go-course --go-grpc_out=. calculator/proto/*.proto

protoc -Iblog/proto --go_opt=module=github.com/Clement-Jean/grpc-go-course --go_out=. --go-grpc_opt=module=github.com/Clement-Jean/grpc-go-course --go-grpc_out=. blog/proto/*.proto

go build -o bin/greet/server.exe ./greet/server
go build -o bin/greet/client.exe ./greet/client

go build -o bin/calculator/server.exe ./calculator/server
go build -o bin/calculator/client.exe ./calculator/client

go build -o bin/blog/server.exe ./blog/server
go build -o bin/blog/client.exe ./blog/client

Makefile

For more information about what are the rules defined in the Makefile, please type:

make help

Reporting a bug

As I need to know a little bit more information about your environment to help you, when filling an issue, please provide the output of:

make about

grpc-go-course's People

Contributors

clement-jean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grpc-go-course's Issues

transport: Error while dialing dial tcp myserverIP:50051: i/o timeout

I have developed a unary grpc service that gets the ipaddress and number from client and returns the square of that number. If I host the service in localhost the client is able to access those service and prints the output (square of the input number)

Now I hosted the server side binary in a real separate server(linux) and trying to access that service via my local client(windows).

But when I try to access the service from client it waits for sometime and throws "transport: Error while dialing dial tcp myserverIP:50051: i/o timeout" error

I am able to ping the server from client and it is working fine!

precise steps are

step1: (client side)
#Windows local machine
#updated the ssl.sh script, cn to myserverIP(ip address of my linux server) and generated the crt and pem files

step2: (server side) server.crt & server.pem files are copied from client side
#linux OS with specific myserverIP

>./server myserverIP:50051
2023/07/11 15:26:38 Listening at myserverIP:50051

step3: (client side-windows) ca.crt file is already generated

>client.exe myserverIP:50051 5  # adapted to get ip address from user as a 1st parameter and number to be squared as 2nd param
2023/07/11 13:58:23 Could not square the number: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp myserverIP:50051: i/o timeout"

Please may I have your help in resolving the connection issue?

How to use unit test in blog?

Hi Clement-Jean:

I finished gRPC-GO from the udemy course, but I noticed that you have written tests, will you add the same course?
Or README.md can be updated
I also noticed that some French and French courses are different

like this struct
type server struct { // The original course is to write service pb.BlogServiceServer }

ssl.sh script error

Hi Clemen, I am following your tutorial on gRPC [Golang] Master Class: Build Modern API & Microservices.
How ever during enabling ssl security, when I try to run bash ssl.sh I get below error in my wsl ubuntu running 22.04.

$ make about
OS: linux 5.15.90.1-microsoft-standard-WSL2 x86_64
Shell: bash 5.1.16(1)-release
Protoc version: libprotoc 3.12.4
Go version: go version go1.20.5 linux/amd64
Go package: github.com/dineshr93/services
Openssl version: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
" as a number parse "4096
Could not open file or uri for loading private key from ca.key
802BCA06CB7F0000:error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:../crypto/store/store_register.c:237:scheme=file
802BCA06CB7F0000:error:80000002:system library:file_open:No such file or directory:../providers/implementations/storemgmt/file_store.c:267:calling stat(ca.key)
" as a number parse "4096
Could not open file or uri for loading private key from server.key
80BBE0E0437F0000:error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:../crypto/store/store_register.c:237:scheme=file
80BBE0E0437F0000:error:80000002:system library:file_open:No such file or directory:../providers/implementations/storemgmt/file_store.c:267:calling stat(server.key)
Can't open "server.csr" for reading, No such file or directory
803BE2069A7F0000:error:80000002:system library:BIO_new_file:No such file or directory:../crypto/bio/bss_file.c:67:calling fopen(server.csr, r)
803BE2069A7F0000:error:10000080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:75:
Unable to load certificate request input
Can't open "server.key" for reading, No such file or directory
808B048E137F0000:error:80000002:system library:BIO_new_file:No such file or directory:../crypto/bio/bss_file.c:67:calling fopen(server.key, r)
808B048E137F0000:error:10000080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:75:

Please may I have your help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.