Bug 1393901

Summary: traceback during upload to insights server
Product: Red Hat Enterprise Linux 7 Reporter: Marek Haicman <mhaicman>
Component: redhat-access-insightsAssignee: Richard Brantley <rbrantle>
Status: CLOSED ERRATA QA Contact: Martin Kyral <mkyral>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: chenders, ckyrouac, cww, jhouska, jnewton, lphiri, mkyral, rbrantle
Target Milestone: rcKeywords: ZStream
Target Release: 7.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.0.13 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1400621 1404325 (view as bug list) Environment:
Last Closed: 2017-08-01 10:09:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1400621, 1404325, 1550195    

Description Marek Haicman 2016-11-10 15:09:53 UTC
Description of problem:
When trying to include my workstation to insights, utility is exiting with traceback during the upload of data. This traceback is not helpful in sorting out the issue.

Version-Release number of selected component (if applicable):
redhat-access-insights-1.0.11-0.el7.noarch


How reproducible:
my machine

Steps to Reproduce:
1. sudo redhat-access-insights --register [or without it]

Actual results:
Traceback is printed [using output in log file for better verbosity]:
2016-11-10 15:56:01,614 DEBUG Found /etc/redhat-access-insights/machine-id
2016-11-10 15:56:01,614 DEBUG Uploading /var/tmp/peYd9p/insights-dhcp-24-168.brq.redhat.com-20161110155550.tar.gz to https://cert-api.access.redhat.com/r/insights/uploads/a045ea9a-c6a3-4308-96b1-ed0c4c7ae3e4
2016-11-10 15:56:01,615 ERROR ['Traceback (most recent call last):\n', '  File "/bin/redhat-access-insights", line 9, in <module>\n    load_entry_point(\'redhat-access-insights==1.0.11\', \'console_scripts\', \'redhat-access-insights\')()\n', '  File "/usr/lib/python2.7/site-packages/redhat_access_insights/__init__.py", line 654, in _main\n    rc = collect_data_and_upload(config, options)\n', '  File "/usr/lib/python2.7/site-packages/redhat_access_insights/__init__.py", line 252, in collect_data_and_upload\n    rc = _do_upload(pconn, tar_file, collection_duration, options)\n', '  File "/usr/lib/python2.7/site-packages/redhat_access_insights/__init__.py", line 272, in _do_upload\n    upload = pconn.upload_archive(tar_file, collection_duration)\n', '  File "/usr/lib/python2.7/site-packages/redhat_access_insights/connection.py", line 654, in upload_archive\n    upload = self.session.post(upload_url, files=files, headers=headers)\n', '  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 522, in post\n    return self.request(\'POST\', url, data=data, json=json, **kwargs)\n', '  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request\n    prep = self.prepare_request(req)\n', '  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 394, in prepare_request\n    hooks=merge_hooks(request.hooks, self.hooks),\n', '  File "/usr/lib/python2.7/site-packages/requests/models.py", line 295, in prepare\n    self.prepare_headers(headers)\n', '  File "/usr/lib/python2.7/site-packages/requests/models.py", line 409, in prepare_headers\n    check_header_validity(header)\n', '  File "/usr/lib/python2.7/site-packages/requests/utils.py", line 800, in check_header_validity\n    "not %s" % (value, type(value)))\n', "InvalidHeader: Header value 0.32 must be of type str or bytes, not <type 'float'>\n"]
2016-11-10 15:56:01,615 DEBUG Deleting: /var/tmp/peYd9p


Expected results:
As I am not sure if I have configuration correct, I expect two scenarios possible scenarios:

1) Service works and let the report to be used in insights.
2) Traceback is not shown, and explanation what could be wrong is printed instead.

Additional info:

Comment 2 Richard Brantley 2016-11-14 18:45:30 UTC
Hi, can you please run the Client in "verbose" mode via "sudo redhat-access-insights --register --verbose" and send us the STDOUT or an archive of /var/log/redhat-access-insights. Thanks

Comment 4 Richard Brantley 2016-11-14 20:00:37 UTC
It seems like there is a connectivity issue with the Satellite server. Can you please run "sudo redhat-access-insights --test-connection --verbose." Can you confirm this workstation has access to the Satellite? Thanks

Comment 8 Richard Brantley 2016-12-01 16:22:37 UTC
*** Bug 1400621 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2017-08-01 10:09:42 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/RHBA-2017:2324