Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1195658 - subscription-manager fails to register due to Encoding::CompatibilityError in production.log
Summary: subscription-manager fails to register due to Encoding::CompatibilityError in...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.0.7
Hardware: All
OS: All
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-24 09:40 UTC by Pavel Moravec
Modified: 2019-12-16 04:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-06 19:29:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2015-02-24 09:40:45 UTC
Description of problem:
A customer was unable to register a content host using subscription-manager with activation key to Sat6, that logged to production.log (see unblurred log in private attachment):

Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
  Parameters: {"facts"=>"[FILTERED]", "installedProducts"=>[{"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"6.6", "productId"=>"69"}], "type"=>"system", "name"=>"*******", "owner"=>"*******", "activation_keys"=>"*******"}
Completed 500 Internal Server Error in 1220ms

Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT):
  lib/middleware/catch_json_parse_errors.rb:9:in `call'
  app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'

(and nothing more in the backtrace)

Adding "encoding: utf8" in the production section of /etc/foreman/database.yml file is a valid workaround.

Despite we dont know where the binary (and not-UTF8) input data come from, doesn't it make sense to have the "encoding:utf8" set in database.yml preventivelly everytime? Knowing the sensitivity of ruby to non-UTF8 input..

Or is there a different approach for this?


Version-Release number of selected component (if applicable):
foreman-1.6.0.52-1


How reproducible:
???


Steps to Reproduce:
??? unknown atm


Actual results:
content host unable to register


Expected results:
content host registered


Additional info:
attaching sosreport, foreman-debug and production.log

Comment 8 Pavel Moravec 2015-03-30 13:19:12 UTC
Important observation: the issue is present only when using activation key. Without it, subscription-manager succeeds.

Comment 12 jcallaha 2018-02-06 19:21:46 UTC
Unable to reproduce this on Sat 6.3 Snap 35. I recommend closing this, pending any additional concerns.

Comment 13 Bryan Kearney 2018-02-06 19:29:05 UTC
This can not be reproduced on Satellite 6.3. I am closing this out as next release. If you are still seeing this on 6.3, please feel free to re-open with additional information.


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