[英]TIdSMTPServer and TIdPOP3Server won't start in UBUNTU LINUX
I've got a mail server with TIdSMTPServer and TIdPOP3Server that's working fine in lazarus under windows, but if I try to start my program under linux and I try : 我有一个带有TIdSMTPServer和TIdPOP3Server的邮件服务器,该服务器在Windows下的lazarus中可以正常工作,但是如果我尝试在linux下启动程序,请尝试:
SMTPServer.Active := True;
POP3Server.Active := True;
I get this error message : "Could not bind socket. Address and port are already in use." 我收到此错误消息:“无法绑定套接字。地址和端口已在使用中。” I tried disabling ports 25 and 110 in control center and some commands in the terminal but nothing helped. 我尝试禁用控制中心中的端口25和110以及终端中的一些命令,但无济于事。 Can someone give me a hint how to fix this ? 有人可以给我提示如何解决此问题吗?
This is a known issue in older Indy 10 releases that was fixed 6 months ago in revision 5066 of Indy's SVN. 这是较早的Indy 10发行版中的一个已知问题,该发行版在6个月前已在Indy的SVN修订版5066中修复。
If the server's Bindings
collection is empty when the server is activated, the Active
property setter creates a default IPv4 binding, and a default IPv6 binding if supported by the OS. 如果在激活服务器时服务器的Bindings
集合为空,则Active
属性设置器将创建默认的IPv4绑定和默认的IPv6绑定(如果操作系统支持)。 Both bindings are bound to the same DefaultPort
on all local IPv4/IPv6 addresses. 这两个绑定都绑定到所有本地IPv4 / IPv6地址上的相同DefaultPort
。 Having separate IPv4/IPv6 sockets bound to the same IP:Port works on Windows, it happily manages IPv4 and IPv6 separately, but it does not work on Linux and Android (and probably all other *Nix systems), which is why you get the "already in use" error - the IPv6 binding fails because the IPv4 binding is already using the IP:Port. 将单独的IPv4 / IPv6套接字绑定到同一IP:Port在Windows上可以运行,它可以愉快地分别管理IPv4和IPv6,但是在Linux和Android(以及可能所有其他* Nix系统)上却不能运行,这就是为什么“已经使用”错误-IPv6绑定失败,因为IPv4绑定已在使用IP:Port。
To avoid the error, you can either: 为避免该错误,您可以:
upgrade to the latest SVN snapshot, which does not create dual IPv4/IPv6 default bindings on Linux and Android. 升级到最新的SVN快照,该快照不会在Linux和Android上创建双重IPv4 / IPv6默认绑定。
make sure the Bindings
collection is not empty when you activate the server. 确保在激活服务器时Bindings
集合不为空。 Specify your own bindings explicitly as needed. 根据需要显式指定您自己的绑定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.