簡體   English   中英

木偶“服務器上的錯誤400:找不到類”

[英]puppet “Error 400 on SERVER : Could not find class”

這個問題有太多的帖子和解決方案,但是我仍然無法解決。 我正在使用人偶3.7.5

以下是詳細信息

root@p1:/etc/puppet/manifests# ls -l
total 8
-rw-r--r-- 1 root root 40 Apr  9 12:37 nodes.pp
-rw-r--r-- 1 root root 18 Apr  9 11:58 site.pp
root@p1:/etc/puppet/manifests# cat nodes.pp
node 'wa.ro.XXX' {
        include mytest
}
root@p1:/etc/puppet/manifests# cat site.pp
import 'nodes.pp'

模塊路徑

root@p1:/etc/puppet/manifests# puppet master --configprint modulepath
/etc/puppet/modules:/usr/share/puppet/modules

root@p1:/etc/puppet# tree -L 2 -d modules
modules
- configfiles
  -- files
  -- manifests
- services
  -- files
  -- manifests

root@p1:/etc/puppet# cat modules/services/manifests/init.pp
class mytest {
       file { '/tmp/puppettestfgt56666' :
          mode    => 0644,
          content => "This Learning Puppet VM's IP address is ${ipaddress}",
         }        
}

在代理

root@wa:/var/cache# puppet agent --no-daemonize --onetime --verbose
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class mytest for wa.ro.XXX on node wa.ro.XXX
Notice: Using cached catalog
Info: Applying configuration version '1428561896'
Notice: Finished catalog run in 0.07 seconds

mytest類可以並且只能在模塊mytest找到。 您不能只是將其扔到模塊services並期望Puppet能夠從那里查找它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM