Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
foreman_scap_client command fails with execution expired (Timeout::Error)
Version-Release number of selected component (if applicable):
Satellite 6.4.2
How reproducible:
N/A
Steps to Reproduce:
Not able to reproduce. However, configuring a read_timeout in the scap client get rid of the timeout errors.
NOTE: Even though the client errors out, OpenSCAP reports are uploading just fine.
Actual results:
Running a foreman_scap_client fails with the following error
# time foreman_scap_client 20
DEBUG: running: oscap xccdf eval --profile xccdf_com.example_profile_usgcb-rhel6-server --tailoring-file /var/lib/openscap/tailoring/ssg-rhel6-ds-tailoring_04_2019.xml --results-arf /tmp/d20190424-84862-18wfsku/results.xml /var/lib/openscap/content/ssg-rhel6-ds_04_2019.xml
WARNING: This content points out to the remote resources. Use `--fetch-remote-resources' option to download them.
WARNING: Skipping https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2 file which is referenced from XCCDF content
DEBUG: running: /usr/bin/bzip2 /tmp/d20190424-84862-18wfsku/results.xml
Uploading results to https://satellite.example.com:9090/compliance/arf/20
/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Timeout::Error)
from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new'
from /usr/lib/ruby/1.8/net/http.rb:1051:in `request'
from /usr/lib/ruby/1.8/net/http.rb:1037:in `request'
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/1.8/net/http.rb:1035:in `request'
from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.3.0/lib/foreman_scap_client/client.rb:95:in `upload'
from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.3.0/lib/foreman_scap_client/client.rb:23:in `run'
from /usr/lib/ruby/1.8/tmpdir.rb:129:in `mktmpdir'
from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.3.0/lib/foreman_scap_client/client.rb:19:in `run'
from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.3.0/bin/foreman_scap_client:10
from /usr/bin/foreman_scap_client:19:in `load'
from /usr/bin/foreman_scap_client:19
real 1m30.424s
user 0m26.026s
sys 0m4.483s
Expected results:
Make read_timeout configurable under /etc/foreman_scap_client/config.yaml file
Additional info:
NOTE: Even though foreman_scap_client command errors out, client openscap reports uploads without any issues.
Increasing proxy_request_timeout and applying a patch from https://projects.theforeman.org/issues/25501 didn't help.
Issue was fixed by adding a read_timeout in client configuration as below
On RHEL 6 : /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.3.0/lib/foreman_scap_client/client.rb
On RHEL 7 : /usr/share/gems/gems/foreman_scap_client-0.3.0/lib/foreman_scap_client/client.rb
def generate_https_object(uri)
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.read_timeout = 240 ------> read_timeout parameter added
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
https.ca_file = config[:ca_file]
begin
https.cert = OpenSSL::X509::Certificate.new File.read(config[:host_certificate])
https.key = OpenSSL::PKey::RSA.new File.read(config[:host_private_key])
rescue StandardError => e
puts 'Unable to load certs'
puts e.message
exit(3)
end
https
end
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2021:4702