RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 810363 - Firstboot crashes when [re]registering using a bad proxy
Summary: Firstboot crashes when [re]registering using a bad proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2012-04-05 18:12 UTC by J.C. Molet
Modified: 2012-06-20 13:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:09:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
network error (281.06 KB, image/png)
2012-04-11 15:32 UTC, J.C. Molet
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 810399 0 unspecified CLOSED Firstboot crashes when already registered to rhsm 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Internal Links: 810399

Description J.C. Molet 2012-04-05 18:12:08 UTC
Description of problem:
Firstboot completely crashes when [re]registering using a bad proxy.

Version-Release number of selected component (if applicable):
subscription-manager-gnome-0.99.12-1.git.18.188dde8.el6.x86_64
subscription-manager-0.99.12-1.git.18.188dde8.el6.x86_64
subscription-manager-firstboot-0.99.12-1.git.18.188dde8.el6.x86_64
python-rhsm-0.99.7-1.git.1.e68bc91.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Start firstboot and choose to register with the new rhn (uncheck classic mode)
2. Register your machine to the candlepin server with your user/pass
3. Click the back button twice
4. Click "Advanced Network Configuration"
5. Enter the name of a bogus proxy server (or make a typo) and click 'close'
6. Click 'forward' and try to re-register

Alternate steps:

1. Edit /etc/rhsm/rhsm.conf
2. Enter in bad values for the proxy server url
3. start firstboot
4. Try to register using new rhn 
  
Actual results:
Firstboot completely crashes:

executable:     /usr/bin/python
hashmarkername: firstboot
kernel:         2.6.32-220.4.1.el6.x86_64
reason:         gaierror: [Errno -2] Name or service not known
time:           Thu 05 Apr 2012 01:58:50 PM EDT

firstboot-tb-eAfJfH: Text file, 60344 bytes

description:
:The following was filed automatically by firstboot:
:firstboot 1.110.11 exception report
:Traceback (most recent call last):
:  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 105, in _nextClicked
:    self.advance()
:  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 148, in advance
:    result = module.apply(self, self.testing)
:  File "/usr/share/rhn/up2date_client/firstboot/rhsm_login.py", line 118, in apply
:    managerlib.unregister(self.backend.uep, self.consumer.uuid)
:  File "/usr/share/rhsm/subscription_manager/managerlib.py", line 791, in unregister
:    uep.unregisterConsumer(consumer_uuid)
:  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 654, in unregisterConsumer
:    return self.conn.request_delete(method)
:  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 399, in request_delete
:    return self._request("DELETE", method)
:  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 335, in _request
:    conn.request(request_type, handler, body=body, headers=headers)
:  File "/usr/lib64/python2.6/httplib.py", line 914, in request
:    self._send_request(method, url, body, headers)
:  File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
:    self.endheaders()
:  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 124, in endheaders
:    httpslib.HTTPSConnection.endheaders(self)
:  File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
:    self._send_output()
:  File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
:    self.send(msg)
:  File "/usr/lib64/python2.6/httplib.py", line 739, in send
:    self.connect()
:  File "/usr/lib64/python2.6/site-packages/M2Crypto/httpslib.py", line 169, in connect
:    HTTPConnection.connect(self)
:  File "/usr/lib64/python2.6/httplib.py", line 720, in connect
:    self.timeout)
:  File "/usr/lib64/python2.6/socket.py", line 553, in create_connection
:    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
:gaierror: [Errno -2] Name or service not known

END:

Expected results:
You would get the normal "Network Error" dialog pop up that you would using normal subscription manager.

Additional info:

Comment 1 Adrian Likins 2012-04-09 16:54:27 UTC
Got a fix for catching this case and presenting an error message. It just shows the generic "there was some sort of network error" message, so that's not great, but it does keep it from crashing.

Comment 2 Adrian Likins 2012-04-09 21:05:43 UTC
commit 454497867fcde87b3fdf54e1a3b2d67eecee8706
Author: Adrian Likins <alikins>
Date:   Mon Apr 9 12:49:30 2012 -0400

    810363: handle socket errors for bad proxy host in firstboot

Comment 6 J.C. Molet 2012-04-11 15:32:24 UTC
Created attachment 576811 [details]
network error

[root@jmolet-vm0 ~]# rpm -qa | grep subscription-manager
subscription-manager-migration-data-1.12.1.2-1.git.2.99d0c10.el6.noarch
subscription-manager-gnome-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-migration-1.0.0-1.git.11.f42a186.el6.x86_64
subscription-manager-firstboot-1.0.0-1.git.11.f42a186.el6.x86_64


I now get the attached network error for any generic proxy network error when using rhsm in firstboot.

Ive tried:
- bad hostname
- bad port
- bad authentication user/pass

All seems to work as expected.

marking VERIFIED.

Comment 8 errata-xmlrpc 2012-06-20 13:09:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0804.html


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