#120 ✓resolved

Installation behind MS ISA

Reported by khannz | January 19th, 2010 @ 01:24 PM

When I'm trying to use 'sudo redcar install' it answers to me:

khannz@web-dev:~$ sudo redcar install
Downloading >10MB of jar files. This may take a while.
* Downloading JRuby
/usr/local/lib/ruby/1.9.1/open-uri.rb:346:in `open_http': 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ) (OpenURI::HTTPError)
from /usr/local/lib/ruby/1.9.1/open-uri.rb:767:in `buffer_open'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:201:in `catch'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:669:in `open'
from /usr/local/lib/ruby/1.9.1/open-uri.rb:33:in `open'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `download'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `block in grab_jruby'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `grab_jruby'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/redcar- `<top (required)>'
from /usr/local/bin/redcar:19:in `load'
from /usr/local/bin/redcar:19:in `<main>'

BTW I'm using 'http_proxy' system variable and it's working in 99% of my CLI apps.

Comments and changes to this ticket

  • khannz

    khannz January 19th, 2010 @ 01:42 PM

    • Tag changed from ms isa, http_proxy, installation to ms isa, http_proxy, installation, proxy
  • khannz

    khannz January 19th, 2010 @ 02:14 PM

    Interesting fact! SUDO REDCAR INSTALL uses $http_proxy but answers 407! My $http_proxy is "http://login:pass@proxyIP:proxyPORT"

  • Mat Schaffer

    Mat Schaffer January 20th, 2010 @ 06:33 PM

    According to http://redmine.ruby-lang.org/issues/show/435 open-uri doesn't have any intention of supporting proxy authentication. We will probably have to switch to something other than open-uri if we want to support authenticated proxies during installation.

  • Mat Schaffer

    Mat Schaffer January 20th, 2010 @ 06:43 PM

    I'm thinking we should just switch from open-uri to Net::HTTP and detect ENV['http_proxy'].

    It'd probably be more memory efficient too since I'm pretty sure Net::HTTP will let us process the file as a stream rather than load the whole thing into memory which I think is what open(url).read ends up doing.

  • Daniel Lucraft

    Daniel Lucraft January 20th, 2010 @ 07:20 PM

    That sounds good. Do you have the time to look at it?

  • Mat Schaffer

    Mat Schaffer January 23rd, 2010 @ 06:48 PM

    I'll do by best to find some time this weekend. Still gotta finish my work on phillyrb.org too :)

  • Mat Schaffer

    Mat Schaffer January 23rd, 2010 @ 09:53 PM

    The following changes since commit 8036431266822c00b883dcd4cac5b5c562bb27b3:
    Daniel Lucraft (1):

        Debumped version

    are available in the git repository at:

    git@github.com:matschaffer/redcar.git master

    Mat Schaffer (1):

      Switched installer downloads to use Net::HTTP so we can specify a proxy based on ENV['http_proxy']. This should address ticket [#120](/projects/25090/tickets/120 "Ticket #120").

    lib/redcar/installer.rb | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)

  • Mat Schaffer

    Mat Schaffer January 23rd, 2010 @ 09:58 PM

    Oh, the streaming approach seemed to make the download take longer probably due to Net::HTTP's lame implementation. So I went with the simple approach which seemed to trade RAM for a little bit of extra speed.

  • Daniel Lucraft

    Daniel Lucraft January 23rd, 2010 @ 10:56 PM

    • State changed from “new” to “resolved”

    Thanks mat, merged it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket

Referenced by