cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AppPortal - Error Cleaning Variable

We are doing OS Deployments through AppPortal and are having issues with cleaning the variables. 

Is the ESD Service supposed to add the ESDWebservice.asmx to the site server for SCCM? Or would this manually need to be placed on the site server?

 http://insertSCCMServernamehere/ESDWebService/ESDWebservice.asmx

(2) Solutions
After digging around a bit in the code, it looks like you are correct.. To determine where to clean the variables, App Portal runs the following query against the CAS DB to get the "serverName". for a given netBiosName.

SELECT DISTINCT s.ServerName ,vrs.Netbios_Name0 AS NetBiosName
FROM v_R_System_Valid AS vrs INNER JOIN
v_RA_System_SMSInstalledSites AS sis ON vrs.ResourceID = sis.ResourceID INNER JOIN
dbo.v_Site AS s ON sis.SMS_Installed_Sites0 = s.SiteCode

The server value which is returned is the server that App Portal will contact when cleaning up variables. I'm guessing that the server is actually the primary.. Ideally, App Portal should only try to clean against the config Mgr sever defined under the deployment settings.. The work around would be to install the ESD Web service on the primary as well as the CAS.. This will not cause any issues.. By doing this App Portal can clean the variables directly on the Primary.. It will not do anything else on the primary.

View solution in original post

The log on the Config Manager server showed a permissions issue - we missed making sure the service account had the same permissions on the primary server as the CAS - so once we get those set it looks like we'll be good.

View solution in original post

(11) Replies

Error cleaning Variable SS_RequestID removed from Machinename The request failed with HTTP status 404: Not Found. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at AppPortal.Infrastructure.Repositories.EsdWwebService.ESDWebService.DeleteComputerVariable(String strSiteServer, String strVariableName, String strVariableValue, String strMachineName)
at AppPortal.Infrastructure.Repositories.CmRepository.CleanVariables(VariableCleanup variable)

You need to explicitly install the ESD Web Service (ESDWebService.asmx) on the Config Mgr server.. There is a separate installer for this.. Is this a new environment? App Portal won't do much without the ESD Web Service installed, which is why I ask.

its not a new environment, but a secondary site server. Looks like we will be installing that soon. 

To confirm the installer is AppPortalWebServiceSetup? for our particular release 2019 R1?

Yes, the installer name is AppPortalWebServiceSetup_2019_R1.exe. If this is truly a secondary site server (which reports to a primary rather than a CAS), then I don't believe that this is going to work. I can't say I've specifically tried installing on a secondary site sever, but I've always been told that the web service only supports installation on the primary, or on a CAS.

I was wrong about the secondary site server. It is our primary site server and the WebService is installed on the CAS. 

It looks like when AppPortal sends the Variable Clean it calls on the primary site server directly, instead of the CAS. Which I assume is causing our issue. 

After digging around a bit in the code, it looks like you are correct.. To determine where to clean the variables, App Portal runs the following query against the CAS DB to get the "serverName". for a given netBiosName.

SELECT DISTINCT s.ServerName ,vrs.Netbios_Name0 AS NetBiosName
FROM v_R_System_Valid AS vrs INNER JOIN
v_RA_System_SMSInstalledSites AS sis ON vrs.ResourceID = sis.ResourceID INNER JOIN
dbo.v_Site AS s ON sis.SMS_Installed_Sites0 = s.SiteCode

The server value which is returned is the server that App Portal will contact when cleaning up variables. I'm guessing that the server is actually the primary.. Ideally, App Portal should only try to clean against the config Mgr sever defined under the deployment settings.. The work around would be to install the ESD Web service on the primary as well as the CAS.. This will not cause any issues.. By doing this App Portal can clean the variables directly on the Primary.. It will not do anything else on the primary.

We got the web service on the primary server yesterday and in reviewing the logs, the variables aren't able to be cleaned on the machines.  We're getting request timed out and I can see the machine is online.  Is there a way to further troubleshoot why the variables can't be cleaned.

Error cleaning Variable SS_RequestID removed from <machine name> The operation has timed out     at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at AppPortal.Infrastructure.Repositories.EsdWwebService.ESDWebService.DeleteComputerVariable(String strSiteServer, String strVariableName, String strVariableValue, String strMachineName)
   at AppPortal.Infrastructure.Repositories.CmRepository.CleanVariables(VariableCleanup variable)

There "may" be some additional information in the log file named ComputerVariableDelete.log, which will be located in the C:\Program Files (x86)\Flexera Software\App Portal Web Service\logs folder on the Config Mgr server (this is an ESD Web Service log file). I'm interested to know if you are seeing "successfully removed machine variable" logged, or "failed to remove computer variable". If the latter, then I'd want to know what the log entry contained..  App Portal is connecting to the ESD Web Service to remove the variable.. The timeout is set to 60 seconds, so if the call does not return in this time frame, then App Portal will log that the variable could not be removed (and will continue to try and do so).. The ESD Service itself is making a WMI call into the SMS provider to get the machine variables defined for the device, and if found, to delete them.. Either this call is taking longer than normal to complete, or it will be failing entirely.

The log on the Config Manager server showed a permissions issue - we missed making sure the service account had the same permissions on the primary server as the CAS - so once we get those set it looks like we'll be good.

Thanks, @DustinMoore and @TeriStevenson, for the question and the persistence in tracking down the solution!

 

...and of course, you too, @CharlesW.    🙂

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".