puppet:freebsd – 安装软件包错误

我有这个模块:

class bash { package { "shells/bash": ensure => "installed", } } 

执行后,我在傀儡仪表板中发现了这个:

从缺席变为现在失败:无法获取端口INDEX:425无法build立连接。

我不知道为什么会这样,几个星期前没有发生,但现在每一次都有几台不同的机器。

详细模式:

 $ puppet agent --test --debug --verbose I see debug: Puppet::Type::Package::ProviderFreebsd: Executing '/usr/sbin/pkg_info -aoQ' debug: Package: shells/bash: origin => {:port_category=>"shells", :port_name=>"bash"} debug: Package: shells/bash: source => #<URI::FTP:0x801d3fca8 URL:ftp://ftp.freebsd.org/%2Fpub/FreeBSD/ports/amd64/packages-8-stable/> debug: Fetching INDEX: #<URI::FTP:0x801d31108 URL:ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/INDEX.bz2> err: /Stage[main]/Bash/Package[shells/bash]/ensure: change from absent to present failed: Could not fetch ports INDEX: 425 Can't build data connection: Operation timed out. 

我可以连接ftp.freebsd.org(telnet ftp.freebsd.org 21)

你可以连接到http://www.freebsd.org没有代理&#xFF1F;

也许你还没有configuration你的HTTP代理? 或者你是否覆盖/etc/make.conf中的$ {MASTER_SITE_INDEX}?

这看起来像“make fetchindex”的输出。 如果你到/ usr / ports并input“make fetchindex”会怎么样?

从FreeBSD机器运行puppet agent --test --debug 。 它应该给你关于正在执行哪个命令失败的准确信息,然后你可以执行自己来进一步debugging它。