Getting the Error 401

Question) I am getting the following error

Error: failed to request new refresh token; client returned ‘The server returned the error: 401 Unauthorized’

Environmental information

Version 6.10

Operating system information

RHEL

Package versions

6.10

NOTE : When posting log output or code snippets (e.g., JSON, YAML, etc.), please surround your code with three backticks like so:

Your code goes here

For longer code or configuration bits, please enclose your snippet in a summary block like this:

Summary of your code snippet or config here
Your code goes inside the triple backticks

To resolve the 401 Unauthorized error, follow these steps:

  1. Run the command sensuctl configure in your terminal or command prompt.
  2. Input your credentials to authenticate with the environment.

By running sensuctl configure and providing your credentials, you authenticate yourself to the environment, which should resolve the 401 Unauthorised error you’re encountering.

1 Like

This is an feature/bug in 6.10, where tokens have a much shorten lifespan. A more detailed explanation can be found here: Sensu Go 6.10.0 JWT changes impacting Puppet usage · Issue #1338 · sensu/sensu-puppet · GitHub

1 Like