修改端口绑定错误提示
This commit is contained in:
@@ -150,8 +150,8 @@ public class NettyAcceptor implements ServerAcceptor {
|
||||
LOG.error("An interruptedException was caught while initializing server. Protocol={}", protocol, ex);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LOG.error("端口 {} 已经被占用。请检查该端口被那个程序占用,找到程序停掉。\n查找端口被那个程序占用的命令是: netstat -tunlp | grep {}", port, port);
|
||||
System.out.println("端口 " + port + " 已经被占用。请检查该端口被那个程序占用,找到程序停掉。\n查找端口被那个程序占用的命令是: netstat -tunlp | grep " + port);
|
||||
LOG.error("端口 {} 已经被占用或者无权限使用。如果无权限使用,请以root权限运行;如果被占用,请检查该端口被那个程序占用,找到程序停掉。\n查找端口被那个程序占用的命令是: netstat -tunlp | grep {}", port, port);
|
||||
System.out.println("端口 " + port + " 已经被占用或者无权限使用。如果无权限使用,请以root权限运行;如果被占用,请检查该端口被那个程序占用,找到程序停掉。\n查找端口被那个程序占用的命令是: netstat -tunlp | grep " + port);
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user