运行 HelloActivity 示例临时 Java 程序时出错
Error while running HelloActivity Sample Temporal Java program
当我 运行 时态 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 已执行,我拥有所有 3 项服务 temporalio/web、temporalio/auto-setup 和 cassandra 运行ning。
确保您 运行 与示例使用的 Java SDK 要求的服务版本相同。
样本 README 似乎没有更新到最新版本。截至目前 (7/21/20),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
当我 运行 时态 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 已执行,我拥有所有 3 项服务 temporalio/web、temporalio/auto-setup 和 cassandra 运行ning。
确保您 运行 与示例使用的 Java SDK 要求的服务版本相同。
样本 README 似乎没有更新到最新版本。截至目前 (7/21/20),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