Sensor Gateway: Retrieving Registration Code Fails With "Failed to Retrieve Code for Sensor Gateway"
search cancel

Sensor Gateway: Retrieving Registration Code Fails With "Failed to Retrieve Code for Sensor Gateway"

book

Article ID: 289257

calendar_today

Updated On:

Products

Carbon Black Cloud Workload

Issue/Introduction

  • When trying to retrieve a registration code for a sensor gateway url it fails with error
    Failed to Retrieve Code for Sensor Gateway
  • .HAR file may show http 500 error

Environment

  • Carbon Black Cloud Console: All Supported Versions
  • Sensor Gateway: All Supported Versions

Cause

  • This can be caused by the Sensor Gateway URL having a / at the end of it
  • https://sensor.gateway.url/ instead of https://sensor.gateway.url

Resolution

Removing the / at the end of the Sensor Gateway URL
  1. Remove the existing docker container 
    docker rm -f <container id>
  2. Run the installation script
    ./sensor_gw_install.sh
    
  3. Configure everything the same except remove the training slash in the Sensor Gateway entry point URL
    https://sensor.gateway.url
  4. Verify the Connect to Carbon Black Cloud through Sensor Gateway Registration Code now works