Trying to get MSDeploy working and it "hangs" on the MSDeployPublish task.
It says
"Start Web Deploy Publish the Application/package to
https://myserver:8172/msdeloy.axd?site=mysite ... Starting Web
deployment task from source: archiveDir(path to archive) to
Destination: auto()."
And it just stops. It will sit like this for 30 minutes, or more I suppose, before I kill the process.
On the server it is deploying to, in this case myserver, there is an error from MSDeploy that reads:
ERROR_SERIALIZER_ALREADY_DISPOSED - An error occurred on a callback
thread. These errors are usually benign and are handled automatically.
The details are below: System.Web.HttpException: The remote host
closed the connection. The error code is 0x800704CD. at
System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32
result, Boolean throwOnDisconnect) at
System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush() at
System.Web.HttpResponse.Flush(Boolean finalFlush) at
System.IO.BufferedStream.FlushWrite() at
System.IO.BufferedStream.Flush() at
System.Xml.XmlTextWriter.Flush() at
Microsoft.Web.Deployment.TraceEventStreamSerializer.WriteKeepAliveEvent()
No other error logs or messages that I can find.
I can hit the url to msdeploy, for example if I go to https://myserver:8172/msdeloy.axd in a browser I get the self signed certificate warning and then get prompted for credentials, so it appears MSDeploy on the server is up and running.
The server (myserver) is Windows 2008R2 with IIS7.
What really sucks, is if I REBOOT the server that I am deploying to (myserver) IT WORKS!
Any ideas on what is going on here?
Just went through the same thing. This is the response from my hosting company that resolved the issue.
"While investigating, we found that the connection attempt was hanging on our end. The Web Management Service needed to be stopped to edit settings for the management service but upon attempting to stop this service, it would not shut down so we force killed the process and after starting it back up (no changes were made to settings), Visual Studio is making connections with Web Deploy without issue."
Related
I have a .Net application hosted in IIS 10 running on Windows Service 2019. Sometimes the website stops responding (usually when running E2E tests). Even after restarting Website/Application Pool/IIS/Machine it doesn't work.
Looking in Event Viewer I see errors like these:
Forms authentication failed for the request. Reason: The ticket supplied has expired
Failed to stop a listening channel for protocol 'http' at allotted time from worker process serving application pool
A process serving application pool exceeded time limits during shut down
In HTTPERR files I see a lot of messages containing Connection_Abandoned_By_ReqQueue and Connection_Dropped
In inetpub log files I can't see any relevant, just the url requests.
To add more information, we have signalr installed and sometimes errors appear in the events, errors with messages like:
The user identity cannot change during an active SignalR connection.
Any idea what might be causing this?
I have an asp.net application running on IIS 7.5 , Windows Server 2008 R2 – using an application pool in classic mode, framework version 4.
Sometimes I am running into the following problem:
The application can work for a few days, but all of a sudden I receive an http error 503 – server unavailable.
When I look at the application pool it seems to be running (I see it started), but it actually FREEZES – every request to it is responded with 503.
At the worker processes list (in the IIS manager) I see a lot of requests unhandled.
It's important to mention that other asp.net application running under other application pools are working just fine which means the IIS is working fine and the problem is only in this specific application pool.
When I researched the http error logs I saw the following error logs in the Windows\System32\LogFiles\HTTPERR folder:
In regular settings when everything works fine I noticed records of
"Timer_ConnectionIdle" (a normal thing from what I have read).
At a certain times I notice an appearance of "Client_Reset" records.
15 minutes after the "Client_Reset" errors started->records of "QueueFull appear".
In order to work with the application I am doing an iisreset (I guess a recycle for the pool will be enough also).
I will be happy to receive any help or suggestions.
EDIT:
It's important to mention that nothing related gets written to the IIS logs, or the System and Application logs. This error occurs before.
Without more information about your problem, most quick fix will be to Configure Recycling Settings for an Application Pool. Since your problem is about request queues, you can choose option After reaching a number of requests.
When I encounter HTTP 500 errors, I find that enabling IIS Tracing is very helpful. Below is a link that describes the process of enabling tracing and then reviewing the trace. The first section of the site describes how to install IIS, so you probably want to skip to the section labeled "Enable Failed-Request Tracing."
Troubleshooting Failed Requests Using Tracing in IIS 7
Edit:
Since you're getting a QueueFull error, you may want to monitor the request queues. The easiest way to do this is using Perfmon. On the server with IIS, open Performance Monitor and add the appropriate counters under "HTTP Service Request Queue." In your case, "Current Request Queue" for the ailing Application Pool would likely be of value.
For ASP.NET project MSBuild gives some files in E:\Build such as:
TestProjectA.deploy.cmd
TestProjectA.SetParameters.xml
TestProjectA.SourceManifest.xml
TestProjectA.zip
To deploy from Windows 7 to Windows Server 2008 R2 (IIS 7)
Executing command gives following error message:
Command
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy.exe -verb:sync -source:contentPath='E:\Build' -dest:contentPath='ra/files-to-pub',ComputerName="https://<IP>:8172/msdeploy.axd?site=ra",UserName='DEV\Administrator',Password='MyPassword',AuthType='Basic' -enableRule:DoNotDeleteRule -whatif -allowUntrusted
Error Message:
Info: Using ID 'd1bbee7a-e940-4be1-b41d-1847b3e7022d' for connections to the remote server.
Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer ("[IP ADDRESS]") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
Error: The remote server returned an error: (550).
Error count: 1
Given link suggest to do:
Ping the remote machine. *STATUS-OK
The msdepsvc or wmsvc service is started on the remote server. *STATUS-OK
Firewall is not blocking incoming connections of your ports on the destination. If it used the default installation, then it would be 80 for msdepsvc and 8172 for wmsvc. *STATUS-OK
Both of service are running at target server:
Web Management Services
Web Deployment Agent Service
What can do now to solve it?
If you have checked the basic stuff like
Credentials are correct
Website name is spelt correctly everywhere
And have tried the steps mentioned here
And it still didn't work then may I suggest troubleshooting using Web Management Service Failed Request Tracing
This might be too late, but for others checking this error. Verify the Site name too. IE, Default Web Site/SiteDeploy (or whatever you call it)
k
I'm struggling to setup the environment in IIS8, I searched a lot but couldn't find a right solution.
I checked the error logs, but no idea.
C:\Windows\System32\LogFiles\HTTPERR
2013-10-09 09:28:39 192.168.43.205 60172 192.168.43.205 80 HTTP/1.1
GET / 503 2 AppOffline qa.hti.local
2013-10-09 09:28:39 192.168.43.205 60192 192.168.43.205 80 HTTP/1.1
GET /favicon.ico 503 2 AppOffline qa.hti.local
Then in Event Viewer:
WARNINGS:
A listener channel for protocol 'http' in worker process '11188'
serving application pool 'qa.hti.local' reported a listener channel
failure. The data field contains the error number.
A listener channel for protocol 'http' in worker process '7492'
serving application pool 'qa.hti.local' reported a listener channel
failure. The data field contains the error number.
A listener channel for protocol 'http' in worker process '9088'
serving application pool 'qa.hti.local' reported a listener channel
failure. The data field contains the error number.
A listener channel for protocol 'http' in worker process '9964'
serving application pool 'qa.hti.local' reported a listener channel
failure. The data field contains the error number.
A listener channel for protocol 'http' in worker process '7716'
serving application pool 'qa.hti.local' reported a listener channel
failure. The data field contains the error number.
I don't understand what the warning means.
ERROR: Application pool 'qa.hti.local' is being automatically disabled due to a series of failures in the process(es) serving that
application pool.
Note: I learned that consecutive 5 failures leads to APP Pool crash, and this can increased. I also tried increasing this but no success.
Please share your thoughts.
I came across this question as I was experiencing a similar issue and searching for a solution.
My problem specifically had to do with our IIS shared configuration. We had enabled a feature in IIS on one of the servers (Http Redirect) that was not installed on any of the others so the server 'features' were out of sync with all the servers.
I was able to resolve the issue by uninstalling the new addition on the first server so it was back to matching the others. An IIS reset later and the AppPools were no longer going down and all was back to normal.
So if you are using IIS Shared Configuration and the IIS is creating 'Service Unavailable' errors and the AppPools are going down, this can be a symptom of the system configuration being out of synch which is corrupting the shared configuration. Hopefully this post will help someone find the solution faster than I was able to.
I had a similar problem, and it was due to another error (2282 IIS-W3SVC-WP) that the pool stopped itself. My problem was that de module owssvr.dll could not be loaded due to a configuration problem.
The solution for me was to set the setting "Enable 32-bit applications" from True to false.
I was deploying a solution on Sharepoint 2013 on a Windows Server 2012 with Visual studio 2013.
I know this was supposedly a very specific problem, but I want to help all those with the same problem.
Propably you do not have the permissions to read the directory.
The directory (and the files) need to have read-access for either windows-group "USERS" or windows-grou "IIS_IUSRS" and also for your apppoolidentity.
This occurred for me too on Windows 10 1803 after an update.
Earlier in the event log there were errors to do with missing DLLS, specifically iiswsock.dll and compstat.dll.
After turning on the following Windows features (under IIS > WWWServices > Performance Features and AppDev Features):
Dynamic and Static Content Compression, and
WebSocket Protocol Windows features
those errors disappeared after an IIS restart.
503 2
Is that 2 the substatus code? If so, you might want to make sure your site is not being hit with excessively (5000+) # of requests.
http://support.microsoft.com/kb/943891
The data field contains the error number.
what's the error number?
This also can be caused by you're software vendor not realizing that they installed the 32bit version of the application pool apps on your 2008 R2 server. After a little troubleshooting my server because they wanted me to reinstall IIS i checked the windows app logs and emailed them the x86 architecture error for their app.
This can occur if a piece of IIS is missing (e.g. one of the many IIS modules has not been installed on the new server).
The thing to do is to carefully compare the IIS config of the source and target, and add the missing pieces to the target.
In a recent IIS8.5->8.5 migration, I had this issue. Went through the whole stack. The last piece was that the Web Cert auth piece of IIS was missing.
To install:
powershell
import-module servermanager
add-windowsfeature Web-Cert-Auth
I reinstalled server and copied applicationHost.config to new server, but not installed corresponding modules, and got this error. I fixed that by check modules in IIS manager and ensure modules are installed.
Update: In Windows Logs-> Application, there're some info about which module is missing.
In case this helps anyone else: We run multiple https sites on an IIS 10 server. One of the steps in configuring a new site is to give the new application pool permission to the system certificate. In the registry, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\MY, grant the application pool on the local machine full control. That fixed this issue for us.
I had the same problem and solved it by adding the domain account the application pool was using as an identity to the local group of Administrators on a web server. Perhaps it would also do the trick to grant access to the application directory for the application pool identity account, as #Lisa-Berlin stated above.
I installed a fresh AMI for EC2 (http://aws.amazon.com/amis/Microsoft/5147732567196848) and have installed Web deploy 2.1 on it.
The web deploy 2.1 service is running for real as
netstat -an
Shows 8172 is being listened on by the Web Deployment Agent Service.
But, when I try to deploy to this site using Project->right-click->Publish (via web deploy) I receive the following error message
------ Build started: Project: Cir.Web, Configuration: Debug Any CPU ------
Cir.Web -> C:\Projects\CrazyInsaneRobot\Source\Cir.Web\bin\Cir.Web.dll
------ Publish started: Project: Cir.Web, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Debug\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default%20Web%20Site ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of
...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
My firewall on the EC2 instance has been turned off. And my AWS firewall settings are
which are the recommended settings.
Other notes/thoughts:
My Web Deploy Error log in the windows error log is completely empty
I've used web deploy before using a different AMI in the past and succeeded without problems.
If anyone has any suggestions about how to debug this, I would be so ever grateful!
I contact Microsoft directly about this problem and they had an immediate answer for me.
From MS guy:
It looks like your Web Management Service not contactable. I have seen this before when the certificate for the service is invalid. Can you run the attached script on your server?
Start a PowerShell prompt elevated
Run set-executionpolicy unrestricted –force
Run .\00_Certificate.ps1
Net stop wmsvc
Net start wmsvc
Does this fix the problem?
The script he is referring to is available here
This error can also occur when you specify the end point in the wrong format.
For example when selecting to publish an application Visual Studio gives examples of the end point format such as https://RemoteServer:8172/MsDeploy.axd
Turns out it actually wanted this without the http prefix e.g.
0.0.0.0:8172/MsDeploy.axd
If you get an error about certificates after this you just need to check the box allow untrusted certificates in the publish screen.
Agrahahah!
I had this same problem with Web Deploy when it was installed by the Web Platform Installer. After manually uninstalling and reinstalling Web Deploy directly (NOT using Web PI) it worked fine...
Some very helpful answers for an error message with many causes. I had this error and it turned out that the "IIS Web site/application" name used for the destination server was wrong.
So, causes for this could include:
Bad username or password
Incorrect web site name for destination (In Visual Studio, this is set on the Package/Publish Web tab of a web project's properties)
SSL cert for web management (for example if your server was sysprepped after IIS was installed)
I get the same error when i tried to deploy a website.
In the EventViewer (Windows Logs/System) i had an error log, that the log file of the Web Management Service could not be created ("Unable to create log file D:\Logfiles\WMSVC\W3SVC1\u_ex131126.log. Make sure that the logging directory is correct and this computer has write access to that directory.".
I just removed the readonly flag of the log folder and all worked fine again.