[英]Akka.Remote config failures
I've been trying to create an actor system that uses Akka.Remote with akka.net 1.3... However, I can't create an instance of the system due to the following exception: 我一直在尝试创建一个使用Akka.Remote和akka.net 1.3的actor系统......但是,由于以下异常,我无法创建系统实例:
TypeLoadException: Cannot instantiate transport [Akka.Remote.Transport.DotNetty.DotNettyTransport]. It has no public constructor with [Akka.Actor.ActorSystem] and [Akka.Configuration.Config] parameters
The thing is, my config is copied from the Akka.NET documentation, and I don't know what I have failed to do.. here is the config: 问题是,我的配置是从Akka.NET文档中复制的,我不知道我没有做什么..这是配置:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<akka>
<hocon>
<![CDATA[
akka {
stdout-loglevel = INFO
loglevel = INFO
# this config section will be referenced as akka.actor
actor {
provider = remote
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
# here we're configuring the Akka.Remote module
remote {
dot-netty.tcp {
transport-class = "Akka.Remote.Transport.DotNetty.DotNettyTransport,Akka.Remote"
#applied-adapters = []
transport-protocol = tcp
port = 9090
hostname = "127.0.0.1"
}
}
}
]]>
</hocon>
</akka>
</configuration>
I would appreciate some feedback on what I am doing wrong. 我希望得到一些关于我做错的反馈。 Thank you.
谢谢。
EDIT: here is the stacktrace: 编辑:这是堆栈跟踪:
" at Akka.Remote.EndpointManager.get_Listens()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at Akka.Remote.EndpointManager.<>c__DisplayClass48_0.b__0()\\r\\n at System.Threading.Tasks.Task`1.InnerInvoke()\\r\\n at System.Threading.Tasks.Task.Execute()" “at Akka.Remote.EndpointManager.get_Listens()\\ r \\ n ---从抛出异常的上一个位置开始的堆栈跟踪结束---在Akka.Remote.EndpointManager上的\\ r \\ n。<> c__DisplayClass48_0.b__0() \\ r \\ n在System.Threading.Tasks.Task`1.InnerInvoke()\\ r \\ n at System.Threading.Tasks.Task.Execute()“
Looks like you have incorrect transport configuration . 看起来您的传输配置不正确。 instead of specifying transport you should use the default transport by removing
而不是指定传输,您应该通过删除使用默认传输
#transport-class = "Akka.Remote.Transport.DotNetty.DotNettyTransport,Akka.Remote"
the base configuration uses Akka.Remote.Transport.DotNetty.TcpTransport,Akka.Remote you don't need to explicitly define it in your configuration , unless there is a reason for that. 基本配置使用Akka.Remote.Transport.DotNetty.TcpTransport,Akka。除非有原因,否则您不需要在配置中明确定义它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.