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 712448 - Error message displays wrong hostname and port
Summary: Error message displays wrong hostname and port
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Chris Duryee
QA Contact: J.C. Molet
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel62
TreeView+ depends on / blocked
 
Reported: 2011-06-10 16:26 UTC by J.C. Molet
Modified: 2011-09-20 20:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-20 20:23:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
wrong hostname (24.10 KB, image/png)
2011-06-10 16:26 UTC, J.C. Molet
no flags Details

Description J.C. Molet 2011-06-10 16:26:34 UTC
Created attachment 504154 [details]
wrong hostname

Description of problem:
When displaying an error message that shows the path of the candlepin server, the error message displays the proxy hostname and port instead of the candlepin hostname and port

Version-Release number of selected component (if applicable):
subscription-manager-gnome-0.96.1-1.git.213.27a76c6.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.  Install rhsm off of master branch
2.  Build an older candlepin (I used 0.3 branch)
3.  Configure rhsm to use a proxy
4.  Register rhsm to that candlepin
5.  Try to search for subscriptions
  
Actual results:
You get the following error message:
Unable to search for subscriptions: Runtime Error Could not find resource for relative : /consumers/d189e56e-c205-4325-a7fb-b42b7081f438/owner of full path: https://auto-services.usersys.redhat.com:3129/candlepin/consumers/d189e56e-c205-4325-a7fb-b42b7081f438/owner at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:200

The error message shows that the hostname of the candlepin server is the proxy server.  For debugging purposes, wouldn't this error be clearer if it used the candlepin hostname?

Expected results:
The error would be something like this, using the candlepin hostname:

Unable to search for subscriptions: Runtime Error Could not find resource for relative : /consumers/d189e56e-c205-4325-a7fb-b42b7081f438/owner of full path: https://candlepin-server.usersys.redhat.com:8443/candlepin/consumers/d189e56e-c205-4325-a7fb-b42b7081f438/owner at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:200

Additional info:

Comment 1 Chris Duryee 2011-08-15 20:56:41 UTC
This error is coming from RESTEasy, via request.getUri().getRequestUri().

Can you post your squid settings? I think squid may be doing something to the HTTP headers.

Comment 5 Chris Duryee 2011-09-20 20:23:20 UTC
JC,

I was able to reproduce this with candlepin 0.3, but not 0.4 (even when hacking python-rhsm to reproduce the same error). In candlepin 0.3, this error was handled as a 500 ISE, but it is already corrected in 0.4 to be a regular 404. This is handled by python-rhsm to display a regular "Remote server error" box.

The root cause is that resteasy uses calls that appear to get data from getServerName instead of getLocalName. This is by design, but works against us in our particular use case (see http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html#Introduction for more detail). These errors are correctly wrapped as a 404 in 0.4, so the user doesn't see the candlepin error message in the error box.

Since this only affects subscription-manager when using the older candlepin which is not in hosted production anymore, I'm going to set this as WONTFIX. Fixing it in subscription-manager is possible, but not worth the risk IMO, especially since it's already fixed in candlepin and the bug is low-impact. I did, however, add additional logging to candlepin to display getLocalName on requests in addition to getServerName.

Let me know if you disagree and we can discuss further.


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