Delphi 2010 - 套接字端口 119 不起作用
我正在端口 119 上打开一个套接字(使用 idHttpServer),它打开正常(没有报告错误,我可以通过查看 netstat 看到端口 119 已打开)。但是当我的套接字客户端向服务器119端口发送请求时,服务器没有收到请求,客户端也无法工作。如果我将套接字端口更改为另一个端口(例如 90、80、120),它就可以正常工作。
我猜想套接字端口 119 是一个 SO 保留端口(但该端口上没有任何运行,我确信这一点)。我还知道新闻协议使用端口 119(但没有新闻服务器)。
有谁知道为什么我无法连接到 119 端口? 110 端口也会发生同样的情况(pop,但 pop 服务器未打开)。这让我发疯。
德尔福2010
最新独立版本
Windows 2003服务器企业版。
I am opening a socket on port 119 (using idHttpServer) and it opens ok (no errors reported and i can see that the port 119 is opened by looking at netstat). But when my socket client sends a request to the server 119 port, the server does not get the request neither the client works. If i change the socket port to another one (such as 90, 80, 120) it works fine.
I guess that the socket port 119 is a SO reserved port (but theres nothing running on that port, i am sure about that). I also know that port 119 is used by news protocol (but there is no news server).
Does anyone know why i cant connect to the 119 port? The same thing happens with the 110 port (pop, but not pop server on). It is driving me crazy.
Delphi 2010
Latest indy version
Windows 2003 server enterprise edition.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
它应该是您的开发机器中的某个东西,因为将 119 端口(或任何其他可用端口)与 INDY HTTP Server 一起使用是完全有效的。考虑到不建议使用 1024 个保留端口以下的 80 以外的端口,但这是另一回事。
我做了一个简单的测试,两个应用程序。以下是相关部分:
Server
dfm
Client
dfm
pas
结果:
不要忘记允许防火墙上的流量,例如接受默认 Windows 对话框(如果使用 Windows 防火墙):
It shall to be something in your development machine, because it is perfectly valid to use the 119 port (or any other available port) with INDY HTTP Server. Take in account it is not recommended to use ports different than 80 below the 1024 reserved ports to to that, but that's another thing.
I made a simple test, two applications. Here are the relevant parts:
Server
dfm
Client
dfm
pas
The result:
Dont forget to allow traffic on the firewall, for example by accepting the default windows dialog (in case of using windows firewall):
检查119端口是否真的空闲。例如,使用 Sysinternals 的 TcpView。
http://technet.microsoft.com/en-us/sysinternals/bb842062
Check if the port 119 is really free. For example with TcpView from Sysinternals.
http://technet.microsoft.com/en-us/sysinternals/bb842062
由于您在打开/绑定端口时没有收到错误,因此听起来您的服务器端很好,客户端可能会被阻止。
是时候看看客户端的防火墙了......
Since you didn't get an error on open/bind of the port, it sounds like your server-side is just fine, it's the client side that is likely getting blocked.
Time to look at firewall on the client...
似乎端口 119 被多个商城软件(Happy99 等)使用。您的防病毒软件可能正在阻止该端口。另外,您是否打开了 Windows 防火墙的端口?只是我的 5 美分...
最诚挚的问候,
拉杜
It seems that port 119 is used by several mallwares(Happy99 and others). Your antivirus maybe is blocking the port. Also, have you opened the port from Windows's Firewall? just my 5 cents...
Best regards,
Radu
您确定 NNTPSVC 服务没有运行吗?
http://support.microsoft.com/kb/832017
您还可以使用 Portqry.exe查看端口是否正常工作
http://support.microsoft.com/default.aspx?scid =kb;en-us;310099
关于此主题,我记得的最后一件事是 ISA 有时会阻止此端口。所以你需要确保这种情况不会发生。
哈特哈,
Are you sure NNTPSVC service is not running?
http://support.microsoft.com/kb/832017
You can also use Portqry.exe to see if port is working
http://support.microsoft.com/default.aspx?scid=kb;en-us;310099
Last thing i remember about this topic is that ISA sometimes block this port. So you need assure this is not happening.
HTH,