- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我想弄清楚为什么即使在重新启动计算机后仍使用该端口!
System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:13000. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.ServiceModel.Channels.SocketConnectionListener.Listen() --- End of inner exception stack trace --- at System.ServiceModel.Channels.SocketConnectionListener.Listen() at System.ServiceModel.Channels.TracingConnectionListener.Listen() at System.ServiceModel.Channels.ConnectionAcceptor.StartAccepting() at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen() at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener) at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback) at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info) System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.ServiceModel.Channels.SocketConnectionListener.Listen()
您如何确定哪个进程正在监听该端口 (13000)? Netstat 在该端口上不显示任何内容。
这是我的 App.config:
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="SomeTarget.SomeTargetService">
<endpoint address="" binding="customBinding" bindingConfiguration="NetTcpBinding"
contract="SomeTarget.ISomeTargetService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:13000" />
</baseAddresses>
</host>
</service>
</services>
<bindings>
<customBinding>
<binding name="NetTcpBinding" sendTimeout="00:05:00" closeTimeout="00:00:30" openTimeout="00:00:30" receiveTimeout="00:05:00">
<transactionFlow />
<binaryMessageEncoding />
<windowsStreamSecurity protectionLevel="None" />
<tcpTransport maxBufferPoolSize="524288"
maxReceivedMessageSize="1024"
maxBufferSize="1024" >
<connectionPoolSettings groupName="default" leaseTimeout="00:05:00"
idleTimeout="00:02:00" maxOutboundConnectionsPerEndpoint="20" />
</tcpTransport>
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
最佳答案
我在安装 .Net 4.5 后遇到了这个问题,我在这里发布了一个解决方案,以帮助其他人遇到这个问题。 @berkayk 上面的回答有效(将 mex 暴露在不同的端口上),但我需要通过同一端口暴露两个端点。
假设您有两个端点,一个使用 netTcpBinding,一个使用 mexTcpBinding。使用默认绑定(bind)时,一些默认值是使用 OSEnvironmentHelper.ProcessorCount 计算的,而不是像在 .Net 4.0 中那样使用硬编码值。
在我的例子中,当使用命名的 netTcpBinding 绑定(bind)配置时,为 MaxConnections 属性提供的值为 20。在 NetTcpBinding 上设置 MaxConnections 属性还会将其 TcpTransportBindingElement 的 MaxPendingConnections 属性和 TcpTransport 的 ConnectionPoolSettings.MaxOutboundConnectionsPerEndpoint 属性设置为相同的值。
当不使用命名的 netTcpBinding 绑定(bind)配置,并且仅使用默认值时,MaxPendingConnections 属性是使用以下算法计算的:
return (12 * OSEnvironmentHelper.ProcessorCount);
mexTcpBinding 的传输还使用上述算法计算了它的 MaxPendingConnections 属性,因此当两者都没有使用命名的 bindingConfiguration 时,默认值匹配并且没有问题。
当使用命名的 netTcpBinding bindingConfiguration 时,传输的 MaxPendingConnections 是 20,而 mexTcpBinding 的传输的 MaxPendingConnections 在我的机器上是 96。共享同一端口的这两个端点之间的 MaxPendingConnections 值的差异是不兼容的。
我还发现这个问题也发生在 ListenBacklog 集上。(我不知道可能存在的所有可能的冲突值。)
要解决此问题,您可以为 mex 创建一个自定义绑定(bind),该绑定(bind)与 netTcpBinding 的命名 bindingConfiguration 相匹配。示例如下:
<endpoint binding="netTcpBinding" bindingConfiguration="TestNetTcpBinding"
contract="YourContract" />
<endpoint address="mex" binding="customBinding" bindingConfiguration="TestMexBinding"
contract="IMetadataExchange" />
<bindings>
<customBinding>
<binding name="TestMexBinding">
<tcpTransport maxPendingConnections="20" listenBacklog="20">
<connectionPoolSettings groupName="default" maxOutboundConnectionsPerEndpoint="20" />
</tcpTransport>
</binding>
</customBinding>
<netTcpBinding>
<binding name="TestNetTcpBinding" listenBacklog="20" maxConnections="20"/>
</netTcpBinding>
</bindings>
或者,您不能指定任何计算值(如 maxConnections 和 listenBacklog)并接受默认值(请注意,MaxOutboundConnectionsPerEndpoint 仍将保留默认值 10,因为它的计算方式与 MaxPendingConnections 属性的计算方式不同):
<binding name="TestNetTcpBinding" ...someOtherProperties except listenBacklog and maxConnections/>
注意:问题在此处描述:http://msdn.microsoft.com/en-us/library/aa702636.aspx ,但给出的唯一解决方案是将 mex 暴露在不同的端口上。下面是反射器中的一些屏幕截图,显示了 .net 4.0 和 4.5 在计算 MaxPendingConnections 默认值时的区别:
关于c# - IP 端点 0.0.0.0 :13000. 上已经有一个监听器 ?? (使用 WCF 的 TCP),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9744683/
我是 ZMQ 的新手。我发现 ZMQ 套接字实现比 winsock 简单得多。但我怀疑 “使用 ZMQ TCP 套接字创建的客户端可以与传统的 TCP 服务器通信吗?” 换句话说我的 ZMQ 客户端可
我想使用 TCP 协议(protocol) 将数据发送到 Logstash。为了发送数据,我正在使用 Node-RED。一个简单的配置如下所示: 在 Logstash 文件夹中,我创建了一个名为 no
当我尝试更改窗口缩放选项时,作为 root,我可以通过在 /proc/sys/net/中执行 net.ipv4.tcp_mem=16777000 来更改值。如果我必须更改这 100 个系统,那将需要大
明天做一些练习题,这道做不出来 TCP 服务器连接 TCP 客户端进行通信所需的最小套接字端口数是多少? 肯定只有两个吧?一个用于服务器,一个用于客户端,但这似乎是显而易见的。我的伙伴们认为 TCP
考虑一个存在一个服务器和多个客户端的场景。每个客户端创建 TCP 连接以与服务器交互。 TCP alive的三种用法: 服务器端保活:服务器发送 TCP 保活以确保客户端处于事件状态。如果客户端死了,
TCP TAHOE 和 TCP RENO 有什么区别。 我想知道的是关于 3-dup-ack 和超时的行为? SST 发生了什么变化? 谢谢! 最佳答案 TCP Tahoe 和 Reno 是处理 TC
大家早上好。我一直在阅读(其中大部分在堆栈溢出中)关于如何进行安全密码身份验证(散列 n 次,使用盐等)但我怀疑我将如何在我的 TCP 客户端中实际实现它-服务器架构。 我已经实现并测试了我需要的方法
在遍历 RFC793 时,我开始知道应该以这种方式选择初始序列号段重叠被阻止。 有人能解释一下如果发生重叠,重复段将如何影响 TCP? 最佳答案 不同的操作系统有不同的行为。参见 http://ins
你能举例说明一下tcp/ip中nagle算法的概念吗? 最佳答案 我认为Wikipedia在开头的段落中做得很好。 Nagle's document, Congestion Control in IP
似乎最大 TCP 接收窗口大小为 1GB(使用缩放时)。因此,仍然可以用一个连接填充 100Gb 管道的最大 RTT 是 40ms(因为 2 * 40E-3 * 100E9/8 = 1GB)。这会将这
考虑在两个 TCP 端点之间建立的 TCP 连接,其中一个调用: 关闭():此处,不允许进一步读取或写入。 关机(fd,SHUT_WR):这会将全双工连接转换为单工连接,其中调用 SHUT_WR 的端
我是在 Lua 中编写解析器的新手,我有两个简短的问题。我有一个包含 TCP 选项的数据包,如 MSS、TCP SACK、时间戳、NOP、窗口比例、未知。我基本上是在尝试剖析 TCP 选项字段中的未知
TCP 是否不负责通过在传输过程中发生丢失等情况时采取任何可能必要的措施来确保通过网络完整地发送流? 它做的不对吗? 为什么更高的应用层协议(protocol)及其应用程序仍然执行校验和? 最佳答案
考虑使用 10 Mbps 链路的单个 TCP (Reno) 连接。假设此链路不缓冲数据并且接收方的接收缓冲区比拥塞窗口大得多。设每个 TCP 段的大小为 1500 字节,发送方和接收方之间连接的双向传
考虑这样一个场景,有client-a和server-b。 server-b 禁用了 TCP keepalive。 server-b 没有任何应用程序逻辑来检查 TCP 连接是否打开。 client-a
我正在尝试用 Rust 编写回显服务器。 use std::net::{TcpStream, TcpListener}; use std::io::prelude::*; fn main() {
听说对于TCP连接,服务器会监听一个端口,并使用另一个端口发送数据。 例如,Web 服务器监听端口 80。每当客户端连接到它时,该服务器将使用另一个端口(比如 9999)向客户端发送数据(Web 内容
我试图了解带有标记 PSH 和标记 URG 的 TCP 段之间的区别。我阅读了 RFC,但仍然无法理解,其中一个在将数据发送到进程之前缓冲数据而另一个没有吗? 最佳答案 它们是两种截然不同的机制。 #
有第三方服务公开 TCP 服务器,我的 Node 服务器(TCP 客户端)应使用 tls Node 模块与其建立 TCP 连接。作为 TCP 客户端, Node 服务器同时也是 HTTP 服务器,它应
我正在发送一些 TCP SYN 数据包以获得 TCP RST 的返回。为了识别每个探测器,我在 TCP 序列字段中包含一个计数器。我注意到以下几点: 当SYN probe中的sequence numb
我是一名优秀的程序员,十分优秀!