Based on the collective troubleshooting, here’s the comprehensive solution for cb-22 webhook timeout issues:
1. Optimize Webhook Endpoint Response Time
Your Jenkins endpoint must return HTTP 200 within 30 seconds (or your configured timeout). Implement asynchronous processing:
// Pseudocode - Webhook endpoint pattern:
1. Receive POST from codebeamer with approval data
2. Validate JWT token signature and expiration
3. Immediately return HTTP 200 to codebeamer
4. Queue approval event to background processor
5. Background job updates Jenkins pipeline status
// See codebeamer Webhook Integration Guide Section 3.4
2. Configure Extended Timeouts and Retries
In codebeamer’s site.properties, increase timeout tolerance:
webhook.timeout.seconds=60
webhook.retry.attempts=3
webhook.retry.delay.seconds=10
3. JWT Token Management
Ensure JWT tokens remain valid throughout the approval workflow lifecycle. Generate tokens with expiration set to your maximum approval SLA plus 15-minute buffer. In cb-22, token validation happens at webhook execution time, not workflow start time.
4. Network and Security Configuration
- Use IP addresses instead of hostnames to avoid DNS delays
- Whitelist your Jenkins server IP in codebeamer’s webhook security settings
- For HTTPS endpoints, ensure proper certificate chain validation or configure codebeamer to trust your certificates
- Check firewall rules allowing outbound connections from codebeamer server to Jenkins on required ports
5. Enable Diagnostic Logging
Add detailed webhook logging to identify exact failure points:
log4j.logger.com.intland.codebeamer.webhook=DEBUG
log4j.logger.com.intland.codebeamer.rest.auth=DEBUG
Review logs in /tomcat/logs/codebeamer.log for authentication failures, timeout details, and retry attempts.
6. Implement Webhook Relay Pattern (Advanced)
For complex environments, deploy an intermediate webhook relay service that:
- Receives codebeamer webhooks with immediate acknowledgment
- Handles token validation and payload transformation
- Implements robust retry logic for downstream Jenkins communication
- Provides centralized monitoring and error handling
7. Payload Size Optimization
If approval workflows include large custom fields or attachments, optimize webhook payloads by:
- Sending only essential approval metadata in webhook
- Using reference IDs instead of embedding full objects
- Implementing separate API calls to fetch detailed data if needed
The combination of endpoint optimization, proper timeout configuration, and JWT token management should resolve your pipeline stall issues. Start with steps 1-3 for immediate improvement, then implement advanced patterns if needed for high-volume environments.