puppetserver.service 的作业失败,因为控制进程已退出并显示错误代码
Job for puppetserver.service failed because the control process exited with error code
人偶:5.3.3
OS: Ubuntu Xenial(虚拟盒子)
内置内存:4GB
我是 Puppet 的新手。安装 Puppet v5.3.3 后,我想启动服务器:
systemctl start puppetserver (or service puppetserver start)
这给了我以下错误:
Job for puppetserver.service failed because the control process exited with error code. See "systemctl status puppetserver.service" and "journalctl -xe" for details.
systemctl status puppetserver.service
puppetserver.service - puppetserver Service
Loaded: loaded (/lib/systemd/system/puppetserver.service; disabled; vendor preset: enabled)
Active: activating (start) since Wed 2018-01-24 13:08:28 UTC; 39s ago
Control: 19426 (bash)
Tasks: 17
Memory: 445.7M
CPU: 1min 12.296s
CGroup: /system.slice/puppetserver.service
├─19426 bash /opt/puppetlabs/server/apps/puppetserver/cli/apps/start
├─19434 /usr/bin/java -Xms400m -Xmx400m -Djava.security.egd=/dev/urandom -XX:OnOutOfMemoryError=kill -9 %p -cp /opt/puppetlabs/serve
└─19569 sleep 1
Jan 24 13:08:28 master systemd[1]: Starting puppetserver Service...
我关注了一些解释的博客 (blog1, blog2)
- 首先确定空闲内存:free -m
(查看内存行,空闲选项卡)
- 更改文件的内存分配 puppetserver
vi /etc/default/puppetserver
###########################################
# Init settings for puppetserver
###########################################
# Location of your Java binary (version 7 or higher)
JAVA_BIN="/usr/bin/java"
# Modify this if you'd like to change the memory allocation, enable JMX, etc
JAVA_ARGS="-Xms400m -Xmx400m - Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
# These normally shouldn't need to be edited if using OS packages
USER="puppet"
GROUP="puppet"
INSTALL_DIR="/opt/puppetlabs/server/apps/puppetserver"
CONFIG="/etc/puppetlabs/puppetserver/conf.d"
# Bootstrap path
BOOTSTRAP_CONFIG="/etc/puppetlabs/puppetserver/services.d/,/opt/puppetlabs/server/apps/puppetserver/config/services.d/"
即使在减少内存之后,我还是无法启动 puppetserver。请帮忙,我哪里错了。
将内存更改为 250m (JAVA_ARGS="-Xms250m -Xmx250m)。成功了。
可能是其 50% 的可用内存 (free -m)
空闲内存最初是 440。我最初在 JAVA_ARGS 中保留了 400。
我遇到了同样的错误。我所做的是,删除了 /etc/puppetlabs/puppet/ssl/
中的 SSL 目录
尝试重新启动 puppetserver 时,抛出此错误:
Job for puppetserver.service failed because the control process exited
with error code. See "systemctl status puppetserver.service" and
"journalctl -xe" for details.
使用此命令重新生成 SSL:
puppetserver ca setup --config <PATH TO CONFIG FILE>
在我的例子中,配置文件的路径是:/etc/puppetlabs/puppet/puppet.conf
确保数据规格大小为 M
,如果您在 mb
中指定它:
JAVA_ARGS="-Xms500M -Xmx500M -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
人偶:5.3.3
OS: Ubuntu Xenial(虚拟盒子)
内置内存:4GB
我是 Puppet 的新手。安装 Puppet v5.3.3 后,我想启动服务器:
systemctl start puppetserver (or service puppetserver start)
这给了我以下错误:
Job for puppetserver.service failed because the control process exited with error code. See "systemctl status puppetserver.service" and "journalctl -xe" for details.
systemctl status puppetserver.service
puppetserver.service - puppetserver Service
Loaded: loaded (/lib/systemd/system/puppetserver.service; disabled; vendor preset: enabled)
Active: activating (start) since Wed 2018-01-24 13:08:28 UTC; 39s ago
Control: 19426 (bash)
Tasks: 17
Memory: 445.7M
CPU: 1min 12.296s
CGroup: /system.slice/puppetserver.service
├─19426 bash /opt/puppetlabs/server/apps/puppetserver/cli/apps/start
├─19434 /usr/bin/java -Xms400m -Xmx400m -Djava.security.egd=/dev/urandom -XX:OnOutOfMemoryError=kill -9 %p -cp /opt/puppetlabs/serve
└─19569 sleep 1
Jan 24 13:08:28 master systemd[1]: Starting puppetserver Service...
我关注了一些解释的博客 (blog1, blog2)
- 首先确定空闲内存:free -m
(查看内存行,空闲选项卡)
- 更改文件的内存分配 puppetserver
vi /etc/default/puppetserver
###########################################
# Init settings for puppetserver
###########################################
# Location of your Java binary (version 7 or higher)
JAVA_BIN="/usr/bin/java"
# Modify this if you'd like to change the memory allocation, enable JMX, etc
JAVA_ARGS="-Xms400m -Xmx400m - Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
# These normally shouldn't need to be edited if using OS packages
USER="puppet"
GROUP="puppet"
INSTALL_DIR="/opt/puppetlabs/server/apps/puppetserver"
CONFIG="/etc/puppetlabs/puppetserver/conf.d"
# Bootstrap path
BOOTSTRAP_CONFIG="/etc/puppetlabs/puppetserver/services.d/,/opt/puppetlabs/server/apps/puppetserver/config/services.d/"
即使在减少内存之后,我还是无法启动 puppetserver。请帮忙,我哪里错了。
将内存更改为 250m (JAVA_ARGS="-Xms250m -Xmx250m)。成功了。
可能是其 50% 的可用内存 (free -m)
空闲内存最初是 440。我最初在 JAVA_ARGS 中保留了 400。
我遇到了同样的错误。我所做的是,删除了 /etc/puppetlabs/puppet/ssl/
中的 SSL 目录尝试重新启动 puppetserver 时,抛出此错误:
Job for puppetserver.service failed because the control process exited with error code. See "systemctl status puppetserver.service" and "journalctl -xe" for details.
使用此命令重新生成 SSL:
puppetserver ca setup --config <PATH TO CONFIG FILE>
在我的例子中,配置文件的路径是:/etc/puppetlabs/puppet/puppet.conf
确保数据规格大小为 M
,如果您在 mb
中指定它:
JAVA_ARGS="-Xms500M -Xmx500M -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"