ASP.NET Core app only works as root

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


ASP.NET Core app only works as root



I just updated all the Microsoft packages on my ASP.NET core app to the latest 2.1 versions (as well as updated the SDK to 2.1.4 on my CentOS server) and pushed the code to the server. I rebuilt the code server-side and deployed it to the web root. I can't get the server to respond now unless it runs as root. When attempting to connect through the Apache proxy, I get a 502 Proxy Error and when I attempt to connect directly to the SSL port the Kestrel server is listening on, I get ERR_CONNECTION_CLOSED in Chrome.


502 Proxy Error


ERR_CONNECTION_CLOSED



If I run the site manually as root user (dotnet WebsiteMainDll.dll) it works fine. If I run it manually as the user it should run as (sudo -u siteuser dotnet WebsiteMainDll.dll), it doesn't work.


dotnet WebsiteMainDll.dll


sudo -u siteuser dotnet WebsiteMainDll.dll



There are no errors shown in the console. It just shows Now listening on https://0.0.0.0:44313 and is silent from that point on.


Now listening on https://0.0.0.0:44313



I have another instance of the site running on the pre-updated codebase and it works fine running as site user. This instance worked fine pre-update. What's going on?





Perhaps try setting the verbosity option of dotnet and see if you can get more info.
– john
1 min ago


dotnet









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results