SSL - Missing selected ALPN property. CPP

1,020 views
Skip to first unread message

micha...@nauto.com

unread,
Jul 24, 2017, 5:19:48 PM7/24/17
to grpc.io
bool uploadDetectionRPC(const FrameData &frame_data, const std::string &server, const std::string &secret) {
   
auto options = grpc::SslCredentialsOptions();    
   
auto channel_creds = grpc::SslCredentials(options);
   
auto call_creds = grpc::MetadataCredentialsFromPlugin(
        std
::unique_ptr<grpc::MetadataCredentialsPlugin>(new Authenticator(secret)));

   
auto composite_creds = grpc::CompositeChannelCredentials(channel_creds, call_creds);
   
IngestionServiceClient ingestion_client(grpc::CreateChannel(server, composite_creds));
   
bool res = ingestion_client.RecordDetection(frame_data);

   
return res;
}

Having some issues with this code sending data thgrough AWS ELB instance to server. It works with Go can my client can send correctly to the sever but when I try to implement in CPP I start getting this ALPN property issue.

E0724 14:16:01.337537569   22655 security_connector.c:529]   Missing selected ALPN property.
E0724 14:16:01.337593585   22655 handshake.c:128]            Security handshake failed: {"created":"@1500930961.337578768","description":"Error checking peer.","file":"external/com_github_grpc_grpc/src/core/lib/security/transport/handshake.c","file_line":152,"security_status":1}



micha...@nauto.com

unread,
Jul 24, 2017, 5:23:58 PM7/24/17
to grpc.io, micha...@nauto.com
My go client is set up like this and works correctly so I believe the server and ELB are set up correctly:

creds := credentials.NewClientTLSFromCert(nil, "")
conn, err := grpc.Dial(address, grpc.WithTransportCredentials(creds),
grpc.WithPerRPCCredentials(&loginCreds{
secret: secret,
}))


Yang Gao

unread,
Aug 1, 2017, 7:10:43 PM8/1/17
to grpc.io, micha...@nauto.com
Maybe try defining TSI_OPENSSL_ALPN_SUPPORT=0 and see whether it can fall back to NPN?

klemen.f...@gmail.com

unread,
Aug 2, 2017, 3:29:26 AM8/2/17
to grpc.io, micha...@nauto.com
Hi,

I had the same problem ALPN, but with connecting to a etcdv3 cluster running on compose.io. I've solved it by commenting out ALPN code in gRPC Core. Here's my thread if you find it useful: https://groups.google.com/forum/#!topic/grpc-io/pz5f8PpfzEo

Cheers,
Klemen
Reply all
Reply to author
Forward
0 new messages