[英]Job for puppetserver.service failed because the control process exited with error code
Puppet: 5.3.3木偶:5.3.3
OS: Ubuntu Xenial (virtual box) Inbuilt RAM: 4GB操作系统:Ubuntu Xenial(虚拟盒子)内置内存:4GB
I am new to Puppet.我是木偶新手。 After installing Puppet v5.3.3, I wanted to start the server:
安装 Puppet v5.3.3 后,我想启动服务器:
systemctl start puppetserver (or service puppetserver start)
systemctl 启动 puppetserver(或服务 puppetserver 启动)
This gave me following error:这给了我以下错误:
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
systemctl状态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...
I followed a few blogs ( blog1 , blog2 )that explained我关注了一些解释的博客( blog1 , blog2 )
- first identify the free memory: free -m
(look mem row, free tab) - 首先识别空闲的 memory:
free -m
(查看 mem 行,free 选项卡)
- change memory allocation of file puppetserver
- 更改 memory 文件
puppetserver
的分配
vi /etc/default/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/"
Even after reducing memory, I was not able to start puppetserver .即使在减少 memory 之后,我也无法启动 puppetserver 。 Please help, where i am going wrong.
请帮忙,我哪里出错了。
Changed memory to 250m (JAVA_ARGS="-Xms250m -Xmx250m). It worked.将内存更改为 250m (JAVA_ARGS="-Xms250m -Xmx250m)。它起作用了。
May be its 50% of free memory (free -m)可能是它 50% 的空闲内存 (free -m)
free memory was 440 initially.可用内存最初是 440。 i kept 400 in JAVA_ARGS initially.
我最初在 JAVA_ARGS 中保留了 400。
I faced the same error.我遇到了同样的错误。 What I did was, deleted the SSL directory in /etc/puppetlabs/puppet/ssl/
我所做的是,删除 /etc/puppetlabs/puppet/ssl/ 中的 SSL 目录
When trying to restart the puppetserver, this error was thrown:尝试重新启动 puppetserver 时,抛出了此错误:
Job for puppetserver.service failed because the control process exited with error code.
puppetserver.service 的作业失败,因为控制进程退出并显示错误代码。 See "systemctl status puppetserver.service" and "journalctl -xe" for details.
有关详细信息,请参阅“systemctl status puppetserver.service”和“journalctl -xe”。
Use this command to regenerate SSL:使用此命令重新生成 SSL:
puppetserver ca setup --config <PATH TO CONFIG FILE>
In my case PATH TO CONFIG FILE WAS: /etc/puppetlabs/puppet/puppet.conf在我的情况下,配置文件的路径是:/etc/puppetlabs/puppet/puppet.conf
Make sure the data specification size is M
, if you specified it in mb
:如果您在
mb
中指定数据规范大小,请确保它是M
:
JAVA_ARGS="-Xms500M -Xmx500M -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.