Bug 1770433 - 500 Internal Server Error while uploading report from proxy to satellite
Summary: 500 Internal Server Error while uploading report from proxy to satellite
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.7.0
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-09 05:25 UTC by Nikhil Kathole
Modified: 2020-04-14 13:26 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-foreman_openscap-2.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:26:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 28251 Normal Closed 500 Internal Server Error while uploading report from proxy to satellite 2020-10-29 10:27:44 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:26:33 UTC

Description Nikhil Kathole 2019-11-09 05:25:55 UTC
Description of problem:

2019-11-09T00:11:27 [I|app|85ceb50b] Started POST "/api/v2/compliance/arf_reports/5bb15393-2e2d-4dd4-b8b5-743423a7cae2/1/1573276285" for IP at 2019-11-09 00:11:27 -0500
2019-11-09T00:11:28 [I|app|85ceb50b] Processing by Api::V2::Compliance::ArfReportsController#create as JSON
2019-11-09T00:11:28 [I|app|85ceb50b]   Parameters: {"logs"=>"[FILTERED]", "digest"=>"ab63b6bc631f9e1efa7207699ac034ebfb6187094c8fa9678b91dc3388514f91", "metrics"=>{"passed"=>18, "failed"=>31, "othered"=>0}, "openscap_proxy_name"=>"satellite.example.com", "openscap_proxy_url"=>"https://satellite.example.com:9090", "apiv"=>"v2", "cname"=>"5bb15393-2e2d-4dd4-b8b5-743423a7cae2", "policy_id"=>"1", "date"=>"1573276285", "arf_report"=>{"logs"=>"[FILTERED]", "digest"=>"ab63b6bc631f9e1efa7207699ac034ebfb6187094c8fa9678b91dc3388514f91", "metrics"=>{"passed"=>18, "failed"=>31, "othered"=>0}, "openscap_proxy_name"=>"satellite.example.com", "openscap_proxy_url"=>"https://satellite.example.com:9090"}}
2019-11-09T00:11:28 [W|app|85ceb50b] Action failed
2019-11-09T00:11:28 [I|app|85ceb50b]   Rendering api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout
2019-11-09T00:11:28 [I|app|85ceb50b]   Rendered api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout (0.7ms)
2019-11-09T00:11:28 [I|app|85ceb50b] Completed 500 Internal Server Error in 64ms (Views: 1.5ms | ActiveRecord: 0.9ms)



Version-Release number of selected component (if applicable):
Satellite 6.7 snap 1


How reproducible:
always

Steps to Reproduce:
1. # foreman_scap_client 1
DEBUG: running: oscap xccdf eval  --profile xccdf_org.ssgproject.content_profile_standard_customized --tailoring-file /var/lib/openscap/tailoring/0d87960defa6a38ec0ccbb32f317eb18950e29db3a5487ed08edac915c358405.xml --results-arf /tmp/d20191109-12473-98ibid/results.xml /var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.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-RHEL7.xml.bz2 file which is referenced from XCCDF content
DEBUG: running: /usr/bin/env bzip2 /tmp/d20191109-12473-98ibid/results.xml
Uploading results to https://satellite.example.com:9090/compliance/arf/1
Report not uploaded from proxy to Foreman server, cause: Failed to upload to Foreman, saving in spool. Failed with: 500 "Internal Server Error"

Actual results:

Failed with: 500 "Internal Server Error"

Expected results:
Successful upload of arf reports.

Additional info:

Comment 5 Marek Hulan 2019-11-12 16:47:41 UTC
Created redmine issue https://projects.theforeman.org/issues/28251 from this bug

Comment 6 Bryan Kearney 2019-11-14 09:03:40 UTC
Upstream bug assigned to oprazak@redhat.com

Comment 7 Bryan Kearney 2019-11-14 09:03:43 UTC
Upstream bug assigned to oprazak@redhat.com

Comment 8 Bryan Kearney 2019-11-15 11:03:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28251 has been resolved.

Comment 9 Nikhil Kathole 2019-11-23 06:42:12 UTC
VERIFIED

Version tested:
Satellite 6.7 snap 3

2019-11-23T01:16:30 [I|app|c8eb4176] Started POST "/api/v2/compliance/arf_reports/1d9ae3ab-68cf-414d-9ea6-a4de68c8e253/1/1574489787" for IP at 2019-11-23 01:16:30 -0500
2019-11-23T01:16:31 [I|app|c8eb4176] Processing by Api::V2::Compliance::ArfReportsController#create as JSON
2019-11-23T01:16:31 [I|app|c8eb4176]   Parameters: {"logs"=>"[FILTERED]", "digest"=>"9f8d71ea654333c4786e97eabb3f219d68bf281bc3f092883de91146bff465aa", "metrics"=>{"passed"=>18, "failed"=>31, "othered"=>0}, "openscap_proxy_name"=>"satellite.example.com", "openscap_proxy_url"=>"https://satellite.example.com:9090", "apiv"=>"v2", "cname"=>"1d9ae3ab-68cf-414d-9ea6-a4de68c8e253", "policy_id"=>"1", "date"=>"1574489787", "arf_report"=>{"logs"=>"[FILTERED]", "digest"=>"9f8d71ea654333c4786e97eabb3f219d68bf281bc3f092883de91146bff465aa", "metrics"=>{"passed"=>18, "failed"=>31, "othered"=>0}, "openscap_proxy_name"=>"satellite.example.com", "openscap_proxy_url"=>"https://satellite.example.com:9090"}}
2019-11-23T01:16:34 [I|app|c8eb4176] Completed 200 OK in 2856ms (Views: 0.6ms | ActiveRecord: 275.6ms)


# foreman_scap_client 1
DEBUG: running: oscap xccdf eval  --profile xccdf_org.ssgproject.content_profile_standard_customized --tailoring-file /var/lib/openscap/tailoring/0d87960defa6a38ec0ccbb32f317eb18950e29db3a5487ed08edac915c358405.xml --results-arf /tmp/d20191123-28154-okzq9y/results.xml /var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.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-RHEL7.xml.bz2 file which is referenced from XCCDF content
DEBUG: running: /usr/bin/env bzip2 /tmp/d20191123-28154-okzq9y/results.xml
Uploading results to https://satellite.example.com:9090/compliance/arf/1
Report uploaded, report id: 98

Comment 12 errata-xmlrpc 2020-04-14 13:26:24 UTC
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, 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-2020:1454


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