2015-11-21 16 views
6

Sto provando a eseguire un'applicazione Web Api non modificata creata da yo aspnet.dnx kestrel "System.EntryPointNotFoundException: uv_loop_size"

sto ottenendo questo errore:

System.EntryPointNotFoundException: uv_loop_size 
    at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.Libuv+NativeDarwinMonoMethods:uv_loop_size() 
    at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.loop_size() <0x42615b8 + 0x00014> in <filename unknown>:0 
    at Microsoft.AspNet.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNet.Server.Kestrel.Networking.Libuv uv) <0x4261528 + 0x0002b> in <filename unknown>:0 
    at Microsoft.AspNet.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) <0x4261160 + 0x0005f> in <filename unknown>:0 

Tutte le idee?

dnvm lista di output:

Active Version    Runtime Architecture OperatingSystem Alias 
------ -------    ------- ------------ --------------- ----- 
     1.0.0-rc1-final  coreclr x64   darwin   
     1.0.0-rc1-final  mono     linux/osx  
    * 1.0.0-rc2-16177  mono     linux/osx  default 

versione mono

Mono JIT compiler version 4.2.1 (explicit/6dd2d0d Tue Nov 10 18:01:18 EST 2015) 

Aggiornamento

ho corse

export DYLD_FALLBACK_LIBRARY_PATH=/Users/Andy/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/ 

che si è conclusa up dandomi un errore diverso durante l'esecuzione dnx web:

System.DllNotFoundException: libc.dylib 
    at (wrapper managed-to-native) System.IO.KeventWatcher:kqueue() 
    at System.IO.KeventWatcher.GetInstance (IFileWatcher& watcher) <0x105a29310 + 0x000f3> in <filename unknown>:0 
    at System.IO.FileSystemWatcher.InitWatcher() <0x105a28fa0 + 0x0012c> in <filename unknown>:0 
    at System.IO.FileSystemWatcher..ctor (System.String path, System.String filter) <0x105a28d00 + 0x00114> in <filename unknown>:0 
    at System.IO.FileSystemWatcher..ctor (System.String path) <0x105a28cc0 + 0x00023> in <filename unknown>:0 
    at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:.ctor (string) 
    at Microsoft.AspNet.FileProviders.PhysicalFilesWatcher..ctor (System.String root) <0x105a285b0 + 0x00154> in <filename unknown>:0 
    at Microsoft.AspNet.FileProviders.PhysicalFileProvider..ctor (System.String root) <0x105a282d0 + 0x000e4> in <filename unknown>:0 
    at Microsoft.AspNet.Hosting.HostingEnvironmentExtensions.Initialize (IHostingEnvironment hostingEnvironment, System.String applicationBasePath, IConfiguration config) <0x105a27f20 + 0x001ea> in <filename unknown>:0 
    at Microsoft.AspNet.Hosting.WebHostBuilder.Build() <0x105a1a860 + 0x000b8> in <filename unknown>:0 
    at Microsoft.AspNet.Hosting.WebApplication.Run (System.Type startupType, System.String[] args) <0x105560990 + 0x00216> in <filename unknown>:0 
    at Microsoft.AspNet.Hosting.WebApplication.Run (System.String[] args) <0x10555fef0 + 0x0001a> in <filename unknown>:0 
    at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) <0x10555fec0 + 0x00014> in <filename unknown>:0 
    at Microsoft.AspNet.Server.Kestrel.Program.Main (System.String[] args) <0x10555fc90 + 0x000b5> in <filename unknown>:0 
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) 
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1050027a0 + 0x000b7> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in <filename unknown>:line 0 
    at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) in <filename unknown>:line 0 
    at Microsoft.Dnx.ApplicationHost.Program+<>c__DisplayClass3_0.<ExecuteMain>b__0() in <filename unknown>:line 0 
    at System.Threading.Tasks.Task`1[TResult].InnerInvoke() in <filename unknown>:line 0 
    at System.Threading.Tasks.Task.Execute() in <filename unknown>:line 0 

Unhandled Exception: 
System.NullReferenceException: Object reference not set to an instance of an object 
    at System.IO.FileSystemWatcher.Stop() in <filename unknown>:line 0 
    at System.IO.FileSystemWatcher.Finalize() in <filename unknown>:line 0 
+0

Per quanto riguarda l'aggiornamento: 'libc.dylib' si trova in'/usr/lib', non so se tu avessi un esistente " DYLD_FALLBACK_LIBRARY_PATH "set, 'export DYLD_FALLBACK_LIBRARY_PATH =/libuv/dir/locaation:/usr/lib: $ DYLD_FALLBACK_LIBRARY_PATH' in modo da non reimpostare un DYLD_FALLBACK_LIBRARY_PATH esistente env var ... – SushiHangover

+0

Sono nella stessa identica situazione di Andy (incluso il problema aggiornato). Ho provato il tuo suggerimento @RobertN per aggiungere/usr/lib all'env var e sono tornato all'errore "uv_loop_size" originale. Può valere la pena notare che non ho avuto questo problema con beta8. L'ho solo ora che ho aggiornato a rc1-final. –

+0

@KevinCraft, controlla il thread di commento da Pawel nel thread di risposta sotto come caricamento della lib nativa modificato nella release RC @ http://blog.3d-logic.com/2015/11/10/using-native-libraries- in-asp-net-5/ – SushiHangover

risposta

0

Dopo molte reinstallazioni di Mono, Visual Code, Xamarin Studio, DNX, libuv, un aggiornamento di Node e RoberN che mi fornivano alcuni puntatori chiari, ho pensato che dovevo controllare la mia variabile env PATH. Abbastanza sicuro, non appena ho aggiunto/usr/lib /:/usr/local/lib al mio PATH, tutto ha iniziato a funzionare!

dnx web

Hosting environment: Production 
Now listening on: http://localhost:5000 
Application started. Press Ctrl+C to shut down. 

successo!

+0

Interessante ... '/ usr/lib /:/usr/local/lib sul mio PATH' se questo ha funzionato, quindi MS sta facendo un po 'non std dyld path probing come non dovresti mai includere libs dirs nel tuo' execution' path ... – SushiHangover

+0

Anche in questo caso, se funziona., che in realtà dovrebbe essere segnalato come un bug su piattaforme non Windows – SushiHangover

+0

Non ho molta familiarità con quello che dovrebbe essere nel mio percorso o cosa no ma sì, funziona. Qualche idea su come accedere all'accesso ai file quando si esegue il web dnx per vedere dove effettivamente appare come procmon su Windows? – AndyD

3

FYI: Questo non è mono legati

Non è trovare la libreria nativa libuv attraverso il System.Net.Libuv di montaggio:

https://github.com/dotnet/corefxlab/blob/d76ebe8ab5ed058d3d6903939ab0e4ee4e19b773/src/System.Net.Libuv/src/System/Net/Libuv/Interop.cs

1a) Eseguire dnvm list -detailed per determinare la posizione dei runtime di dnx che si sta utilizzando, ad esempio

Active Version    Runtime Architecture OperatingSystem Alias Location 
------ -------    ------- ------------ --------------- ----- -------- 
     1.0.0-beta8   mono     linux/osx    ~/.dnx/runtimes 
     1.0.0-rc1-final  mono     linux/osx    ~/.dnx/runtimes 
    * 1.0.0-rc2-16177  mono     linux/osx  default ~/.dnx/runtimes 

2 °) mie dnx installazioni sono $HOME/.dnx/runtime (impostazione predefinita), quindi posso correre find ~/.dnx/packages -name "libuv*"

/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/osx/native/libuv.dylib 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win10-arm/native/libuv.dll 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win7-x64/native/libuv.dll 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win7-x86/native/libuv.dll 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win10-arm/native/libuv.dll 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win7-x64/native/libuv.dll 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win7-x86/native/libuv.dll 

Una volta trovato dove il vostro libuv.dylib fa vivere sul proprio sistema, è possibile impostare l'ENV . var DYLD_FALLBACK_LIBRARY_PATH a quella directory:

export DYLD_FALLBACK_LIBRARY_PATH=/your/libuv/directory/location:$DYLD_FALLBACK_LIBRARY_PATH 

Eseguire il dmvm nuovo CMD:

dnvm exec 1.0.0-rc2-16177 dnx web 

Nota:

Su OS-X libuv è disponibile anche tramite brew @ versione stabile 1.7.5 ma non ho provato come MS non sta facendo il versioning della loro build libuv.dylib quindi non sono sicuro che sia un custom version or not ... (?)

otool -L /Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib 
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib: 
    /Users/asplab/Documents/buildAgent/temp/buildTmp/fs-poll-5b0daf.out (compatibility version 0.0.0, current version 0.0.0) 
+0

Grazie, è un'ottima informazione. Farò un po 'di ricerche più tardi oggi. – AndyD

+0

sei sicuro che non sia DYLD_FALLBACK_LIBRARY_PATH invece di DYLIB_FALLBACK_LIBRARY_PATH? – AndyD

+0

@RobertN: qui puoi trovare la versione fornita con Kestrel: https://github.com/aspnet/libuv-build/tree/dev/submodules. Attualmente è 1.7.3 con un commit che fa lavorare i loop multipli su Windows (un contributo del nostro team a libuv) – Pawel

0

Nel caso in cui qualcuno viene qui in cerca di un'altra soluzione ...

ho provato tutto quanto sopra, tra cui più re-installazioni di tutto e PATH aggiornamenti senza successo, e, infine, passato a CoreCLR come per la soluzione here e alla fine ha funzionato!

dnvm install 1.0.0-rc1-update1 -r coreclr -arch x64 

dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64 

dnvm list 

poi, vai al tuo progetto e provare di nuovo

dnx web 
Problemi correlati