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 1168623 - cannot register machine over http proxy
Summary: cannot register machine over http proxy
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel72
TreeView+ depends on / blocked
 
Reported: 2014-11-27 12:32 UTC by Petr Sklenar
Modified: 2018-01-22 13:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-25 14:57:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2014-11-27 12:32:40 UTC
Description of problem:
cannot register machine over http proxy

Version-Release number of selected component (if applicable):
subscription-manager-1.10.14-7.el7.x86_64

How reproducible:
always

Steps to Reproduce:
                                                                            
0, have virt machine, nat, virt guest can access host, ip of guest = 192.168.122.xy
1, host uses basic proxy server, no authentication, do only:
yum install squid

+
/etc/squid/squid.conf, add access to your localnet (=192.168.0.0/16) or all ...
so there is only one change at line 37 of  squid.conf:
'http_access allow localhost manager localnet'

2, commands
subscription-manager --help
       --proxy=PROXY
              Uses an HTTP proxy. The PROXY name has the format hostname:port.

[root@localhost ~]# subscription-manager register --auto-attach --proxy=192.168.122.1:3128 --baseurl=http://cdn.stage.redhat.com/ --username=XYZ --password=XYZ
The system has been registered with ID: 69d22e05-c787-4a3e-b923-1d3489219c59 
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@localhost ~]# yum repolist
Loaded plugins: product-id, subscription-manager
timed out
https://cdn.stage.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 12] Timeout on https://cdn.stage.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: (28, 'Connection timed out after 30386 milliseconds')
Trying other mirror.
^C
 Current download cancelled, interrupt (ctrl-c) again within two seconds
to exit.

^C

Exiting on user cancel
[root@localhost ~]# subscription-manager config --server.proxy_hostname=192.168.122.1 --server.proxy_port=3128
[root@localhost ~]# yum repolist
Loaded plugins: product-id, subscription-manager
rhel-7-server-rpms                                                                                                                                                     | 2.2 kB  00:00:00     
rhel-ha-for-rhel-7-server-rpms                                                                                                                                         | 3.7 kB  00:00:00     
rhel-rs-for-rhel-7-server-rpms                                                                                                                                         | 3.7 kB  00:00:00     
(1/6): rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                        | 2.6 kB  00:00:01     
(2/6): rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                        | 2.6 kB  00:00:01     
(3/6): rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                        |  50 kB  00:00:01     
(4/6): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                    |  97 kB  00:00:01     
(5/6): rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                        |  58 kB  00:00:01     
(6/6): rhel-7-server-rpms/7Server/x86_64/primary                                                                                                                       | 4.2 MB  00:00:13     
rhel-7-server-rpms                                                                                                                                                                  5204/5204
repo id                                                                         repo name                                                                                               status
rhel-7-server-rpms/7Server/x86_64                                               Red Hat Enterprise Linux 7 Server (RPMs)                                                                5,204
rhel-ha-for-rhel-7-server-rpms/7Server/x86_64                                   Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs)                                      62
rhel-rs-for-rhel-7-server-rpms/7Server/x86_64                                   Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) (RPMs)                                      73
repolist: 5,339
[root@localhost ~]# rpm -q subscription-manager
subscription-manager-1.10.14-7.el7.x86_64


Actual results:
time out && subscription-manager config

Expected results:
I can register machine with one command
or
there is info about needs of 'subscription-manager config'

Additional info:
FYI my second virt machine with rhel6 can be registered by one command so net + squid should be OK

see:

[root@localhost ~]# rhnreg_ks --proxy 192.168.122.1:3128 --username=XYZ --password=XYZ --server=http://xmlrpc.rhn.errata.stage.redhat.com/XMLRPC

[root@localhost ~]# yum repolist
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
repo id                                                                   repo name                                                                                                     status
rhel-x86_64-server-6                                                      Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)                                                      14,651
repolist: 14,651

Comment 3 Adrian Likins 2015-04-27 18:34:02 UTC
Whats the redhat.repo look like after register/autoattach?

Comment 4 William Poteat 2015-04-27 18:55:17 UTC
see https://bugzilla.redhat.com/show_bug.cgi?id=1031755

Perhaps the proper solution is already implemented.

Comment 5 William Poteat 2015-04-27 18:59:39 UTC
Discussions amongst developers are on the fence as to whether proxy should be perisited on registration, as the proxy used during registration could be different than that for the yum operations. If so the referenced bug resolution is the better solution. Bug 1031755

Comment 7 John Sefler 2015-09-25 14:57:56 UTC
The decision during a bug triage was to "not" persist the proxy option used during registration.  See comment 6 for suggested workaround.


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