我正在尝试使用 scio 和 apache Beam 从 scala 创建一些云指标来执行数据流任务。
我收到以下错误:
java.lang.IllegalArgumentException: ALPN is not configured properly. See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting for more information.
我按照该 URL 上的步骤添加了一个 JVM 参数:
-Djavaagent=/Users/user/Downloads/jetty-alpn-agent-2.0.6.jar
我也有环境变量:GOOGLE_APPLICATION_CREDENTIALS=/etc/recsys/recsys-dev.json
编码:
val pathToCredsFile = "/etc/recsys/recsys-dev.json"
val credentials = GoogleCredentials.fromStream(new FileInputStream(pathToCredsFile)).createScoped(Lists.newArrayList("https://www.googleapis.com/auth/cloud-platform"))
val settings = MetricServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credentials))
.build()
val metricServiceClient = MetricServiceClient.create(settings) <-throws ex whether or not I use settings
我能得到一些帮助吗?