Red Hat Bugzilla – Bug 1195658
subscription-manager fails to register due to Encoding::CompatibilityError in production.log
Last modified: 2018-02-06 14:29:05 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
Important observation: the issue is present only when using activation key. Without it, subscription-manager succeeds.
Unable to reproduce this on Sat 6.3 Snap 35. I recommend closing this, pending any additional concerns.
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.