【问题标题】:Getting "Cannot allocate memory" when running Puppet agent运行 Puppet 代理时出现“无法分配内存”
【发布时间】:2012-11-14 02:10:05
【问题描述】:

运行“puppet agent -t”时出现以下错误:

Cannot allocate memory - /bin/uname -s
...
Cannot allocate memory - /sbin/arp -an
...
Cannot allocate memory - /bin/uname -s
...
Could not retrieve kernelversion: private method `split' called for nil:NilClass
Could not retrieve kernelmajversion: private method `split' called for nil:NilClass
...

完整的错误在这里:http://pastebin.com/fhjqrgBn

当我手动运行命令/bin/uname -s 时,我得到的结果没有任何错误。

free 命令显示:

             total       used       free     shared    buffers     cached
Mem:        609600     160688     448912          0       5716      35432
-/+ buffers/cache:     119540     490060
Swap:            0          0          0

傀儡虫?你觉得呢?

【问题讨论】:

  • 您能详细描述一下您的设置吗?这个木偶是独立的,客户端-服务器。什么版本的人偶,哪个操作系统
  • 我遇到了几乎相同的错误。你有没有解决过这个问题?我的设置有点复杂——但是你回想一下这个问题吗?
  • 更新:第 4 次运行这个,这次我从机器上注销,我没有收到错误。仍然不确定它是关于什么的。
  • @gabe 自从我将我的 puppet master 实例从 EC2 t1.micro 升级到 m1.small 后,就没有问题了。 aws.amazon.com/en/ec2/instance-types/#instance-details

标签: linux automation puppet


【解决方案1】:

听起来您的系统内存不足。使用 free 检查你的内存使用情况,-m 以 MB 为单位显示值:

$ free -m
             total       used       free     shared    buffers     cached
Mem:           590        412        177          0         22        314
-/+ buffers/cache:         75        514
Swap:            0          0          0

在 puppet 代理运行时,您可以在不同的 shell 中使用 free 检查内存使用情况,或者使用其他实用程序,如 top 或 dstat。

尝试查看您的服务状态,确保没有运行您不需要的服务:

service --status-all

【讨论】:

    猜你喜欢
    • 2018-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-08
    • 1970-01-01
    • 2012-02-05
    • 1970-01-01
    • 2014-07-17
    相关资源
    最近更新 更多