grpc
grpc copied to clipboard
Invalid credentials for creating a security connector
When trying to use ComputeEngineCredentials in the cloud with the appropriate scopes enabled. I get the following message.
E0702 01:48:43.739044608 30877 credentials.c:131] Invalid credentials for creating a security connector.
LOG: Channel created.
LOG: Making RPC.
LOG: RPC failed with error code 2, and message "Rpc sent on a lame channel".
The OAuth token obtained using the metadata server works when directly used with curl.
Please let me know what debug information I can provide.
Can you provide a code snippet demonstrating the channel creation ?
This is the relevant code snippet. The environment variable GOOGLE_APPLICATION_CREDENTIALS was unset, and this was run on a newly spun-up cloud instance with the right scope configured at instance setup time. I will be happy to run the code again if better logs can be collected.
auto creds = grpc::GoogleDefaultCredentials();
grpc::ChannelArguments channel_args;
grpc::CreateChannel("genomics.googleapis.com:443",
creds,
channel_args));