.net Google.Cloud.Firestore名称解析在grpc中的错误

时间:2019-05-30 00:31:48

标签: .net dns google-cloud-firestore grpc

我的后端尝试访问云Firestore集合失败。我使用nuget包Google.Cloud.Firestore(当前为1.0.0-beta20)。 错误提示

Grpc.Core.RpcException: Status(StatusCode=Unavailable, Detail="Name resolution failure")

我的代码是

public async Task PushAppointment(CcAppointment appointment)
{
    var fireStoreDb = await FirestoreDb.CreateAsync("peakplan-fb-mobile"); 

    var docRef = fireStoreDb.Collection("appointments");  
    await docRef.AddAsync(appointment);
}

正确设置并加载了Google Credentials JSON env var。

在出现异常消息之前,我会得到以下日志:

D0530 02:26:56.253562 Grpc.Core.Internal.UnmanagedLibrary Attempting to load native library "/Users/gabrielwahle/.nuget/packages/grpc.core/1.19.0/lib/netstandard1.5/../../runtimes/osx/native/libgrpc_csharp_ext.x64.dylib"
D0530 02:26:56.347160 Grpc.Core.Internal.NativeExtension gRPC native library loaded successfully.

具有以下日志设置:

Environment.SetEnvironmentVariable("GRPC_TRACE", "api,cares_resolver,cares_address_sorting");
Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "debug");

以前有人处理过该错误吗?

0 个答案:

没有答案