harlow / go-micro-services

HTTP up front, Protobufs in the rear
MIT License
1.09k stars 165 forks source link

Service API error? #13

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi! Below the details:

stalker@zombie ~/workspace/src/github.com/harlow/go-micro-services > $ sudo docker-compose ps
Name                Command      State     Ports   
------------------------------------------------------------
gomicroservices_api_1       /app/api       Exit 1            
gomicroservices_auth_1      /app/auth      Up       8080/tcp 
gomicroservices_geo_1       /app/geo       Up       8080/tcp 
gomicroservices_profile_1   /app/profile   Up       8080/tcp 
gomicroservices_rate_1      /app/rate      Up       8080/tcp 

stalker@zombie ~/workspace/src/github.com/harlow/go-micro-services > $ sudo docker-compose logs
Attaching to gomicroservices_api_1, gomicroservices_auth_1, gomicroservices_geo_1, gomicroservices_rate_1, gomicroservices_profile_1
api_1     | 2015/11/18 11:48:31 dial failed: grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)
api_1     | 2015/11/18 11:48:48 dial failed: grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)

I think in API service (main.go) should present grpc.WithInsecure() call?

38 // mustDial ensures the tcp connection to specified address.
39 func mustDial(addr *string) *grpc.ClientConn {
40         var opts []grpc.DialOption
41 
42         opts = append(opts, grpc.WithInsecure())
43 
44         conn, err := grpc.Dial(*addr, opts...)
45         if err != nil {
46                 log.Fatalf("dial failed: %s", err)
47                 panic(err)
48         }
49         return conn
50 }

Thanx!

harlow commented 9 years ago

Nice catch. looks like there have been some breaking changes in the grpc library. Will get this updated.

harlow commented 9 years ago

I have updated the dial function. I'm going to close the issue for the time being; feel free to re-open if you are still having issues.