Closed PedroC88 closed 5 years ago
Pedro,
I think the GetFullPath error is your real issue here. Can you please double check the parameter Remote Resource Path on existence?
And if that doesn't help, doublme check the parameters Local Report Path and Local Resource Path.
Otherwise, please provide screenshots of your full configuration.
Kind regards
TL;DR Switched to the right task, the GetFullPath error doesn't appear anymore but I still get the 404
__ Based on the details that you asked for, I realized I was using the wrong task SQL Server Reports Folder Deployment instead of SQL Server Reports Deployment. I now switched to the correct task which doesn't give me the GetFullPath error but I still get the 404. Here are the variables
Could you try with Remote Resource Path "/General Reports"?
And try to resolve the URL http://server-name.domain.com/ReportServer?%2fGeneral+Reports&rs:Command=ListChildren
http://server-name.domain.com/ReportServer?%2fGeneral+Reports&rs:Command=ListChildren
lists all reports within the folderCould you enable Verbose logging at the bottom of the task and compare the logging output to the Write statements in the script here? That could give an indication how far you're getting and which param could be the problem.
The last message I get before the error is on line 118
Creating WebService proxy using credentials
The first error line continues as
The request failed with HTTP status 404: Not Found.
To debug the issue I extracted and simplified the section Creating Webservice proxy. I then ran the script in my computer and in the agent. In my computer it failed with the same 404, in the agent it worked. The 404 is expected in my computer because I don't have access to that SSRS server. Success is also expected from the agent as it has access to the SSRS server. Here's the script I used.
$WsUsername = "user.name";
$wsSecurePass = ConvertTo-SecureString -String "p4ssw0rd" -AsPlainText -Force
$WebserviceUrl = "http(s)://server-name.domain.com/reportserver/ReportService2010.asmx?wsdl"
[System.Management.Automation.PSCredential] $auth = New-Object System.Management.Automation.PSCredential -ArgumentList $WsUsername,$wsSecurePass;
$ssrs = New-WebServiceProxy -Uri $WebserviceUrl -Credential $auth -ErrorAction Stop;
Could it be that somehow the PS script is not running on the agent computer (or perhaps under some different credentials)?
P.S. Your script has a small bug where you declare a variable called $type for the SSRS service, but when you print it for reference is called $dataType which of course is empty.
Thanks for checking those things. I would advise to check 2 more things:
OMG... I'm embarrassed I missed something so obvious as the agent (specially after asking the question myself, [facepalm]). That was the issue, it was running under the hosted agent which of course doesn't have access to the reporting server.
I switched it to the proper pool and was able to move forward, some reports appear to be failing but it seems an issue on the definition of the reports so that's on me.
Thank you so much @ygeelen-tb!!
@PedroC88 No worries I see people forgetting about that regularly! They should better display the chosen agent in the task title so it's less easy to miss.
Not sure what I'm doing wrong to configure the endpoint.
P.S. Before that error I also get the following message (not sure if related) System.Management.Automation.MethodInvocationException: Exception calling "GetFullPath" with "1" argument(s): "Illegal characters in path." ---> System.ArgumentException: Illegal characters in path.
P.S.S. nor the agent nor the reporting server are publicly available on the web, both computers are part of a private network.