[英]java.net.BindException: Permission denied when starting Wiser SMTP Server
I'm on Mac using Java and try to start Wiser SMTP server within a test, but keep getting: 我在使用Java的Mac上,尝试在测试中启动Wiser SMTP服务器,但一直得到:
java.net.BindException: Permission denied
I use the following Wiser initialisation: 我使用以下Wiser初始化:
import org.subethamail.wiser.Wiser;
public void start() {
wiser.start();
}
There were suggestions on the internet to run it as a root user, which I'm not sure is applicable here... 互联网上有一些建议以root用户身份运行它,我不确定这里是否适用...
For Mac users port numbers up to 1024 are reserved for root users. 对于Mac用户,最多可为root用户保留1024个端口号。 Initialise Wiser by assigning a port number over 1024 at first:
首先通过分配1024以上的端口号来初始化Wiser:
public void start() {
wiser.setPort(1025);
wiser.start();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.