A webhook delivery failure means Jenkins couldn’t acknowledge a notification from an external service, often because the service couldn’t reach Jenkins at all.

Here’s what’s likely broken, from most to least common:

1. Jenkins is Unreachable Due to Network Issues

  • Diagnosis: From a machine outside your network that should be able to reach Jenkins, run curl -I http://your-jenkins-host:port/. If you get a Connection refused or timeout error, Jenkins isn’t listening or is blocked by a firewall.
  • Cause: A firewall (network appliance, cloud security group, or even iptables on the Jenkins server itself) is blocking incoming connections on the Jenkins port.
  • Fix: Open the Jenkins port (default 8080) in your firewall. For iptables, this would be: sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT. This allows TCP traffic on port 8080 to reach the Jenkins server.
  • Why it works: This command explicitly permits incoming network packets destined for port 8080, which is where Jenkins typically listens for HTTP requests.

2. Jenkins is Unreachable Due to Incorrect Hostname or IP

  • Diagnosis: Check the webhook configuration in the sending service. Does the URL point to the correct IP address or fully qualified domain name (FQDN) that resolves to your Jenkins instance? Ping the hostname from a machine that should be able to reach Jenkins: ping your-jenkins-host.
  • Cause: The webhook URL in the sending service is misconfigured, pointing to an old IP, a non-existent hostname, or a hostname that doesn’t resolve correctly via DNS.
  • Fix: Update the webhook URL in the sending service to the correct FQDN or IP address of your Jenkins server. Ensure your DNS records are accurate and propagating. For example, change http://jenkins.olddomain.com/ to http://jenkins.newdomain.com/ or http://192.168.1.100:8080/.
  • Why it works: Correcting the target address ensures the sending service attempts to connect to the actual Jenkins server, not a dead end.

3. Jenkins is Down or Not Running

  • Diagnosis: Check the Jenkins process status on the server: sudo systemctl status jenkins (for systemd) or ps aux | grep jenkins (for older systems).
  • Cause: The Jenkins service has crashed, been stopped manually, or failed to start after a reboot.
  • Fix: Restart the Jenkins service: sudo systemctl start jenkins or sudo service jenkins start. If it fails to start, check Jenkins logs (/var/log/jenkins/jenkins.log or journalctl -u jenkins) for specific startup errors.
  • Why it works: This command initiates the Jenkins application, making it available to listen for incoming HTTP requests.

4. Jenkins is Overloaded or Unresponsive

  • Diagnosis: Monitor Jenkins’ CPU and memory usage on the server. Look for high load averages (uptime) or top output showing java processes consuming excessive resources. Check Jenkins’ own monitoring (if configured) or the jenkins.log for errors related to thread exhaustion or garbage collection pauses.
  • Cause: Jenkins is struggling to keep up with the volume of requests or internal processing. This could be due to too many concurrent builds, slow plugins, or insufficient JVM heap space.
  • Fix:
    • Increase JVM Heap: Edit jenkins.model.Jenkins.xml (location varies, often /etc/default/jenkins or /etc/sysconfig/jenkins) and increase -Xmx and -Xms values. For example, change JENKINS_ARGS="-Djava.awt.headless=true -Dhudson.model.UpdateCenter.updateCenterUrl=http://updates.jenkins.io/update-center.json" to JENKINS_ARGS="-Djava.awt.headless=true -Dhudson.model.UpdateCenter.updateCenterUrl=http://updates.jenkins.io/update-center.json -Xms2048m -Xmx4096m". Restart Jenkins.
    • Optimize Plugins: Identify and disable or update slow-performing plugins.
    • Scale Build Executors: Increase the number of available build executors in Jenkins global configuration (Manage Jenkins -> Configure System -> Node Properties -> Number of executors).
  • Why it works: Increasing heap provides more memory for Jenkins to operate, reducing out-of-memory errors and GC pauses. Scaling executors allows Jenkins to handle more concurrent tasks, distributing the load.

5. TLS/SSL Certificate Issues (if using HTTPS)

  • Diagnosis: If Jenkins is accessed via HTTPS, the sending service might be failing to establish a secure connection. Use openssl s_client -connect your-jenkins-host:port -servername your-jenkins-host to check the certificate validity and chain.
  • Cause: The Jenkins server’s SSL certificate has expired, is untrusted by the sending service (self-signed without proper trust establishment), or the certificate chain is incomplete.
  • Fix: Renew or replace the SSL certificate on the Jenkins server. Ensure the certificate is issued by a trusted Certificate Authority (CA) or that the CA bundle is correctly configured and trusted by the sending service. For example, if using a reverse proxy like Nginx, update its SSL configuration with a valid certificate.
  • Why it works: A valid, trusted SSL certificate allows the sending service to securely authenticate Jenkins and establish an encrypted communication channel.

6. Proxy Configuration Issues

  • Diagnosis: If Jenkins is behind a reverse proxy (like Nginx, Apache, or HAProxy), check the proxy’s access logs for errors related to the webhook path. Also, check the proxy’s configuration for any specific rules that might be blocking or misrouting requests.
  • Cause: The reverse proxy is misconfigured, not forwarding requests to the Jenkins backend correctly, or is blocking specific HTTP methods or headers that the webhook relies on.
  • Fix: Review and correct the reverse proxy configuration. Ensure proxy_pass (Nginx) or equivalent directives are correctly pointing to the Jenkins backend, and that necessary headers (X-Forwarded-For, Host, etc.) are being passed. For example, in Nginx:
    location /jenkins/ {
        proxy_pass http://localhost:8080/jenkins/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    Reload the proxy configuration.
  • Why it works: A correctly configured proxy acts as a transparent gateway, forwarding incoming webhook requests to the Jenkins application without interference.

After fixing these, you’ll likely encounter an error about the webhook payload not being processed correctly, indicating an issue with Jenkins’ own configuration for handling incoming webhook events.

Want structured learning?

Take the full Jenkins course →