Vision API错误输出声明&com; go.google.api.gax.grpc.ApiException:io.grpc.StatusRuntimeException:DEADLINE_EXCEEDED'

时间:2017-05-29 10:40:06

标签: grpc grpc-java vision-api

我执行了Vision API,用于从图像中提取文本,在运行示例代码时,它错误地显示在错误堆栈下面。

  

2017年5月28日上午10:46:48 io.grpc.internal.ManagedChannelImpl   信息:[ManagedChannelImpl @ 543788f3]使用目标vision.googleapis.com创建:443   com.google.api.gax.grpc.ApiException:io.grpc.StatusRuntimeException:DEADLINE_EXCEEDED   结束       在com.google.api.gax.grpc.ExceptionTransformingCallable $ ExceptionTransformingFuture.onFailure(ExceptionTransformingCallable.java:109)       在com.google.api.gax.core.ApiFutures $ 1.onFailure(ApiFutures.java:52)       在com.google.common.util.concurrent.Futures $ 6.run(Futures.java:1764)       在com.google.common.util.concurrent.MoreExecutors $ DirectExecutor.execute(MoreExecutors.java:456)       在com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:817)       在com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:753)       在com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:634)       在io.grpc.stub.ClientCalls $ GrpcFuture.setException(ClientCalls.java:466)       at io.grpc.stub.ClientCalls $ UnaryStreamToFuture.onClose(ClientCalls.java:442)       在io.grpc.internal.ClientCallImpl $ ClientStreamListenerImpl.close(ClientCallImpl.java:481)       at io.grpc.internal.ClientCallImpl $ ClientStreamListenerImpl.access $ 600(ClientCallImpl.java:398)       at io.grpc.internal.ClientCallImpl $ ClientStreamListenerImpl $ 1StreamClosed.runInContext(ClientCallImpl.java:513)       at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52)       at io.grpc.internal.SerializingExecutor $ TaskRunner.run(SerializingExecutor.java:154)       at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)       at java.util.concurrent.FutureTask.run(FutureTask.java:266)       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 201(ScheduledThreadPoolExecutor.java:180)       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)       在java.lang.Thread.run(Thread.java:745)   引起:io.grpc.StatusRuntimeException:DEADLINE_EXCEEDED       在io.grpc.Status.asRuntimeException(Status.java:545)       ......还有13个

我在本地系统中运行Eclipse中的代码。

我尝试了一些论坛中的以下项目; 1)将所有netty *罐从4.1.6降级到4.1.3 2)google-cloud-vision-0.10.0-beta.jar降级为google-cloud-vision-0.9.4-beta.jar 3)添加pom.xml 4)在windows环境变量中添加GOOGLE_APPLICATION_CREDENTIALS - 指向为服务帐户下载的JSON文件

1 个答案:

答案 0 :(得分:0)

尝试在创建存根时设置截止日期

 sudo yum update

并查看是否有帮助