Skip to content

Can't run dnx web as root #1007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
haslingerm opened this issue Oct 19, 2015 · 2 comments
Closed

Can't run dnx web as root #1007

haslingerm opened this issue Oct 19, 2015 · 2 comments

Comments

@haslingerm
Copy link

Testing the beta8 release on Linux (on coreclr, not mono) everything works perfectly fine if I run under my account, but once I attempt to do a dnx web as root I get this Exception:

Could not open /etc/lsb_release. OS version will default to the empty string. 
System.IO.DirectoryNotFoundException: The system cannot find the path specified. 
 (Exception from HRESULT: 0x80070003) 
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) 
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) 
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String path) 
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext) 
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName) 
   at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName) 
   at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName) 
   at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory) 
   at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName) 
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) 
   at Microsoft.Dnx.Runtime.Loader.LoadContext.Microsoft.Dnx.Runtime.IAssemblyLoadContext.Load(AssemblyName assemblyName) 
   at Microsoft.Dnx.Runtime.AssemblyLoadContextExtensions.Load(IAssemblyLoadContext loadContext, String name) 
   at Microsoft.Dnx.ApplicationHost.DefaultHost.GetEntryPoint(String applicationName) 
   at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args) 
   at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args) 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) 
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) 
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) 
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) 

Running as root is important for process management tools like runit to keep kestrel alive and start after reboots. My run script looks like this:

#!/bin/sh 
cd /var/www/html/Test5Beta8 
exec /home/markus/.dnx/runtimes/dnx-coreclr-linux-x64.1.0.0-beta8/bin/dnx web

Most probably I configured something wrong, not a Linux pro. Reporting here anyway since it might be a bug after all. Any hints are appreciated.

@haslingerm
Copy link
Author

Update: I figured that I need to run dnu restore for root as well, which got rid of the error posted above.
However, runit still can't run dnx web as service. Didn't manage to get an error message out of it this time, though.

@aspnet-hello
Copy link

This issue is being closed because it has not been updated in 3 months.

We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants