Bug 119305 - up2date --register fails in findHostByRoute if proxy has no service on port 80
up2date --register fails in findHostByRoute if proxy has no service on port 80
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: up2date (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
Depends On:
Blocks: up2date-rhel3-u2
  Show dependency treegraph
 
Reported: 2004-03-29 05:12 EST by Daniel Riek
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-05 15:45:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Riek 2004-03-29 05:12:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
The findHostByRoute function in
/usr/share/rhn/up2date_client/hardware.py fails to connect to the
proxy if there is no service on port 80 due to a hardcoded "80" in
s.connect:

    if cfg['enableProxy']:
        server_port = up2dateUtils.getProxySetting()
        server = string.split(server_port, ':')[0]
    s.connect((server, 80))




Version-Release number of selected component (if applicable):
up2date-4.2.5-1

How reproducible:
Sometimes

Steps to Reproduce:
1. Configure a proxy that has no service on port 80
2. Configure Up2date to use that proxy
3. Try to register
    

Actual Results:  [steiale@redadmin steiale]$ up2date
Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/gui.py", line 752, in
onProfilePagePrepare    self.hardware = hardware.Hardware()
  File "/usr/share/rhn/up2date_client/hardware.py", line 517, in Hardware
    ret = read_network()
  File "/usr/share/rhn/up2date_client/hardware.py", line 345, in
read_network
    hostname, ipaddr = findHostByRoute()
  File "/usr/share/rhn/up2date_client/hardware.py", line 320, in
findHostByRoute    s.connect((server, 80))
socket.error: (111, 'Connection refused')

Additional info:
Comment 1 Adrian Likins 2004-03-30 18:32:11 EST
Should be fixed in 4.2.8 or higher (aka, u3 versions)
Comment 2 Adrian Likins 2004-04-05 15:45:06 EDT
make that the u2 release (second set of updates)
Comment 3 Rick Beldin 2004-05-11 15:27:18 EDT
A possible fix to this: 

In hardware.py in function findHostByRoute() change this: 

     if cfg['enableProxy']:
         server_port = up2dateUtils.getProxySetting()
         server = string.split(server_port, ':')[0]
     s.connect((server, 80))

to this: 

  if cfg['enableProxy']:
        server_port = up2dateUtils.getProxySetting()
        server = string.split(server_port, ':')[0] 
         port = string.split(server_port, ':')[1]
    s.connect((server, int(port))) 

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