Skip to content

Commit c08df02

Browse files
committed
puppetserver: Fix Cannot run program /bin/config-version.sh
1 parent b6f866d commit c08df02

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/profile/templates/puppet/server/default.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
JAVA_BIN="/usr/bin/java"
22

33
# Modify this if you'd like to change the memory allocation, enable JMX, etc
4-
JAVA_ARGS="-Xms<%= @java_memory %> -Xmx<%= @java_memory %> -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
4+
#
5+
# * We use launchMechanism=vfork as of Marc 2025, because puppetserver suddenly became
6+
# unable to execute the /bin/config-version.sh script without it.
7+
# > Puppet Exception Cannot run program "/etc/puppet/code/environments/production/bin/config-version.sh" (in directory "."): error=0, Failed to exec spawn helper, exit value: 1.
8+
# https://anton.dollmaier.name/2025/02/puppetserver-failed-to-exec-spawn-helper/
9+
#
10+
JAVA_ARGS="-Xms<%= @java_memory %> -Xmx<%= @java_memory %> -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger -Djdk.lang.Process.launchMechanism=vfork"
511

612
# Modify this as you would JAVA_ARGS but for non-service related subcommands
713
JAVA_ARGS_CLI="${JAVA_ARGS_CLI:-}"

0 commit comments

Comments
 (0)