简体   繁体   中英

Job for puppetserver.service failed because the control process exited with error code

Puppet: 5.3.3
OS: Ubuntu Xenial (virtual box) Inbuilt RAM: 4GB

I am new to Puppet. After installing Puppet v5.3.3, I wanted to start the server:

systemctl start puppetserver (or service puppetserver start)

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

    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
- first identify the free memory: free -m (look mem row, free tab)
- change memory allocation of file 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 . Please help, where i am going wrong.

Changed memory to 250m (JAVA_ARGS="-Xms250m -Xmx250m). It worked.
May be its 50% of free memory (free -m)

free memory was 440 initially. i kept 400 in JAVA_ARGS initially.

I faced the same error. What I did was, deleted the SSL directory in /etc/puppetlabs/puppet/ssl/

When trying to restart the puppetserver, this error was thrown:

Job for puppetserver.service failed because the control process exited with error code. See "systemctl status puppetserver.service" and "journalctl -xe" for details.

Use this command to regenerate SSL:

puppetserver ca setup --config <PATH TO CONFIG FILE>

In my case PATH TO CONFIG FILE WAS: /etc/puppetlabs/puppet/puppet.conf

Make sure the data specification size is M , if you specified it in mb :

JAVA_ARGS="-Xms500M -Xmx500M -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM