|
| 1 | +rules: |
| 2 | + - cre: |
| 3 | + id: CRE-2025-0074 |
| 4 | + severity: 0 |
| 5 | + title: Temporal Worker → Server Downtime → Connection Refused Failure |
| 6 | + category: workflow-orchestration-connectivity |
| 7 | + author: Prequel |
| 8 | + description: | |
| 9 | + Detects failure when a Temporal worker is unable to reach the Temporal server. |
| 10 | + - This typically occurs during startup or after server downtime. |
| 11 | + - Worker log contains gRPC error: "connection refused". |
| 12 | + |
| 13 | + cause: | |
| 14 | + ROOT CAUSES: |
| 15 | + - Temporal server was stopped or not reachable on port 7233. |
| 16 | + - Worker container started before the server was healthy. |
| 17 | + - Network misconfiguration or resource contention during startup. |
| 18 | + |
| 19 | + impact: | |
| 20 | + BUSINESS IMPACT: |
| 21 | + - Temporal workflows do not start or progress. |
| 22 | + - Tasks queue up without being picked up by a worker. |
| 23 | + - Can go unnoticed without active monitoring. |
| 24 | + |
| 25 | + impactScore: 10 |
| 26 | + tags: |
| 27 | + - temporal |
| 28 | + - worker |
| 29 | + - grpc |
| 30 | + - connection-refused |
| 31 | + - startup-failure |
| 32 | + |
| 33 | + mitigation: | |
| 34 | + IMMEDIATE: |
| 35 | + - Confirm server is running: `docker ps`, `docker logs temporal` |
| 36 | + - Ensure worker starts only after server is available. |
| 37 | + - Restart worker manually or with retry logic. |
| 38 | + RECOVERY ACTIONS: |
| 39 | + - Add health checks for the server container. |
| 40 | + - Use startup dependencies in Docker Compose. |
| 41 | + - Improve alerting for “connection refused” messages. |
| 42 | + PREVENTION STRATEGIES: |
| 43 | + - Monitor port 7233 availability. |
| 44 | + - Delay worker startup until Temporal is healthy. |
| 45 | + - Add retry logic in the worker code. |
| 46 | + mitigationScore: 6 |
| 47 | + references: |
| 48 | + - https://docs.temporal.io/ |
| 49 | + - https://docs.temporal.io/production-deployment/production-deployment-overview |
| 50 | + - https://grpc.io/docs/guides/ |
| 51 | + - https://github.com/temporalio/samples-go |
| 52 | + |
| 53 | + applications: |
| 54 | + - name: "temporal" |
| 55 | + version: ">=1.27.0" |
| 56 | + metadata: |
| 57 | + kind: prequel |
| 58 | + id: 7AUUSrCz9ssNvDvPwBVfAK |
| 59 | + |
| 60 | + rule: |
| 61 | + sequence: |
| 62 | + window: 120s |
| 63 | + event: |
| 64 | + source: cre.log.temporal.worker |
| 65 | + order: |
| 66 | + - regex: "Failed to connect to Temporal: failed reaching server" |
| 67 | + - regex: "connection refused" |
0 commit comments