You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Jenkins Pipeline DSL任务报错:何处设置Durable Task插件心跳参数?

Fixing the Durable Task Plugin Heartbeat Error in Jenkins Pipeline

Got it, let's walk through exactly where to set that JVM parameter to resolve the error you're hitting. The issue here is that your filesystem is laggy enough that the default heartbeat check interval for the Durable Task plugin is too short—setting 300 (5 minutes) gives it more breathing room. Here are the most common places to add this parameter, depending on how you run Jenkins:

1. Jenkins Master (Global JVM Settings)

This is the main place to set it if your Pipeline runs on the master, or if you want the parameter applied across all nodes by default:

  • Running Jenkins via WAR file: Add the parameter directly to your startup command:
    java -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300 -jar jenkins.war
    
  • Running as a Linux systemd service:
    1. Open the Jenkins service file (usually at /etc/systemd/system/jenkins.service or /lib/systemd/system/jenkins.service) with a text editor.
    2. Find the line starting with Environment="JAVA_OPTS=... and append the parameter to the existing options. For example:
      Environment="JAVA_OPTS=-Djava.awt.headless=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300"
      
    3. Reload the systemd daemon and restart Jenkins:
      sudo systemctl daemon-reload
      sudo systemctl restart jenkins
      
  • Running as a Windows service:
    1. Open the Services manager, find the Jenkins service, right-click and select Properties.
    2. Go to the Java tab, scroll to the bottom of the "Java Options" list, and add a new line:
      -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300
      
    3. Click Apply and restart the Jenkins service.

2. Jenkins Agent Nodes

If your Pipeline runs on dedicated agent nodes, you'll need to add the parameter to the agent's JVM startup arguments:

  • For agents launched via Java Web Start: Include the parameter in the agent's startup command (similar to the WAR file method above).
  • For agents running as system services: Modify the agent's service file JAVA_OPTS just like we did for the master, then restart the agent service.

3. Verify the Parameter is Applied

To make sure the setting took effect:

  1. Go to Manage Jenkins → System Information.
  2. Scroll down to the System Properties section.
  3. Search for org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL—you should see its value listed as 300.

That should resolve the JENKINS-48300 error by giving the plugin more time to check in with slow filesystems.

内容的提问来源于stack exchange,提问作者user9711638

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:10:18