在运行 HelloActivity 示例 Temporal Java 程序时发生错误。

huangapple go评论166阅读模式
英文:

Error while running HelloActivity Sample Temporal Java program

问题

我运行 Temporal 的 HelloActivity Java 示例时遇到以下错误:

06:43:55.969 [main] INFO  io.temporal.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.1S, pollBackoffMaximumInterval=PT1M, pollThreadCount=5, pollThreadNamePrefix='Host Local Workflow Poller'}, identity=23af0cb3-09aa-4cbc-bca2-118cfa79dc96}
06:43:57.291 [Activity Poller taskQueue="HelloActivity", namespace="default": 4] ERROR io.temporal.internal.worker.Poller - Failure in thread Activity Poller taskQueue="HelloActivity", namespace="default": 4
io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service temporal.api.workflowservice.v1.WorkflowService
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
	at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.pollActivityTaskQueue(WorkflowServiceGrpc.java:2682)
	at io.temporal.internal.worker.ActivityPollTask.poll(ActivityPollTask.java:95)
	at io.temporal.internal.worker.ActivityPollTask.poll(ActivityPollTask.java:38)
	at io.temporal.internal.worker.Poller$PollExecutionTask.run(Poller.java:273)
	at io.temporal.internal.worker.Poller$PollLoopTask.run(Poller.java:242)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

作为先决条件,我已经执行了 docker-compose up,并且我正在运行三个服务:temporalio/webtemporalio/auto-setupcassandra

英文:

I'm getting the following error when I run the temporal HelloActivity Java sample:

06:43:55.969 [main] INFO  io.temporal.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.1S, pollBackoffMaximumInterval=PT1M, pollThreadCount=5, pollThreadNamePrefix='Host Local Workflow Poller'}, identity=23af0cb3-09aa-4cbc-bca2-118cfa79dc96}
06:43:57.291 [Activity Poller taskQueue="HelloActivity", namespace="default": 4] ERROR io.temporal.internal.worker.Poller - Failure in thread Activity Poller taskQueue="HelloActivity", namespace="default": 4
io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service temporal.api.workflowservice.v1.WorkflowService
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
	at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.pollActivityTaskQueue(WorkflowServiceGrpc.java:2682)
	at io.temporal.internal.worker.ActivityPollTask.poll(ActivityPollTask.java:95)
	at io.temporal.internal.worker.ActivityPollTask.poll(ActivityPollTask.java:38)
	at io.temporal.internal.worker.Poller$PollExecutionTask.run(Poller.java:273)
	at io.temporal.internal.worker.Poller$PollLoopTask.run(Poller.java:242)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

As pre-requisite, docker-compose up was executed and I have all 3 services temporalio/web, temporalio/auto-setup, and cassandra running.

答案1

得分: 0

确保你正在运行与示例所需的Java SDK相同版本的服务。

看起来示例的README没有更新到最新版本。截止到现在(2020年7月21日),v0.27.0是最新版本。因此,先关闭当前正在运行的服务:

docker-compose down

然后安装最新版本:

curl -L https://github.com/temporalio/temporal/releases/download/v0.27.0/docker.tar.gz | tar -xz --strip-components 1 docker/docker-compose.yml
docker-compose up
英文:

Make sure that you are running the same version of the service as the Java SDK used by the samples requires.

It looks like the Samples README wasn't updated with the latest version. As of now (7/21/20) the v0.27.0 is the latest version. So tear down the currently running version of the service:

docker-compose down

then install the latest one:

 curl -L https://github.com/temporalio/temporal/releases/download/v0.27.0/docker.tar.gz | tar -xz --strip-components 1 docker/docker-compose.yml
 docker-compose up

huangapple
  • 本文由 发表于 2020年7月21日 21:53:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/63016083.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定