CPAN through proxy which needs authentication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chandru1782
    New Member
    • Aug 2007
    • 4

    CPAN through proxy which needs authentication

    Dear friends,

    I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy.

    when trying to install cpan.pm , it gives the following error, can any one help,

    You have no /root/.cpan/sources/MIRRORED.BY
    I'm trying to fetch one
    CPAN: LWP::UserAgent loaded ok
    Fetching with LWP:
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY
    Fetching with LWP:
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz
    Fetching with LWP:
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
    Fetching with LWP:
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
    Fetching with Net::FTP:
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
    Fetching with Net::FTP
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz

    Trying with "/usr/bin/lynx -source" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY

    Looking up proxy.iitm.ac.i n:3128
    Making HTTP connection to proxy.iitm.ac.i n:3128
    Sending HTTP request.
    HTTP request sent; waiting for response.
    Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
    Can't Access `http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY'
    Alert!: Unable to access document.

    lynx: Can't access startfile

    Trying with "/usr/bin/lynx -source" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz

    Looking up proxy.iitm.ac.i n:3128
    Making HTTP connection to proxy.iitm.ac.i n:3128
    Sending HTTP request.
    HTTP request sent; waiting for response.
    Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
    Can't Access `http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz'
    Alert!: Unable to access document.

    lynx: Can't access startfile

    Trying with "/usr/bin/ncftpget" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY
    NcFTPGet 3.2.0
    ....
    ....
    .....
    ....

    Trying with "/usr/bin/ncftpget" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz

    Trying with "/usr/bin/wget -O -" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY
    --12:06:58-- http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY
    => `-'
    Resolving proxy.iitm.ac.i n... 10.93.0.31, 10.93.0.32
    Connecting to proxy.iitm.ac.i n|10.93.0.31|:3 128...
    connected.
    Proxy request sent, awaiting response... 407 Proxy Authentication Required
    12:06:58 ERROR 407: Proxy Authentication Required.


    Trying with "/usr/bin/wget -O -" to get
    http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz
    --12:06:58-- http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY.gz
    => `-'
    Resolving proxy.iitm.ac.i n... 10.93.0.32, 10.93.0.31
    Connecting to proxy.iitm.ac.i n|10.93.0.32|:3 128... connected.
    Proxy request sent, awaiting response... 407 Proxy Authentication Required
    12:06:58 ERROR 407: Proxy Authentication Required.


    Trying with "/usr/bin/lynx -source" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY




    Looking up proxy.iitm.ac.i n:3128ftp:
    Unable to locate remote host proxy.iitm.ac.i n:3128ftp:.
    Alert!: Unable to connect to FTP host.
    Looking up proxy.iitm.ac.i n:3128ftp:
    Unable to locate remote host proxy.iitm.ac.i n:3128ftp:.
    Alert!: Unable to connect to FTP host.

    lynx: Can't access startfile ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY

    Trying with "/usr/bin/lynx -source" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz


    Looking up proxy.iitm.ac.i n:3128ftp:
    Unable to locate remote host proxy.iitm.ac.i n:3128ftp:.
    Alert!: Unable to connect to FTP host.
    Looking up proxy.iitm.ac.i n:3128ftp:
    Unable to locate remote host proxy.iitm.ac.i n:3128ftp:.
    Alert!: Unable to connect to FTP host.

    lynx: Can't access startfile ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz

    Trying with "/usr/bin/ncftpget" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY



    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    ncftpget: cannot open ftp.perl.org: could not connect to remote host, but can try again.

    Trying with "/usr/bin/ncftpget" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    Could not connect to ftp.perl.org -- try again later: Connection timed out.
    ncftpget: cannot open ftp.perl.org: could not connect to remote host, but can try again.

    Trying with "/usr/bin/wget -O -" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
    --12:12:32-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
    => `-'
    Resolving proxy.iitm.ac.i n... 10.93.0.31, 10.93.0.32
    Connecting to proxy.iitm.ac.i n|10.93.0.31|:3 128... connected.
    Logging in as anonymous ...
    Error in server response, closing control connection.
    Retrying.
    ......
    .....
    .....
    .....
    --15:25:42-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
    (try:20) => `-'
    Connecting to proxy.iitm.ac.i n|10.93.0.31|:3 128... connected.
    Logging in as anonymous ...
    Error in server response, closing control connection.
    Giving up.

    Issuing "/usr/bin/ftp -n"
    ftp: connect to address 153.106.5.70: Connection timed out
    Trying 196.25.240.137. ..
    ftp: connect: Connection timed out
    Not connected.
    Local directory now /root/.cpan/sources
    Not connected.
    Not connected.
    Not connected.
    Not connected.
    Not connected.
    Not connected.
    Bad luck... Still failed!
    Can't access URL ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.

    Please check, if the URLs I found in your configuration file
    (http://cpan.enstimac.f r/MIRRORED.BY/,
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/) are valid. The urllist can be
    edited. E.g. with 'o conf urllist push ftp://myurl/'

    Could not fetch MIRRORED.BY
    Enter another URL or RETURN to quit: [] New set of picks:
    http://cpan.enstimac.f r/MIRRORED.BY/
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/


    commit: wrote /etc/perl/CPAN/Config.pm
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by chandru1782
    Dear friends,

    I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy.

    when trying to install cpan.pm , it gives the following error, can any one help,

    Looking up proxy.iitm.ac.i n:3128
    Making HTTP connection to proxy.iitm.ac.i n:3128
    Sending HTTP request.
    HTTP request sent; waiting for response.
    Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
    Can't Access `http://cpan.enstimac.f r/MIRRORED.BY/MIRRORED.BY'
    Alert!: Unable to access document.
    Ok, someone correct me if I am wrong please, but I believe that when you originally configured the CPAN interface (upon first run), there was an option within the multitude of questions you are asked regarding whether or not you are using a Proxy server. If that was answered "no", then it will not know how to use the proxy and you will have to re-run the CPAN setup again to setup the proxy piece.

    Here are the instructions for starting the reconfiguration :

    Start the CPAN interface with:

    perl -MCPAN -e shell

    then, once at the CPAN prompt, type:

    cpan> o conf init

    From there, it is up to you to walk through the configuration.

    Regards,

    Jeff

    Comment

    • chandru1782
      New Member
      • Aug 2007
      • 4

      #3
      Thanks a lot for your help. kindly see below my configuration of cpan.


      CPAN::Config options from /etc/perl/CPAN/Config.pm:
      commit Commit changes to disk
      defaults Reload defaults from disk
      init Interactive setting of all options

      build_cache 10
      build_dir /root/.cpan/build
      cache_metadata 1
      cpan_home /root/.cpan
      cpan_version_ch eck 1
      dontload_hash
      ftp /usr/bin/ftp
      ftp_proxy ftp://proxy.iitm.ac.i n:3128
      getcwd cwd
      gpg /usr/bin/gpg
      gzip /bin/gzip
      histfile /root/.cpan/histfile
      histsize 100
      http_proxy http://proxy.iitm.ac.i n:3128
      inactivity_time out 0
      index_expire 1
      inhibit_startup _message 0
      keep_source_whe re /root/.cpan/sources
      lynx /usr/bin/lynx
      make /usr/bin/make
      make_arg -j3
      make_install_ar g UNINST=1
      makepl_arg PREFIX=~/perl
      ncftpget /usr/bin/ncftpget
      no_proxy localhost
      pager /usr/bin/less
      prerequisites_p olicy ask
      proxy_pass antivirus
      proxy_user antivirus
      scan_cache atstart
      shell /bin/bash
      tar /bin/tar
      term_is_latin 1
      unzip /usr/bin/unzip
      urllist
      http://cpan.enstimac.f r/MIRRORED.BY/
      ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/
      wget /usr/bin/wget

      Comment

      • numberwhun
        Recognized Expert Moderator Specialist
        • May 2007
        • 3467

        #4
        Wow, not sure. If that username and passwd work for you normally, and the address of the proxy server(s) is correct, then that should work, IMHO.

        Regards,

        Jeff

        Comment

        • chandru1782
          New Member
          • Aug 2007
          • 4

          #5
          dear friends, is there any way to get perl modules installed without using cpan.

          please suggest,

          thanks

          chandru

          Comment

          • numberwhun
            Recognized Expert Moderator Specialist
            • May 2007
            • 3467

            #6
            You certainly can! All you need to do is read the perlmodinstall page to figure out how.

            Regards,

            Jeff

            Comment

            • miller
              Recognized Expert Top Contributor
              • Oct 2006
              • 1086

              #7
              perldoc perlmodinstall

              But I would encourage you strongly to use CPAN.
              cpanfaq How do I install Perl Modules?

              Good luck,
              - Miller

              Comment

              • chandru1782
                New Member
                • Aug 2007
                • 4

                #8
                thanks a lot frnds. i resolved my problem by using ntlmaps for proxy authentication.

                now i am facing a problem using CVS to fetch marc-record

                the error i am encountering is the following

                ":2401 connection timed out"

                give me some idea on how to do CVS through a proxy.

                regards
                chandru

                Comment

                Working...