Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

cpanm not retrieving remote files

by cLive ;-) (Prior)
on Feb 26, 2015 at 21:43 UTC ( #1117995=perlquestion: print w/replies, xml ) Need Help??

cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:

Confused about this. From the cpanm build log:

Searching Net::SSH on cpanmetadb ... --> Working on Net::SSH Fetching -> FAIL Download +.tar.gz failed. Retrying ... -> FAIL Download +.tar.gz failed. Retrying ... -> FAIL Download +.tar.gz failed. Retrying ... -> FAIL Failed to download +t-SSH-0.09.tar.gz -> FAIL Failed to fetch distribution Net-SSH-0.09

But, if I run this in the shell:


the module downloads as expected, and I can install manually.

That's great and all, but then I have to install each dependency manually.

I've deleted the .cpanm and .cpan directories in /root, but I still keep hitting this issue with every module I install. I've tried specifting wget or curl as CL args on cpanm, but they don't seem to be making a difference.

It worked fine when I first installed it, but then just stopped a few weeks ago.

I'm not sure how to debug this one. Any ideas?

Replies are listed 'Best First'.
Re: cpanm not retrieving remote files
by Old_Gray_Bear (Bishop) on Feb 26, 2015 at 22:13 UTC
    Sounds like a firewall-rule or a proxy has changed. Can you put a traffic tracer on your session and see what is being sent/received when you get the failures?

    Another avenue would be to check the network logs and see what light they can shed.

    I Go Back to Sleep, Now.


Re: cpanm not retrieving remote files
by Anonymous Monk on Feb 27, 2015 at 00:42 UTC

    Well, increase the verbosity/debugging level on cpanm, and check the logs, post the logs

    Then do the same for wget...

    Then compare to see if you can see or we can see something different between the two

    Maybe wget has got proxy settings in an .wgetrc that are not in %ENV so cpanm/lwp doesn't see ... or something

      ran cpanm with -v and got the same log output.

      wget and curl are both working in the shell, so I don't know what's to be gained by running them under debug.

      I've also tried it with the --curl / --wget / --lwp flags and it always fails.

      I just went through the docs, and noticed that I can add --no-curl, --no-wget or --no-lwp options. The first two still fail, but --no-lwp works! Talk about non-intuitive :D

      So, I had a thought, and updated LWP:

      cpanm -v --no-lwp LWP

      Updated LWP, but still doesn't resolve the issue. At least it works now, but I don't know why. Just as long as I include the --no-lwp flag. Bizarre.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1117995]
Approved by Old_Gray_Bear
Front-paged by Old_Gray_Bear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2023-03-26 02:01 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.