Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this module:

class bash {

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

}

After the execution, I found this in the puppet dashboard:

change from absent to present failed: Could not fetch ports INDEX: 425 Failed to establish connection.

I don't know why it's happening, a few weeks ago this didn't happened, but now every single time with several differents machines.

Verbose mode:

$ 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.

I can connect with ftp.freebsd.org (telnet ftp.freebsd.org 21)

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Can you connect to http://www.freebsd.org without proxy?

Maybe you have not configured your HTTP-proxy? Or did you override ${MASTER_SITE_INDEX} in /etc/make.conf?

This looks like the output from "make fetchindex". What happens if you go to /usr/ports and enter "make fetchindex"?

share|improve this answer
    
I updated my question. "make fetchindex" works without problems; also I think that a freebsd port isn't a package. –  anders Feb 28 '12 at 7:37
    
According to your output, puppet seams to fetch the INDEX via FTP not HTTP. So it looks like a firewall is interfering with active FTP. Maybe you can configure Passive mode FTP or switch to HTTP –  arved Feb 28 '12 at 9:26
1  
that was it. I changed my recipe to class bash { package { "shells/bash": ensure => "installed", provider => "freebsd", source => "http://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.2-release/", } } and worked. Thank you. –  anders Feb 28 '12 at 15:39
add comment

Run puppet agent --test --debug from the FreeBSD machine. It should give you precise information about what command it is executing that is failing, which you can then execute yourself to further debug it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.