Bug 731909

Summary: Yast/zypper - unable to update software behind a proxy...
Product: [openSUSE] openSUSE 12.1 Reporter: mukul singh <mukul>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mseben
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description mukul singh 2011-11-22 05:39:10 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0

Yast is unable to do an update as I keep getting 407 proxy authentication required when accessing opensuse 12.1 repositories.

I am behind a proxy and have specified the credentials in /etc/sysconfig/proxy as suggested on numerous forums. This has not been of help.

curl, wget etc work from command line, however, yast and zypper don't.

Reproducible: Always

Steps to Reproduce:
1. kick off yast or zypper
2. try online update or install a new software

Actual Results:  
Following message is given out :

Checking whether to refresh metadata for Updates for openSUSE 12.1 12.1-1.4
Retrieving repository 'Updates for openSUSE 12.1 12.1-1.4' metadata [\]
Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
Error code: HTTP response: 407
Error message: The requested URL returned error: 407


Expected Results:  
update/installation should be peroformed

zypper.log contains the following
----------------------------------

2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp] MediaCurl.cc(doGetDoesFileExist):1108 perform code: 22 [ HTTP response code said error ]
2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp++] MediaCurl.cc(evaluateCurlCode):948 HTTP response: 407 (URL: http://download.opensuse.org/update/12.1/repodata/repomd.xml)
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 MediaCurl.cc(evaluateCurlCode):949 THROW:    Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error code: HTTP response: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error message: The requested URL returned error: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 MediaCurl.cc(evaluateCurlCode):1004 RETHROW:  Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error code: HTTP response: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error message: The requested URL returned error: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 MediaCurl.cc(doGetDoesFileExist):1154 RETHROW:  Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error code: HTTP response: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error message: The requested URL returned error: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 MediaCurl.cc(getDoesFileExist):875 RETHROW:  Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error code: HTTP response: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error message: The requested URL returned error: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 MediaSetAccess.cc(provide):216 CAUGHT:   Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error code: HTTP response: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 Error message: The requested URL returned error: 407
2011-11-22 16:16:16 <5> linux-3jr5(21798) [zypp] Exception.cc(log):137 
2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(5): desired (cached)
2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp++] MediaHandler.cc(getDetectedDevices):1363 No devices for this medium
2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp++] MediaSetAccess.cc(provide):228 Media couldn't provide file /repodata/repomd.xml , releasing.
2011-11-22 16:16:16 <1> linux-3jr5(21798) [zypp++] MediaManager.cc(release):486 release(id=5)


y2log contains the following
-----------------------------

2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaAccess.cc(close):285 Close: http(http://download.opensuse.org/update/12.1/ not attached; localRoot "") (OK)
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaHandler.cc(release):709 Request to release media - not attached; eject ''
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaHandler.cc(removeAttachPoint):178 MediaHandler - checking if to remove attach point
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaSetAccess.cc(rewriteUrl):392 Rewriting url http://download.opensuse.org/update/12.1/
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaAccess.cc(open):118 Trying scheme 'http'
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaCurl.cc(MediaCurl):425 MediaCurl::MediaCurl(http://download.opensuse.org/update/12.1/, )
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaMultiCurl.cc(MediaMultiCurl):1158 MediaMultiCurl::MediaMultiCurl(http://download.opensuse.org/update/12.1/, )
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaAccess.cc(open):234 Opened: http(http://download.opensuse.org/update/12.1/ not attached; localRoot "")
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaManager.cc(open):277 Opened new media access using id 35 to http://download.opensuse.org/update/12.1/
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaSetAccess.cc(provide):203 Going to try to provide  file /content from media number 1
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaManager.cc(attach):413 attach(id=35)
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaHandler.cc(createAttachPoint):393 Trying to create attach point in /var/adm/mount
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] PathInfo.cc(mkdir):315 mkdir /var/adm/mount/AP_0x00000003 00755
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaHandler.cc(createAttachPoint):370 Created default attach point /var/adm/mount/AP_0x00000003
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] Sysconfig.cc(read):31 Load '/etc/sysconfig/proxy'
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] Sysconfig.cc(read):71 done reading '/etc/sysconfig/proxy'
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaCurl.cc(setupEasy):564 Proxy: -none-
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaCurl.cc(setupEasy):692 HEADER X-ZYpp-AnonymousId: 8e78e122-bd0b-4caa-b9cc-de08a3168cc8
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaCurl.cc(setupEasy):692 HEADER X-ZYpp-DistributionFlavor: dvd
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaCurl.cc(setupEasy):692 HEADER Pragma:
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp] MediaHandler.cc(attach):656 Attached: http://download.opensuse.org/update/12.1/ attached; localRoot "/var/adm/mount/AP_0x00000003"
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaManager.cc(checkDesired):109 checkDesired(35): desired (report by zypp::media::NoVerifier)
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(35): desired (cached)
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaCurl.cc(doGetDoesFileExist):1017 /content
2011-11-22 13:54:22 <1> linux-3jr5(8477) [zypp++] MediaCurl.cc(doGetDoesFileExist):1027 URL: http://download.opensuse.org/update/12.1/content
2011-11-22 13:54:51 <3> linux-3jr5(8332) [ncurses] NCApplication.cc(runInTerminal):186 /sbin/yast online_update  >&2 returned:35072
2011-11-22 13:54:51 <1> linux-3jr5(8332) [ncurses] NCurses.cc(RedirectToLog):574 isatty(stderr)no
2011-11-22 13:54:51 <1> linux-3jr5(8332) [ncurses] NCurses.cc(RedirectToLog):583 isatty(stdout)no
2011-11-22 13:54:51 <1> linux-3jr5(8332) [YCP] clients/menu.ycp:124 Got 35072 from /sbin/yast online_update  >&2
2011-11-22 13:54:51 <1> linux-3jr5(8332) [ncurses] YNCursesUI.cc(~YNCursesUI):113 Stop YNCursesUI
2011-11-22 13:54:51 <1> linux-3jr5(8332) [ncurses] NCurses.cc(~NCurses):149 Shutdown NCurses...
2011-11-22 13:54:51 <1> linux-3jr5(8332) [ncurses] NCurses.cc(~NCurses):168 NCurses down
2011-11-22 13:54:51 <1> linux-3jr5(8332) [wfm] WFMSubAgent.cc(~WFMSubAgent):41 Deleting SubAgent: 0 scr
2011-11-22 13:54:51 <1> linux-3jr5(8332) [liby2] genericfrontend.cc(main):884 Finished YaST2 component 'y2base'
2011-11-22 13:54:51 <1> linux-3jr5(8332) [liby2] genericfrontend.cc(main):889 Exiting with client return value 'nil'

/etc/sysconfig/proxy contains the following
--------------------------------------------
PROXY_ENABLED="yes"
HTTP_PROXY="http://Mukul_Singh:xxxxxxx@iproxy:8080"
HTTPS_PROXY="http://Mukul_Singh:xxxxxxx@iproxy:8080"
FTP_PROXY="http://Mukul_Singh:xxxxxxx@iproxy:8080"
GOPHER_PROXY=""

NO_PROXY="localhost, 127.0.0.1"
Comment 1 Martin Vidner 2012-01-31 14:40:09 UTC
if zypper does not work either, then libzypp may be at fault
Comment 2 Michael Andres 2012-01-31 15:11:13 UTC
libzypp-10.3.6 fixes some problems with username/password embedded in the /etc/sysconfig/proxy url.

*** This bug has been marked as a duplicate of bug 740764 ***