Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1195658 - subscription-manager fails to register due to Encoding::CompatibilityError in production.log
subscription-manager fails to register due to Encoding::CompatibilityError in...
Status: CLOSED NEXTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management (Show other bugs)
6.0.7
All All
medium Severity medium (vote)
: Unspecified
: Unused
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-24 04:40 EST by Pavel Moravec
Modified: 2018-02-06 14:29 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-06 14:29:05 EST
Type: Bug
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 Pavel Moravec 2015-02-24 04:40:45 EST
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 09:19:12 EDT
Important observation: the issue is present only when using activation key. Without it, subscription-manager succeeds.
Comment 12 jcallaha 2018-02-06 14:21:46 EST
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 14:29:05 EST
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.