Are you sure that the agent computer is not upgrading Java upgrade after the Jenkins agent has started? If the agent computer has an older Java installed initially and is configured in the operating system to upgrade Java, then once that upgrade is complete, the “spawn helper” message is likely to appear.
The most general solution is to assure that the Java version on the agent is already the most recent release before the agent starts.
Another solution is to restart the agent after the Java upgrade is complete. The previous comments said:
The Label Verifier plugin can be used to check that a Jenkins agent has the expected version of Java installed when the agent is first connected. You might use that as a safety check that a Java upgrade is not needed on the agent when it starts.
thank you ~ , your advice worked !!! My problem is git command can’t execute, log likes Cannot run program “git” …… then i add ‘-Djdk.lang.Process.launchMechanism=vfork’ this in jenkins.service file . and then i restart the jenkins program. it is useful .finally i sercher why it worked: vfork is a mode that can reduce memory usage when jenkins try to execute git command.