akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.7k stars 1.04k forks source link

The type initializer for 'DotNetty.Transport.Channels.DefaultChannelId' threw an exception. #3288

Closed vasily-kirichenko closed 6 years ago

vasily-kirichenko commented 6 years ago
  1. Make an F# Paket-based hello world .NET 4.6.2 console app referencing Akka, Akka.Cluster, Akka.Cluster.Discovery ( (or clone https://github.com/vasily-kirichenko/PaketBug34). Run it. Results:
D:/WLCR/github/PaketBug34/PaketBug34/bin/Debug/PaketBug34.exe
[DEBUG][22.01.2018 10:39:10][Thread 0001][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Debug
[DEBUG][22.01.2018 10:39:10][Thread 0001][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Info
[DEBUG][22.01.2018 10:39:10][Thread 0001][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Warning
[DEBUG][22.01.2018 10:39:10][Thread 0001][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Error
[DEBUG][22.01.2018 10:39:10][Thread 0001][EventStream] StandardOutLogger started
[DEBUG][22.01.2018 10:39:11][Thread 0003][akka://test/] Started (Akka.Actor.GuardianActor)
[DEBUG][22.01.2018 10:39:11][Thread 0005][akka://test/system] Started (Akka.Actor.SystemGuardianActor)
[DEBUG][22.01.2018 10:39:11][Thread 0003][akka://test/] now supervising akka://test/user
[DEBUG][22.01.2018 10:39:11][Thread 0003][akka://test/] now supervising akka://test/system
[DEBUG][22.01.2018 10:39:11][Thread 0004][akka://test/user] Started (Akka.Actor.GuardianActor)
[DEBUG][22.01.2018 10:39:11][Thread 0005][akka://test/system] now watched by [akka://test/]
[DEBUG][22.01.2018 10:39:11][Thread 0006][akka://test/user] now watched by [akka://test/system]
[DEBUG][22.01.2018 10:39:11][Thread 0003][akka://test/system/log1-DefaultLogger] Started (Akka.Event.DefaultLogger)
[DEBUG][22.01.2018 10:39:11][Thread 0004][akka://test/system] now supervising akka://test/system/log1-DefaultLogger
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream] subscribing [akka://test/system/log1-DefaultLogger#876804493] to channel Akka.Event.Info
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream] subscribing [akka://test/system/log1-DefaultLogger#876804493] to channel Akka.Event.Warning
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream] subscribing [akka://test/system/log1-DefaultLogger#876804493] to channel Akka.Event.Error
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream(test)] Logger log1-DefaultLogger [DefaultLogger] started
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream] subscribing [akka://test/system/UnhandledMessageForwarder#614707357] to channel Akka.Event.UnhandledMessage
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream(test)] StandardOutLogger being removed
[DEBUG][22.01.2018 10:39:11][Thread 0004][akka://test/system/UnhandledMessageForwarder] Started (Akka.Event.LoggingBus+UnhandledMessageForwarder)
[DEBUG][22.01.2018 10:39:11][Thread 0001][EventStream] unsubscribing [akka://all-systems/] from all channels
[DEBUG][22.01.2018 10:39:11][Thread 0006][akka://test/system] now supervising akka://test/system/UnhandledMessageForwarder
[INFO][22.01.2018 10:39:11][Thread 0001][remoting] Starting remoting
[ERROR][22.01.2018 10:39:11][Thread 0009][Akka.Remote.Transport.DotNetty.TcpTransport] Failed to bind to 0.0.0.0:2552; shutting down DotNetty transport.
Cause: System.TypeInitializationException: The type initializer for 'DotNetty.Transport.Channels.DefaultChannelId' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Lo
gging.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
   at DotNetty.Common.Internal.Logging.InternalLoggerFactory.GetInstance(String name)
   at DotNetty.Common.Internal.Logging.InternalLoggerFactory.GetInstance[T]()
   at DotNetty.Transport.Channels.DefaultChannelId..cctor()
   --- End of inner exception stack trace ---
   at DotNetty.Transport.Channels.DefaultChannelId.NewInstance()
   at DotNetty.Transport.Channels.AbstractChannel..ctor(IChannel parent)
   at DotNetty.Transport.Channels.Sockets.AbstractSocketChannel..ctor(IChannel parent, Socket socket)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<>c__DisplayClass30_0.<ServerFactory>b__0()
   at DotNetty.Transport.Bootstrapping.AbstractBootstrap`2.<InitAndRegisterAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at DotNetty.Transport.Bootstrapping.AbstractBootstrap`2.<DoBindAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<NewServer>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<Listen>d__21.MoveNext()
[ERROR][22.01.2018 10:39:11][Thread 0001][remoting] Remoting error: [Startup failed] []
Cause: Unknown

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException
: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.TypeInitializationException: The type initializer for 'DotNetty.Transport.Channels.DefaultChannelId' threw an exception. --->
 System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find t
he file specified.
   at DotNetty.Common.Internal.Logging.InternalLoggerFactory.GetInstance(String name)
   at DotNetty.Common.Internal.Logging.InternalLoggerFactory.GetInstance[T]()
   at DotNetty.Transport.Channels.DefaultChannelId..cctor()
   --- End of inner exception stack trace ---
   at DotNetty.Transport.Channels.DefaultChannelId.NewInstance()
   at DotNetty.Transport.Channels.AbstractChannel..ctor(IChannel parent)
   at DotNetty.Transport.Channels.Sockets.AbstractSocketChannel..ctor(IChannel parent, Socket socket)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<>c__DisplayClass30_0.<ServerFactory>b__0()
   at DotNetty.Transport.Bootstrapping.AbstractBootstrap`2.<InitAndRegisterAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at DotNetty.Transport.Bootstrapping.AbstractBootstrap`2.<DoBindAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<NewServer>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<Listen>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<Listen>d__21.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Akka.Remote.Transport.AbstractTransportAdapter.<>c__DisplayClass11_0.<<Listen>b__0>d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Akka.Remote.EndpointManager.<>c__DisplayClass48_1.<get_Listens>b__4(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Akka.Remote.EndpointManager.<>c.<get_Listens>b__48_5(Task`1 transportResults)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
   at Akka.Remote.Remoting.Start()
   at Akka.Remote.RemoteActorRefProvider.Init(ActorSystemImpl system)
   at Akka.Cluster.ClusterActorRefProvider.Init(ActorSystemImpl system)
   at Akka.Actor.Internal.ActorSystemImpl.Start()
   at Akkling.System.create(String name, Config config)
   at Program.main(String[] _arg1) in D:\WLCR\github\PaketBug34\PaketBug34\Program.fs:line 6
[INFO][22.01.2018 10:39:11][Thread 0009][[akka://test/system/remoting-terminator#1187007234]] Shutting down remote daemon.
[INFO][22.01.2018 10:39:11][Thread 0009][[akka://test/system/remoting-terminator#1187007234]] Remote daemon shut down; proceeding with flushing remote transports.
[INFO][22.01.2018 10:39:11][Thread 0003][remoting] Remoting shut down
[ERROR][22.01.2018 10:39:11][Thread 0010][remoting] Remoting system has been terminated abruptly. Attempting to shut down transports
Cause: Unknown
[INFO][22.01.2018 10:39:11][Thread 0009][[akka://test/system/remoting-terminator#1187007234]] Remoting shut down.
[DEBUG][22.01.2018 10:39:11][Thread 0009][akka://test/system/remoting-terminator] Stopped
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Debug
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Info
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Warning
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] subscribing [akka://all-systems/] to channel Akka.Event.Error
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] Shutting down: StandardOutLogger started
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] unsubscribing [akka://test/system/log1-DefaultLogger#876804493] from all channels
[DEBUG][22.01.2018 10:39:11][Thread 0006][EventStream] All default loggers stopped
[DEBUG][22.01.2018 10:39:11][Thread 0004][akka://test/system/log1-DefaultLogger] Stopped
Horusiath commented 6 years ago

I remember I've tweeted about that problem of Paket, but totally forgot to set an issue. Thanks for keeping an eye on that 👍

vasily-kirichenko commented 6 years ago

@Horusiath So, it's a Paket bug for sure and vanilla nuget works ok?

Horusiath commented 6 years ago

Not sure, but AFAIK, nobody using Nuget reported this as issue.

vasily-kirichenko commented 6 years ago

Manually adding binding redirects for Microsoft.Extensions.Logging.Abstractions 1.1.1.0 and Microsoft.Extensions.Logging 1.1.1.0 has solved the issue.