puppet配置出现的问题一
时间:2013-09-10 08:09:04 作者:admin 标签: puppet 分类: linux应用
在做puppet实现过程当中遇到如下问题,具体如下:
[root@Hadoop2 puppet]# puppetd --server Hadoop1.cyou-inc.com --test err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at 'Hadoop2' at /etc/puppet/manifests/site.pp:1 on node hadoop2.cyou-inc.com warning: Not using cache on failed catalogerr: Could not retrieve catalog; skipping run err: Could not retrieve catalog; skipping run
上面的问题主要是master配置文件语法错误,错误显示在第1行,而master中site.pp中的每一行是:node Hadoop2.cyou-inc.com
错误的原因是:主机名必须用单引号引起来才行。具体的解决方法为,将site.pp中改为如下:
node 'Hadoop2.cyou-inc.com' #引号是必须的哦!!!!! { file { "/tmp/test.html": content=>"puppet test."; }} }
puppet的配置方法见《puppet试验之puppet配置方法》