Articles in this section

Resolving 401 Unauthorized Errors When Embedding with Docker Localhost Deployments

Published:
Updated:

When deploying Report Server in a Docker environment using localhost, embedded reporting scenarios may fail with a 401 Unauthorized error. This occurs because localhost references the local container environment and can cause authentication and proxy URL mismatches during embedded requests.

To ensure proper authentication and embedding functionality, the Report Server should be configured using one of the following instead of localhost:

  • host.docker.internal
  • Server IP address

Cause

When the Report Server is initially launched using localhost in a Docker deployment, the server configuration is generated based on that URL. This can lead to authentication and proxy URL mismatches during embedding scenarios, resulting in 401 Unauthorized errors.

Resolution

For New Installations

If you are performing a fresh installation of the Report Server in Docker:

  1. Complete the installation.
  2. Launch the Report Server for the first time using one of the following:
    • host.docker.internal
    • Server IP address

Important: Do not use localhost when initially launching the Report Server. The initial configuration is generated based on the URL used during the first launch. Use host.docker.internal or the server IP address instead to avoid embedding and authentication issues.

Examples:

For Existing Installations

If the Report Server has already been configured using localhost, update the Proxy URL settings through the User Management Server (UMS).

Prerequisites

  • You must have a UMS Administrator account.
  • Site-level administrator permissions are not sufficient.

UMS Administration URL

http://localhost:8090/ums/administration/user-management/users

Site Administration URL

http://localhost:8090/reporting/site/site1/administration/user-management/users

Note: The Site Administration page and UMS Administration page are different. Proxy settings can only be modified through the UMS portal.

How to Access Site Management in UMS

  1. Sign in with a UMS Administrator account.

  2. Click the User Profile icon in the upper-right corner.

  3. Verify that the Manage Sites option is available.

    If the Manage Sites option is not displayed, the account does not have UMS Administrator privileges.

  4. Click Manage Sites.

You will be redirected to:

http://localhost:8090/ums/sites

Updating the Proxy Settings

  1. From the UMS portal, navigate to SettingsProxy Settings.
  2. Locate the Site URL or Proxy URL field.
  3. Replace the localhost URL with either:
    • host.docker.internal
    • Server IP address

image.png

  1. Save the changes.
  2. Restart the Report Server services to apply the updated Proxy URL settings.

Note: Restarting the Report Server services is mandatory after updating the Site URL or Proxy URL settings.

Expected Result

After updating the Site URL or Proxy URL to use host.docker.internal or the server IP address and restarting the services, embedded reports should authenticate successfully and the 401 Unauthorized error should no longer occur.

Best Practices

  • Avoid using localhost for Docker-based Report Server deployments.
  • Configure the server URL using host.docker.internal or the server IP address during the initial launch.
  • Ensure the Site URL and Proxy URL are configured consistently.
  • Verify that embedded applications use the same Report Server URL configured in the Site URL or Proxy URL settings, whether it is a server IP address, host.docker.internal, or a reverse proxy URL.

By following these recommendations, you can avoid authentication-related issues and ensure that embedded reporting functions correctly in Docker deployments.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied