歡迎您光臨本站 註冊首頁

手動執行puppet腳本出錯

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

手動執行puppet腳本出錯

puppetd /tmp/1.pp

/tmp/1.pp 內容如下:

file { "/tmp/test1111":
    content => "hello\nabcde"
    mode => 0644;
}

出現下面的錯誤:
Could not prepare for execution: Could not create PID file: /var/run/puppet/agent.pid

請問是什麼問題?
《解決方案》

貌似跟puppet腳本無關,檢查下用戶許可權
《解決方案》

你查看puppet的進程
ps -ef |grep puppet
# ps -ef|grep puppet
root     18529     1  2 19:20 ?        00:00:00 /usr/bin/ruby /usr/sbin/puppetd /tmp/1.pp
root     18660 17117  0 19:21 pts/0    00:00:00 grep puppet
你說的這種現象應該會有這麼一條進程,kill掉就不會報錯了。。。。
但是再執行puppetd /tmp/1.pp
還是會產生這樣的錯誤!!!
原因暫未確定,一同研究……
《解決方案》

/var/run/puppet/ 這個目錄你有許可權嗎?

[火星人 ] 手動執行puppet腳本出錯已經有409次圍觀

http://coctec.com/docs/service/show-post-505.html