We have been using servicestack version 3.8.5.0 for a few years.
We noticed an occasional error where one of the web services returns 404. This service is part of an assembly where the other webs services all work.
This service has not been modified for a number of years and if we restart IIS the service works as expected.
Any ideas where to look on what might have caused the 'registration' to fail?
Edit:
Just found that this issue happens consistently on rebooting the server. So if I restarted IIS a number of times and I do not see the issue. However on rebooting our server, the issue appeared.
Related
I've gotten an Umbraco 9.0.1 instance up and running on a Linux server (Ubuntu 20.04). I'm using what appears to be the recommended approach of using Nginx as a reverse proxy to a Kestrel service
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0
The issue I'm having is that any time I do a code update and deploy it to my Linux server, followed by a restart of the kestrel service, the site dies. I get a 502 bad gateway error. Reloading the daemon does nothing. The only thing I've found that seems to work is if I navigate to place in the filesystem where I've deployed the published application and run the command:
dotnet Umbraco.Nine.Linux.dll (Umbraco.Nine.Linux being the name of my project and the corresponding dll the result of the publish)
that command just hangs so I hit ctrl + C to stop it, but that brings the site back up.
Has anyone else experienced anything like this? If not, how are you handling Umbraco code deployments to a Linux server? I should add that if I use the default .net core website from Visual Studio, I don't have this issue. I deploy my code and restart the kestrel service and everything is beautiful, no site outage, changes show up. So maybe there is some Umbraco startup process that's making things die?
I've checked the logs for the kestrel service and they just indicate the service stops/restarts as expected. The logs in Nginx confuse me. They say something like
2021/09/27 15:35:08 [error] 81048#81048: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 184.67.248.194, server: <mysite.com>, request: "GET /umbraco/api/test/another HTTP/1.1", upstream: "http://127.0.0.1:2003/umbraco/api/test/another", ..."
EDIT:
I thought I should post some additional details, just in case it helps. For the publishing of the project, I am using Visual Studio built in publishing and choosing File System.
(Note I've tried the single file publish but I haven't even gotten that to run. I get an error indicating some library the project depends upon will not run in single file publish. Again, this seems Umbraco specific as I can get a default asp.net core site to publish just fine like this. I'm only adding this note in case it's relevant to something just being wrong with Umbraco 9 as we're still very early in the release.)
After that I just zip it up, upload it to the server, unzip it with commands like:
unzip -o website.zip -d <path/to/my/web/app/>
Then
sudo systemctl restart <my.kestrel.service>
That's when browsing the site yields the 502 Bad Gateway I described above. Any help on what I'm doing wrong would be greatly appreciated.
So, I solved this, sort of. I've abandoned the whole kestrel thing and I'm using a docker container to run the asp.net core application. I'm still hosting using nginx as a reverse proxy. The only difference is instead of having a systemd kestrel service listening on the specified port, it's a docker container doing it.
I posted details here: https://our.umbraco.com/forum/umbraco-9/107189-umbraco-nine-on-linux-server-site-dies-after-deploying-code-changes
Hopefully it helps someone else out!
I'm pretty excited because the whole thing is 'script'-able so I managed to automate it in an AWS CodePipeline.
I have a problem regarding White Screen Of Death (WSOD) at my site.
I will try to explain what I have tried until now.
I know it is not a triviel error to debug, but maybe some of you have tried something similar.
Here is the setup: One Windows Server 2019 v1809 with one IIS: 10.0.17763.1.
Multiple websites with associated application pools.
It's a MVC solution, and we are using .net 4.7.2.
What I have tried:
Recycled application pools every night
Restarted the server every night
Issued a IISReset every night
Deleted temporary files in C:\Windows\Microsoft.NET\
Looked at the IIS logs
Looked at the application log, our own log
Looked at the Windows log
Searched the Internet for similar problems
Made sure there always were some traffic at the website
Made sure no errors were shown when pressing F12 in the browser, the site always returs code 200
The WSOD comes at varies times, and not all the sites are affected at the same time.
A manuel recycle of the website always helps.
My question is, have any of you encounted similar problems?
And how did you solve it?
If you need more information please ask, and I will try to provide it.
/Regards Søren
This kind of problem is very unusual in IIS, because there is almost no record and useful information in the log file.
You can try to use this plan to repair IIS.
Unregister all the versions of ASP.NET with command "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ua". and the framework 64 also versions. 3.0 and 3.5... etc
Delete ASPNET account from "Local Users and Group – Users".
reregister ASP.NET with IIS using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i". and framework64... net 3, 3.5 etc
Give permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET". for framework 32 and 64 and versions.
Reset IIS .
Here again because I need some help again and again….
Let me explain you, I have developed an .net core 3.1 API, and everything works well on my environment and in another computer when (in this computer) deployed in IIS.
However, when I deploy on Azure or in Another IIS in a different environment, I’m able to navigate over my API on localhost, but, when I’m try to do the same using the dns I got a 500 http error.
I have done other tests and when my ASPNETCORE_ENVIRONMENT = Development (on web.config) everything works well from nowhere, however when this value is ASPNETCORE_ENVIRONMENT = Release I got again the 500. And the following message on my logs: “[Debug] The request path "" does not match the path filter”. And I did not get no other errors, in logs or in events nothing only this message.
I’ve spent a lot of time with this issue without finding a solution, someone could help me on that please?
Thanks a lot
Best regards
Joao Fernandes
Recently we are facing "Service Unavailable" while opening our web reports url in internet explorer.
Restarting the IIS service resolves the issue but didn't found any logs/errors in event viewer to track what is causing IIS to fail.
Is there any other way to troubleshoot this?
Many thanks...
To actually help you out SO need more information but following is more common cause.
There is no enough memory for application to run when it try to start. If there are multiple application in your IIS then it cause such issue as other application took priority so memory consume by them.
Your application has some un-handle exception that cause your application to shutdown and sometime it cause worker process to stop.
If your application is .NET based ( This is not the case with you because after IIS restart it runs successfully ) then .NET Runtime Version conflict also create such problem.
I've recently ported to a different hosting company (VDS), and on the new server, installed IIS 7.5 Express, latest versions of PHP and MySQL.
I then copied the files from the old server to new server (NOTHING beyond the content of the folders of my websites, so no config files or anything except the web.configs in the sites themselves), set-up websites. I've tried to visit a website, and I got a 503 Service Unavailable message, tried both remotely and locally at the server, no change.
Tried on every site, even on Default Web Site, and no change: still 503.
I've checked the permissions to the folders of the websites (and all the children), and both my account, Network Service, Administrators have effectively full control of all the contents.
All the apps run in DefaultAppPool, which runs under ApplicationPoolIdentity. Tried creating a new app pool, moving sites there, no luck, tried setting "Load User Profile" to False in pool settings (read it here HTTP Error 503 on IIS 7.5 after SP Install), no change.
The event viewer in an extremely detailed way says:
"A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '2356'. The process exit code was '0xfffffffe'."
and nothing else. Five times of this error, and the pool is shut down due to rapid protection. I restart the pool, try again, nothing changes. No matter I'm trying to get an .aspx, .php, or static content. Here is the most weird part: when I set the app pool to run under LocalSystem, it works. No problem. But everything else fails.
I've checked the website folders about ten times, changed, erased, re-added rights etc tried everything but no change. It's as if there is another file that I'm forgetting to check that the pool's user is unable to access. But the event viewer does not help me. This started with the new server and I tried after installing everything, so I can't tell after what this started happening. I obviously won't be running under LocalSystem. Even my own user, Administrator, doesn't work.
The only identity that works is LocalSystem. My user, LocalService, NetworkService, ApplicationPoolIdentity all fail the same way. I'm going crazy, I'm 99% sure this is a user-rights issue. But all the website files are accessible, and I haven't changed anything in the system32 inetconfig or anywhere.
Ok, found my own answer again.
The process w3wp.exe runs under the DefaultAppPool user, not NETWORK SERVICE. I don't know why it doesn't run under NETWORK SERVICE, but after some research it turned out that the process needed access to C:\Windows\System32\inetsrv\config\schema and giving NETWORK SERVICE access didn't change anything. I've by coincidence found somewhere about the DefaultAppPool user, gave read permissions, and by starting the pool, all my websites started working perfectly. Quite weird, I always thought that the IIS processes ran under NETWORK SERVICE by default, and I'm sure that I haven't changed any setting.
Try running below commands with some changes
appcmd set apppool /apppool.name: <YourAppPoolHavingIssuesHere> /managedRuntieVersion:v<.net Framework version here>