Ask Your Question
0

Puppet 2016.5.2 installation failed on centos7 - [pe-console-services]: Cannot allocate memory - fork(2)

asked 2017-02-17 22:22:17 -0500

kattula gravatar image

updated 2017-02-20 14:33:45 -0500

Hi everyone,

I'm new to puppet environment, and I'm preparing to get puppet certified with online documentation and available support. Coming to the point, I created a virtual machine on Microsoft Azure with 2 Cores and 3.5GB RAM (I understand puppet recommends to use a minimum of 4GB RAM) and I tried to do a guided installation of Puppet Enterprise 2016.5.2 on a CentOS7.2 machine, but the installation failed with errors/dependency issues.

All the errors I observed are related to memory:

[root@master puppet-enterprise-2016.5.2-el-7-x86_64]# cat /var/log/puppetlabs/installer/2017-02-17T23.41.40+0000.install.log | grep Error
2017-02-17 23:58:35,886 - [Error]: Cannot allocate memory - fork(2)
2017-02-17 23:58:35,894 - [Error]: /Stage[main]/Puppet_enterprise::Console_services/Service[pe-console-services]/ensure: change from stopped to running failed: Cannot allocate memory - fork(2)
2017-02-17 23:58:37,022 - [Error]: /Stage[main]/Puppet_enterprise::Console_services/Service[pe-console-services]: Failed to call refresh: Cannot allocate memory - fork(2)
2017-02-17 23:58:37,023 - [Error]: /Stage[main]/Puppet_enterprise::Console_services/Service[pe-console-services]: Cannot allocate memory - fork(2)

Details of dependency warnings:

        [root@master puppet-enterprise-2016.5.2-el-7-x86_64]# cat /var/log/puppetlabs/installer/2017-02-17T23.41.40+0000.install.log | grep failed
        2017-02-17 23:43:34,949 - [Debug]: Performing a hiera indirector lookup of puppet_enterprise::profile::console::rbac_failed_attempts_lockout with options {:variables=>Scope(Class[Puppet_enterprise::Profile::Console]), :merge=>#<Puppet::Pops::FirstFoundStrategy:0x00000006db7f80 @options_t=#<Puppet::Pops::Types::PStructType:0x00000006d8f850 @elements=[#<Puppet::Pops::Types::PStructElement:0x00000006d8f8a0 @key_type=#<Puppet::Pops::Types::POptionalType:0x00000006d8f8f0 @type=#<Puppet::Pops::Types::PStringType:0x00000006d8f968 @size_type=nil, @values=["strategy"]>>, @value_type=#<Puppet::Pops::Types::POptionalType:0x00000006d8fb48 @type=#<Puppet::Pops::Types::PPatternType:0x00000006d8fc10 @patterns=[#<Puppet::Pops::Types::PRegexpType:0x00000006d8fe18 @pattern="first", @regexp=/first/>]>>>]>, @options={}>}
        2017-02-17 23:43:34,949 - [Debug]: hiera(): Looking up puppet_enterprise::profile::console::rbac_failed_attempts_lockout in HOCON backend
        2017-02-17 23:43:34,949 - [Debug]: hiera(): Looking up puppet_enterprise::profile::console::rbac_failed_attempts_lockout in YAML backend
        2017-02-17 23:43:44,089 - [Debug]: Pe_hocon_setting[console-services.rbac.failed-attempts-lockout]: Adding default for notify
        2017-02-17 23:43:52,826 - [Debug]: /Stage[main]/Puppet_enterprise::Profile::Console/Puppet_enterprise::Trapperkeeper::Rbac[console-services]/Pe_hocon_setting[console-services.rbac.failed-attempts-lockout]/notify: subscribes to Service[pe-console-services]
        2017-02-17 23:53:36,382 - [Debug]: /Stage[main]/Puppet_enterprise::Profile::Console/Puppet_enterprise::Trapperkeeper::Rbac[console-services]/Pe_hocon_setting[console-services.rbac.failed-attempts-lockout]: Nothing to manage: no ensure and the resource doesn't exist
        2017-02-17 23:58:35,894 - [Error]: /Stage[main]/Puppet_enterprise::Console_services/Service[pe-console-services]/ensure: change from stopped to running failed: Cannot allocate memory - fork(2)
        2017-02-17 23:59:06,957 - [Warning]: /Stage[main]/Pe_install::Install::Classification/Pe_node_group[PE Infrastructure]: Skipping because of failed dependencies
        2017-02-17 23:59:06,965 - [Warning]: /Stage[main]/Pe_install::Install::Classification/Pe_node_group[PE Certificate Authority]: Skipping because of failed dependencies
        2017-02-17 23:59:06,966 - [Warning]: /Stage[main]/Pe_install::Install::Classification/Pe_node_group[PE Master]: Skipping because of failed dependencies
        2017-02-17 23:59:06,966 - [Warning]: /Stage[main]/Pe_install::Install::Classification/Pe_node_group[PE ActiveMQ Broker]: Skipping because of failed dependencies
        2017-02-17 23:59:06,984 - [Warning]: /Stage[main]/Pe_install::Install::Classification/Pe_node_group[PE Orchestrator]: Skipping because of ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-21 01:59:45 -0500

stivesso gravatar image

updated 2017-02-21 03:18:57 -0500

Hi Krishna,
In my opinion, you should do your best to have that minimum recommended Memory (at least 04GB). The errors seem to clearly highlight that facts.You can check/adjust the xms and xmx Java settings for each Puppet Service in /etc/sysconfig/pe-*
(Xmx specifies the maximum memory allocation pool for a Java Virtual Machine , while Xms specifies the initial memory allocation pool. If there's no enough Memory avaiable for that initial memory allocation pool, then you won't be able to start some services -see an example below- )
Check also the free memory on your system (you can use free -m for that)...

[root@pe-master ~]# egrep -i "xmx|xms" /etc/sysconfig/pe-* 
/etc/sysconfig/pe-activemq:ACTIVEMQ_OPTS_MEMORY="-Xms512m -Xmx512m -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
/etc/sysconfig/pe-console-services:JAVA_ARGS="-Xmx256m -Xms256m"
/etc/sysconfig/pe-orchestration-services:JAVA_ARGS="-Xmx192m -Xms192m"
/etc/sysconfig/pe-puppetdb:JAVA_ARGS="-Xmx2048m -Xms2048m"
/etc/sysconfig/pe-puppetserver:JAVA_ARGS="-Xms2048m -Xmx2048m"
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-17 19:32:06 -0500

Seen: 83 times

Last updated: Feb 21