TCP:地址已在使用中-客户端端口的可能原因?无端口排气 [英] TCP: Address already in use exception - possible causes for client port? NO PORT EXHAUSTION

查看:163
本文介绍了TCP:地址已在使用中-客户端端口的可能原因?无端口排气的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

愚蠢的问题.我从连接到服务器的客户端获得那些.可悲的是,设置很复杂,调试也很复杂-我们用完了所有选项.

stupid problem. I get those from a client connecting to a server. Sadly, the setup is complicated making debugging complex - and we run out of options.

环境: *客户机/服务器系统,都在同一台计算机上运行.客户端实际上是在特定时间进行一些数据库操作的服务. *连接来自C#,从OleDb到EasySoft JDBC驱动程序再到自定义编写的JDBC服务器,然后再在C ++中托管逻辑.是的,compelx-但是第三方供应商决定通过JDBC接口公开其服务器的扩展机制.在这里不能做很多事情;)

The environment: *Client/Server system, both running on the same machine. The client is actually a service doing some database manipulation at specific times. * The cnonection comes from C# going through OleDb to an EasySoft JDBC driver to a custom written JDBC server that then hosts logic in C++. Yeah, compelx - but the third party supplier decided to expose the extension mechanisms for their server through a JDBC interface. Not a lot can be done here ;)

症状: 定期(不定期),我们从JDBC驱动程序获得已在使用的地址:连接"信息.它们似乎来自我们运行的一项特定服务.

The Symptom: At (ir)regular intervals we get a "Address already in use: connect" told from the JDBC driver. They seem to come from one particular service we run.

现在,我确实阅读了有关端口耗尽的所有内容.这就是为什么我们现在有一个运行小工具的原因,该工具每分钟都会对端口及其状态进行计数.上一次发生这种情况时,我们使用了惊人的370个端口,错误发生后,端口数增加到了约900个.我们对注册表(这是Windows计算机)进行了补丁修补,以允许使用超过5000个客户端端口标准,但是即使到那时,我们仍然远远没有达到这个限制.

Now, I did read all the stuff about port exhaustion. This is why we have a little tool running now that counts ports and their states every minute. Last time this happened, we had an astonishing 370 ports in use, with the count rising to about 900 AFTER the error. We aleady patched the registry (it is a windows machine) to allow more than the 5000 client ports standard, but even then, we are far far from that limit to start with.

这就是为什么我要在这里问. Ayneone的想法ELSE可能导致这种情况吗?

Which is why I am asking here. Ayneone an ide what ELSE could cause this?

这是Windows 2003 Server计算机(64位).我能看到的唯一可能导致此问题的原因(但据说该功能已被禁用)是安装在服务器上的Symantec Endpoint Protection-能够充当防火墙,它可能拦截网络流量.我不想过早地指向Symantec(如果可以这样指向Symantec)来打开蠕虫病毒.那么,任何人都知道可能是什么原因造成的?

It is a Windows 2003 Server machine, 64 bit. The only other thing I can see that may cause it (but this functionality is supposedly disabled) is Symantec Endpoint Protection that is installed on the server - and being capable of actinc as a firewall, it could possibly intercept network traffic. I dont want to open a can of worms by pointing to Symantec prematurely (if pointing to Symantec can ever be seen as such). So, anyone an idea what else may be the cause?

谢谢

推荐答案

地址已在使用中",又名WSAEADDRINUSE(10048),表示当客户端套接字准备连接到服务器套接字时,它首先尝试绑定自身到已由另一个套接字使用的特定本地IP/端口对,它是活动的一个或已关闭但仍处于FD_WAIT状态的一个.这与可用端口的数量无关.

"Address already in use", aka WSAEADDRINUSE (10048), means that when the client socket prepared to connect to the server socket, it first tried to bind itself to a specific local IP/Port pair that was already in use by another socket, either an active one or one that has been closed but is still in the FD_WAIT state. This has nothing to do with the number of ports that are available.

这篇关于TCP:地址已在使用中-客户端端口的可能原因?无端口排气的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆