Bug 1339 - packagemanager/pkg and proxy
: packagemanager/pkg and proxy
Status: CLOSED DUPLICATE of bug 1214
Product: pkg
cli
: unspecified
: i86pc/i386 OpenSolaris
: P3 normal (vote)
: ---
Assigned To: pkg/cli watcher
: pkg/cli watcher
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-04-18 12:33 UTC by Jan Hlodan
Modified: 2008-04-25 07:51 UTC (History)
3 users (show)

See Also:


Attachments
package manager and proxy (470.53 KB, image/png)
2008-04-18 12:33 UTC, Jan Hlodan
no flags Details
package manager2 and proxy (505.40 KB, image/png)
2008-04-18 12:34 UTC, Jan Hlodan
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Jan Hlodan 2008-04-18 12:33:44 UTC
Created an attachment (id=179) [details]
package manager and proxy

I am behind the proxy. How can I connect to opensolaris repository?
If I set proxy connection in "network proxy" and then I run "package manager",
I can't download anything.See screenshots.
If I export proxy via console and then I run "pkg refresh"
I got:

# pkg refresh
Traceback (most recent call last):    
  File "/usr/bin/pkg", line 1281, in ?
    ret = main_func()
  File "/usr/bin/pkg", line 1241, in main_func
    return catalog_refresh(img, pargs)
  File "/usr/bin/pkg", line 954, in catalog_refresh
    img.retrieve_catalogs(full_refresh)
  File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line 804, in
retrieve_catalogs
    headers = hdr, imgtype = self.type)
  File "/usr/lib/python2.4/vendor-packages/pkg/misc.py", line 102, in
versioned_urlopen
    c = url_opener(req)
  File "/usr/lib/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
  File "/usr/lib/python2.4/urllib2.py", line 376, in _open
    '_open', req)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 573, in <lambda>
    lambda r, proxy=url, type=type, meth=self.proxy_open: \
  File "/usr/lib/python2.4/urllib2.py", line 580, in proxy_open
    if '@' in host:
TypeError: iterable argument required
-bash-3.2#
Comment 1 Jan Hlodan 2008-04-18 12:34:31 UTC
Created an attachment (id=180) [details]
package manager2 and proxy
Comment 2 David Comay 2008-04-19 14:24:17 UTC
Recategorizing.  I know we've had issues with using proxies (for example,
setting the environment variable "http_proxy" does not work AFAIK).
Comment 3 Danek Duvall 2008-04-20 19:02:57 UTC
Reset blank QA contact.
Comment 4 Danek Duvall 2008-04-22 23:42:47 UTC
How are you setting the proxy (other than through the GNOME dialog, which I'm
pretty sure that python doesn't look at -- though that would be a good RFE for
the gui, if you don't do that already), and what are you setting it to?  I'm
confused by the fact that it's choking on an @-sign.  This might also be
related to bug 305.
Comment 5 Jan Hlodan 2008-04-25 05:58:28 UTC
I think, the problem is that packagemanager/pkg doesn't accept exported IP
address. 
http_proxy=IP:port
this doesn't work!

I have to run:
e.g.
export http_proxy=http://gmp-ea-proxy-2.sun.com:8080 
gksu packagemanager


Expected Results:

Proxy settings from Preferences -> Network settings should be accepted.
IP address should be enough
e.g.
export http_proxy=123.45.6.789:8080
gksu packagemanager


PS: if you don't know domain name of your Proxy server (just IP), use this
command:
/usr/sbin/nslookup IP address
Comment 6 Jan Hlodan 2008-04-25 06:58:44 UTC
I am sorry, I posted internal/confidential information in http_proxy example.
Could you change it, please?
Comment 7 Danek Duvall 2008-04-25 07:51:49 UTC
*** This bug has been marked as a duplicate of bug 1214 ***