Process 'appcmd.exe' exited with code '87'-The parameter is incorrect - appcmd

I used the Azure DevOps IIS web app manage task. I am getting the error shown below.
2023-02-09T10:06:55.1071184Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"apppoolname"
2023-02-09T10:06:55.2783889Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"apppoolname" -managedRuntimeVersion: -managedPipelineMode:Integrated -processModel.identityType:ApplicationPoolIdentity
2023-02-09T10:06:55.4490177Z APPPOOL object "apppoolname" changed
2023-02-09T10:06:55.4645967Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list app "sitename/appname"
2023-02-09T10:06:55.6171480Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set app /app.name:"sitename/appname" -applicationPool:"apppoolname" -[path='/'].physicalPath:"C:\Web\App\PW\appname" -[path='/'].userName: -[path='/'].password:
2023-02-09T10:06:55.7323894Z APP object "sitename/appname" changed
2023-02-09T10:06:55.7325343Z ERROR ( hresult:80070057, message:Failed to commit configuration changes.
2023-02-09T10:06:55.7325882Z
2023-02-09T10:06:55.7326499Z The parameter is incorrect.
2023-02-09T10:06:55.7326903Z
2023-02-09T10:06:55.7327478Z )
2023-02-09T10:06:55.9123942Z ##[error]Process 'appcmd.exe' exited with code '87'.
2023-02-09T10:06:55.9427590Z ##[section]Finishing: Manage IISWebApplication
I ran the CLI command directly in the VM and got the same error. When I removed the password parameter in the set app command it worked.
I don't know how to exclude password parameter in the IIS web app manage task.
Is there any way to overcome this problem?
Need to exclude password parameter in the IIS web app manage task or any alternative way to overcome this problem

Related

How to debug Microservice in cumulocity platform

I wrote microservices using spring boot. some time showing its active in status and sometimes showing inactive, I can't understand the behaviour of microservice and how can debug it
Have you tested running the microservice locally?
I've been getting inconsistent reports from the status tab in the UI. Sometimes it says the service is down when it's actually up. I check the /health endpoint to be sure(it's not available right after you upload the zip, takes 5-6 minutes).
The logs in the UI are a bit clunky, so I've added a rolling file appender to logback.xml and a rest endpoint to expose the log file for debugging.
Try to override health check timeout value (timeoutSeconds property of Probe). By default it's 1 second and it's often not enough. Please refer our specification: https://cumulocity.com/guides/reference/microservice-manifest/
In the administration application you will find the status details for each of your applications.
When the status is switching all the time probably the docker container is terminating all the time (probably because the application is crashing). You should the that on the status tab of the application in the event log (container is restarted all the time).
If you are on the newest Cumulocity version (9.19.x) you should also have access to the logs of the microservice at the same place in UI. You need to log to stdout in order to be able to get the logs through administration application.

TFS - Build Service Starts and then throws a HTTP code 500: System.ServiceModel.ServiceActivationException

I have been working on restoring a build server (tfs 2012) from a backup and all manner of things got messed up (the tfsservice account password had been altered and I had to go to every service and app pool on the box and update it). Once sql was backup I was able to update the password via the TFS admin console app. Then I was able to re-register the build service and add a controller and a build agent. It starts briefly and shows green for a few seconds before stopping and a "details ..." button appears next to the Build Service. If I click the details button I see the following
"Please contact your administrator. There was an error contacting the server. Technical information (for administrator): HTTP code 500: System.ServiceModel.ServiceActivationException"
I have checked the http bindings in iis for the tfs site and there is only the one "*:8080"
I tried hardcoding it to the ip on the box and I still get the same error. If I go to one of the client machines and try and queue a build it shows the build server as being offline.
I have also checked for multiple host headers and the memory utilization which are the most common responses to this particular issue. Neither of them seem to be the cause or the solution.
Any ideas or suggestions are welcome I have run out of ideas to try here. Thanks in advance for any help you have to offer.
EDIT -- also found this in the log: Build machine MyMachine lost connectivity to message queue tfsmq://buildservicehost-25/.

404 error when accessing Struts2 Web application

I had created a web application and committed the code in CVS. The web application is working good in my machine. When i tried to import the same code in another machine i am getting 404 error. I tried importing the code via ftp from my machine to another machine and also checking out the code from CVS. But still i get 404 error.
I also noticed that there is no error that had been captured in the console or in the application's log. Could someone help me in how to proceed further in identifying the issue. Please let me know if i need to post any further details regarding the issue.
I notice this issue to be in the Websphere server. I tried hosting the application in different machine and found that in few machine the same code is working good and some it is not. Is there any way to compare the server configuration?
In the WAS server 6.1 i added the below value in the web container and the application worked fine.
Steps:
In the server admin console, click on Application Server--> --> Web container--> custom properties.
Add the name as com.ibm.ws.webcontainer.invokefilterscompatibility and value as true.
Thank you all for the response.

Weird Behavior Deploying Azure Cloud Service

I have a very weird issue deploying an azure cloud Service. I have 1 Web Role with 5 instances and 1 Cache Role with 2 instances.
When I deploy my MVC 5 WebRole from the Azure Portal, deploying starts on the first web instance, then it tells me that the "The role could not be started" due to an error and stops processing the other instances. I did an RDP to the failed instance and truly the MVC application throws an error that it can't find a certain view file "The layout page "..." could not be found at the following path", even though the view in the path specified does exist. So I did an iisreset and the application worked. after I manually fixed the issue the deployment continues to the next instance and the failed instance becomes "Ready".
Anyone has an idea why things don't deploy smoothly anymore or why an iisreset is necessary?
This is relatively recent, around a month.
My environment is:
.NET Framework 4.5.1
MVC 5
Azure SDK 2.4 for VS 2013
Thanks for the help.
FINALLY!! I found the issue and fixed it.
I had a Local Storage Resources to store temporary files and local file caches for certain components, and was configured to reset on role restart. One of the components (Lucene.NET for azure) was locking the files in that local storage, causing the problem on deployment that needed to to IIS reset to release the lock.
I configured the component to cache the files on Windows temp storage instead of the Local Resource and things worked out.

Trying to call svn.exe from batch file called by .NET webpage - odd results

The situation: I have a mvc.net web page which, when called, runs a batch file on my server using System.Diagnostics.Process.Start and cmd.exe. The batch file contains a line that runs "svn.exe update myfilepath" and should therefore update the files on the server.
What's happening?
- the batch file is running, but the call to svn.exe does nothing, nor produces any error messages.
- if I run the batch file by double clicking, the svn command DOES run successfully.
I guess this is a security issue, but I'm no expert on this and I cannot make any headway.
The site is hosted on Windows Server 2008 R2 and the app pool is using the ApplicationPoolIdentity system. I have tried running the app pool as Network Service and also adding Network Service as a user that can Read/Execute to svn.exe.
Please help!
This could be proxy related. It's possible that you access the Internet via a proxy, but that the user profile for the app pool identity isn't configured like this. You may need to use a domain account that you can log on as in order to create a suitable user profile. You will also need to make sure IIS is loading the profile by ticking the appropriate option.
(Another possibility is that the working directory for the process you are starting is not set correctly to the root of your Subversion working copy. We've established this wasn't the problem in your case.)

Resources