cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

PowerBI Report Server - The request failed with HTTP status 401: Unauthorized

I have 2 PowerBI Report Server installed in a scale-out deployment with a network load balancer. I followed the instructions described in https://docs.microsoft.com/en-us/sql/reporting-services/report-server/configure-a-report-server-on-a...

 

In step 3 i configured BackConnectionHostNames, the netbios and fqdn for the loadbalancer.

Also grant local security policies to the service account.

 

I can login in the report portal on the load balancer URL. From PowerBI Desktop for reporting services i can reach the report server on the load balancer URL, but when trying to save or upload a report to the report server i receive the following message:

PortalErrorMessage2.png

In RSPortal.log:

2019-09-27 09:09:08.2137|ERROR|10|The remote server returned an error: (400) Bad Request.| RequestID = s_4c682cad-3eeb-41c2-8932-91d524c62e15

 

When trying to create a data source i cannot type a name and after a few seconds a error message appears:

PortalErrorMessage3.png

In RSPortal.log:

2019-09-27 08:55:35.7605|ERROR|33|OData exception occurred: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetConnectionProtocol()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.ListExtensions(String extensionType)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Repositories.SystemService.GetExtensions(IPrincipal userPrincipal, ExtensionType extensionType)
at Microsoft.ReportingServices.Portal.Repositories.SystemService.ListExtensions(IPrincipal userPrincipal, ExtensionType extensionType)
at Microsoft.ReportingServices.Portal.ODataWebApi.V2.Controllers.ExtensionsController.GetEntitySet(String castName)
at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.Reflection.ReflectionODataController`1.Get(ODataPath oDataPath)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext().| RequestID = s_4172f9a5-09ad-4a77-8444-39d8591c710e

 

Would be glad if anyone can help.

 

Thanks,

 

JE

 

4 REPLIES 4
Highlighted
Advocate I
Advocate I

Re: PowerBI Report Server - The request failed with HTTP status 401: Unauthorized

Hi,

I had that one and I don't remember the exact solution order, but you must make sure that follwing is done

  •  generate machinekeys and put them in both rsconfig & machine.config. Then restart both nodes
  •  SSL -Offloading must be done by the loadbalancer e.g. F5. The windows networt balancer would never work. I tried it and had to switch to F5
  •  the BackConnectionHostNames entries must be existing on both nodes for the servername only, fqdn, ssrs main page
  • activate session persistance on the load balancer

You are getting 400 because the loadbalancer directs your request to opposite node from which it has been initiated

 

BR Bobi

Highlighted
Frequent Visitor

Re: PowerBI Report Server - The request failed with HTTP status 401: Unauthorized

FYI: The place where the machine key should be added to machine.config:

https://stackoverflow.com/questions/10337634/adding-machinekey-to-machine-config/10337791


@flopi wrote:

Hi,

I had that one and I don't remember the exact solution order, but you must make sure that follwing is done

  •  generate machinekeys and put them in both rsconfig & machine.config. Then restart both nodes
  •  SSL -Offloading must be done by the loadbalancer e.g. F5. The windows networt balancer would never work. I tried it and had to switch to F5
  •  the BackConnectionHostNames entries must be existing on both nodes for the servername only, fqdn, ssrs main page
  • activate session persistance on the load balancer

You are getting 400 because the loadbalancer directs your request to opposite node from which it has been initiated

 

BR Bobi


 

Highlighted
Frequent Visitor

Re: PowerBI Report Server - The request failed with HTTP status 401: Unauthorized

I followed your tips (thanks for that!), but still face with the same problems.

I can upload files, but only pbix files are failing.

I have upgraded the report server to the september 2019 release and install powerbi desktop for reporting services, also the september 2019 release, create a simple report, but still cannot upload the report to the report server or save the report to the report server from powerbi desktop. 

 

So when i upload, as example, a .txt file the upload succeed.

When i upload a pbix file (created with powerbi desktop september 2019 release) the portal.log show:

2019-09-30 19:20:56.4850|ERROR|81|The remote server returned an error: (400) Bad Request.| RequestID = s_80a52eb0-89f1-4b6e-87a9-d6b799d09028

 

I'm confused to can upload everything excepts pbix files.

 

 

Highlighted
Advocate I
Advocate I

Re: PowerBI Report Server - The request failed with HTTP status 401: Unauthorized

Hi,

I think that the BackConnectionHostNames doesn't contain all necessary entries that are described under https://docs.microsoft.com/de-de/sql/reporting-services/report-server/configure-a-report-server-on-a...

 

And you need to disable the loopback check

 

This should be done on both nodes and restart them

 

BR  Bobi

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!