Why Is The Manual Data Uploading To Red Hat Automation Analytics Failing With Status 401 In Ansible Automation Platform ?

Solution Verified - Updated -

Environment

Red Hat Ansible Automation Platform
Automation Analytics

Issue

  • When trying to get the automation analytics data uploaded from Ansible Automation Platform instance manually using the awx-manage gather_analytics --ship utility it fails with the error
    Upload failed with status 401, Insights services authentication failed

Resolution

  • In Automation Controller UI Go to Settings -> System -> MISC. SYSTEM
  • Toggle on the GATHER DATA FOR AUTOMATION ANALYTICS. Then Enter RED HAT CUSTOMER USERNAME and RED HAT CUSTOMER PASSWORD
  • If already exist, check if the Red Hat customer credentials are correct.

Root Cause

  • The manual syncing of data using awx-manage gather_analytics --ship requires the Red Hat customer credentials to authenticate cloud.redhat.com and sync data to Automation Analytics.

Diagnostic Steps

  • The following error can be seen while uploading data to cloud.redhat.com :

    # awx-manage gather_analytics --ship
    Last analytics run was: 2019-07-11 00:59:00.062829+00:00
    /tmp/178cf005-c991-4bb8-bdaf-a3667464c926_2020-07-16-081112+0000.tar.gz
    shipping analytics file: /tmp/178cf005-c991-4bb8-bdaf-a3667464c926_2020-07-16-081112+0000.tar.gz
    Upload failed with status 401, Insights services authentication failed
    NoneType: None
    You have mail in /var/spool/mail/root
    

    Also check in tower.log to see similar error:

    ERROR awx.main.analytics REDHAT_USERNAME is not set
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments