# Author:fairylly
11、puppet-dashboard启动脚本start后进程不存在
问题描述:
/etc/init.d/puppet-dashboard
启动脚本start启动后,puppet-dashboard进程不存在,使用脚本中命令执行:
/usr/bin/ruby /opt/puppet-dashboard/script/server
提示:
Database isn't the current migration version: expected 20120112195235, got 0
You must either run 'rake db:migrate' or set environmental variable NO_MIGRATION_CHECK
解决方法:
修改/etc/init.d/puppet-dashboard
/usr/bin/ruby /opt/puppet-dashboard/script/server >/dev/null 2>&1 &
修改为:
/usr/bin/ruby /opt/puppet-dashboard/script/server -e production>/dev/null 2>&1 &
12、puppet-dashboard提示没有权限访问报告
问题描述:
Background Tasks显示1 new failed task
点击链接,显示:
Importing report report-21631-3.yaml at 2013-11-05 10:22 CST
Permission denied - /opt/puppet-dashboard/spool/report-21631-3.yaml
解决方法:
修改/etc/init.d/puppet-dashboard
#/usr/bin/ruby /opt/puppet-dashboard/script/server -e production >/dev/null 2>&1 &
修改为:
sudo -u puppet-dashboard /opt/puppet-dashboard/script/server -e production >/dev/null 2>&1 &
13、puppet kick主动通知客户端提示连接失败
问题描述:
# puppet kick -p 10 --host puppetmaster.com
Warning: Puppet kick is deprecated. See http://links.puppetlabs.com/puppet-kick-deprecation
Warning: Failed to load ruby LDAP library. LDAP functionality will not be available
Triggering puppetmaster.com
Error: Host puppetmaster.com failed: Connection refused - connect(2)
puppetmaster.com finished with exit code 2
Failed: puppetmaster.com
解决方法:
在客户端/etc/puppet/puppet.conf
[agent]中配置listen=true
或者启动puppet时使用--listen选项启动
例:puppet agent --no-client --listen
14、puppet kick主动通知客户端提示错误号3
问题描述:
puppet kick执行一次后,再次执行,会提示错误号3。
# puppet kick -p 10 --host puppetclient1.com
Warning: Puppet kick is deprecated. See http://links.puppetlabs.com/puppet-kick-deprecation
Warning: Failed to load ruby LDAP library. LDAP functionality will not be available
Triggering puppetclient1.com
Getting status
status is running
Host puppetclient1.com is already running
puppetclient1.com finished with exit code 3
Failed: puppetclient1.com
这时客户端执行# puppet agent -t
Notice: Ignoring --listen on onetime run
Notice: Run of Puppet configuration client already in progress; skipping (/var/lib/puppet/state/agent_catalog_run.lock exists)
解决方法:
/var/lib/puppet/state/agent_catalog_run.lock存放的是puppet agent进程的pid
使用puppet agent --no-client方式进行启动,会生成该lock文件;
方法一:
rm -rf /var/lib/puppet/state/agent_catalog_run.lock
但此方法不方便,特别是在只使用puppet kick进行主动通知的部署方案中;
方法二:
更新ruby为2.0.0版本,facter/puppet也需要再重装次;
使用ruby2.0.0,多次执行puppet kick都是正常,不会生成该.lock文件;
具体原因不太清楚了,但实验结果是这样的。