temporalio / temporalio/temporal

temporal cli works but hit deadline-exceeded error for sample code

Open
#7,200 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

potential-bug
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Expected Behavior

offical golang sample code can run successfully.

Notes: already read https://docs.temporal.io/troubleshooting/deadline-exceeded-error. Can't make sense where to look since the cli works, was expecting the sample works too.

Actual Behavior

offical golang sample code failed with context deadline exceeded.

➜  helloworld git:(main) go run worker/main.go
2025/01/31 15:08:44 INFO  No logger configured for temporal client. Created default one.
2025/01/31 15:08:49 Unable to create client failed reaching server: context deadline exceeded
exit status 1

Steps to Reproduce the Problem

  1. Deployed to kubernetes following offical helm chart.

  2. Port forwarding to local, ensure cluster is health and temporal cli works

➜  kubectl port-forward services/temporal-frontend-headless 7233:7233               
Forwarding from 127.0.0.1:7233 -> 7233
Forwarding from [::1]:7233 -> 7233
Handling connection for 7233
Handling connection for 7233
Handling connection for 7233
Handling connection for 7233
Handling connection for 7233
Handling connection for 7233


➜  temporal operator cluster health --address 127.0.0.1:7233
SERVING

➜  temporal operator namespace create --namespace default

➜  temporal operator namespace list
  NamespaceInfo.Name                    default
  NamespaceInfo.Id                      3524a90c-ad2a-416e-aa0e-647520983665
  NamespaceInfo.Description
  NamespaceInfo.OwnerEmail
  NamespaceInfo.State                   Registered
  NamespaceInfo.Data                    map[]
  Config.WorkflowExecutionRetentionTtl  72h0m0s
  ReplicationConfig.ActiveClusterName   active
  ReplicationConfig.Clusters            [{"clusterName":"active"}]
  Config.HistoryArchivalState           Disabled
  Config.VisibilityArchivalState        Disabled
  IsGlobalNamespace                     false
  FailoverVersion                       0
  FailoverHistory                       []
  Config.HistoryArchivalUri
  Config.VisibilityArchivalUri

  NamespaceInfo.Name                    temporal-system
  NamespaceInfo.Id                      32049b68-7872-4094-8e63-d0dd59896a83
  NamespaceInfo.Description             Temporal internal system namespace
  NamespaceInfo.OwnerEmail              temporal-core@temporal.io
  NamespaceInfo.State                   Registered
  NamespaceInfo.Data                    map[]
  Config.WorkflowExecutionRetentionTtl  168h0m0s
  ReplicationConfig.ActiveClusterName   active
  ReplicationConfig.Clusters            [{"clusterName":"active"}]
  Config.HistoryArchivalState           Disabled
  Config.VisibilityArchivalState        Disabled
  IsGlobalNamespace                     false
  FailoverVersion                       0
  FailoverHistory                       []
  Config.HistoryArchivalUri
  Config.VisibilityArchivalUri
  1. Run the sample hello world code and failed.
➜  helloworld git:(main) go run worker/main.go
2025/01/31 15:08:44 INFO  No logger configured for temporal client. Created default one.
2025/01/31 15:08:49 Unable to create client failed reaching server: context deadline exceeded
exit status 1

Specifications

  ➜  ✗ temporal -v
temporal version 1.2.0 (Server 1.26.2, UI 2.34.0)

  ➜  temporal operator cluster describe
  ClusterName  PersistenceStore  VisibilityStore
  active       cassandra         elasticsearch

  - Platform: Kubernetes/EKS 

Other

  • Was in running in cooperation so involves firewall and proxy. but again since the temporal cli works, was expecting the client program be no different. Would love to know extra config for the client such timeout and proxy if that exists and deems to be issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with samples-go/helloworld/worker/main.go and reproduce the failure using the reported Kubernetes port-forward to 127.0.0.1:7233. Compare the sample client's connection path with the working Temporal CLI and consult the linked deadline-exceeded troubleshooting guide; done means identifying the configuration or environment difference and documenting the required client setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, helm, kubernetes
Domain
cli, distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.