Error: unknown service workflowservice.WorkflowService

When developping my workflow and activities, I started with a local Docker Compose setup, where I have the images pinned to this:

  • web: v0.23.2
  • auto-setup: v0.23.1

My resolved Go dependencies in go.sum are:

This all worked for an initial implementation and I transferred this to a POC setup on GKE. So far so good. This morning, I went back to my local laptop environment to add some more features to my workflow and activities, but when starting the local workers against this setup (nothing changed afaik!), I get this error:

2020-07-08T10:09:12.767+0200    WARN    internal/internal_worker.go:257 unable to verify if namespace exist       {"Namespace": "default", "TaskList": "sqe-analysis", "WorkerID": "5144@AtrisoBook2020.local@", "WorkerType": "ActivityWorker", "namespace": "default", "error": "unknown service workflowservice.WorkflowService"}
go.temporal.io/temporal/internal.verifyNamespaceExist.func1
        /Users/ringods/Projects/golang/pkg/mod/go.temporal.io/temporal@v0.23.1/internal/internal_worker.go:257
go.temporal.io/temporal/internal/common/backoff.Retry
        /Users/ringods/Projects/golang/pkg/mod/go.temporal.io/temporal@v0.23.1/internal/common/backoff/retry.go:102
go.temporal.io/temporal/internal.verifyNamespaceExist
        /Users/ringods/Projects/golang/pkg/mod/go.temporal.io/temporal@v0.23.1/internal/internal_worker.go:267
go.temporal.io/temporal/internal.(*activityWorker).Start
        /Users/ringods/Projects/golang/pkg/mod/go.temporal.io/temporal@v0.23.1/internal/internal_worker.go:467
go.temporal.io/temporal/internal.(*AggregatedWorker).Start
        /Users/ringods/Projects/golang/pkg/mod/go.temporal.io/temporal@v0.23.1/internal/internal_worker.go:984
main.main
        /Users/ringods/Projects/cumundi/sqe-processing/pkg/cmd/sqe-analysis-activities/main.go:41
runtime.main
        /usr/local/Cellar/go/1.14.4/libexec/src/runtime/proc.go:203

When searching the Slack archives, the main cause for this error highlighted there was a mismatch between the SDK and the server version. But as you can read above, I checked this carefully and I believe there is no version mismatch in my setup.

I also went to Docker Hub to verify the date of the tags I’m using to verify that an image tag hasn’t been changed by accident. The Docker image tags are about 2 months old which I believe is around the normal date of the release.

Any idea what could still be wrong?

1 Like

Eventually, I found what it was: it just couldn’t connect to the frontend service!

In the worker, I read environment variables for the frontend host & port, which have default values of localhost and 7233. On my local system, I still had the environment variable for the frontend port defined as 7234, which was what I used with port-forwarding the frontend service of the GKE setup to my local system without having a port collision with the local docker compose setup.

Once I removed the environment variable, the worker connected correctly to localhost:7233 and the error was gone.

Not sure if this has been tackled in a later Temporal release, but the inability to connect to the frontend service should give a clear message telling one that!

1 Like

This is obviously not a good user experience. We will make sure it has been properly handled.

Thanks

1 Like

Created an issue for this: https://github.com/temporalio/temporal-go-sdk/issues/183.

1 Like