Jinnrry / PMail

Private EMail Server
GNU General Public License v2.0
1.48k stars 141 forks source link

端口占用问题,导致服务关闭 #198

Closed dongchenxuan closed 2 months ago

dongchenxuan commented 2 months ago

完整性要求 / Integrity requirements

版本

v2.6.4

描述

端口被重复绑定

重现方式

服务重启会出现 panic: listen tcp :995: bind: address already in use

服务端配置



服务端日志

[info][2024-09-03 13:16:43][/home/runner/work/PMail/PMail/server/pop3_server/pop3server.go:27]POP3 With TLS Server Start On Port :995 [info][2024-09-03 13:16:43][/home/runner/work/PMail/PMail/server/smtp_server/smtp.go:147]Starting Smtp With SSL Server Port: :465 panic: listen tcp :995: bind: address already in use

Jinnrry commented 2 months ago

程序是先输出端口信息,然后再占用端口,并不是程序重复占用两次端口。

netstatus -tunlop | grep 995 检查你服务器端口占用情况

dongchenxuan commented 2 months ago

进过检查,端口没有被其他进程占用 pmail启动后,占用了端口,随后该进程就停止 打印出panic: listen tcp :995: bind: address already in use

dongchenxuan commented 2 months ago

端口995会出现占用,命令查询时无占用 panic: listen tcp :995: bind: address already in use 端口无占用的情况 通过修改httpsPort,新端口也会有占用 panic: listen tcp :7720: bind: address already in use