傀儡:5.3.3
操作系统:Ubuntu Xenial(虚拟盒)
内置RAM:4GB
我是Puppet的新手。安装Puppet v5.3.3之后,我想启动服务器:
systemctl start puppetserver(或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 。请帮助,我出错了。
答案 0 :(得分:1)
将内存更改为250米(JAVA_ARGS =“ - Xms250m -Xmx250m)。工作正常。
可能是其50%的可用内存(free -m)
最初的免费记忆是440。我最初在JAVA_ARGS中保留了400个。
答案 1 :(得分:1)
我遇到了同样的错误。我所做的是,删除了/ etc / puppetlabs / puppet / ssl /
中的SSL目录尝试重新启动puppetserver时,引发了此错误:
puppetserver.service的作业失败,因为控制进程已退出 错误代码。请参阅“ systemctl状态puppetserver.service”和 有关详细信息,请使用“ journalctl -xe”。
使用此命令重新生成SSL:
puppetserver ca setup --config <PATH TO CONFIG FILE>
在我的情况下,配置文件的路径为:/etc/puppetlabs/puppet/puppet.conf