解决at the same time application  server will probably compete with some other software on the port的错误

电脑昨天关机没有关闭idea然后早上起床,打开Tomcat后在连接服务时出现了下面这句话

 It is possible to bind and connect to localhost:8888 at the same time - application 
server will probably compete with some other software on the port

(可以同时绑定和连接到localhost:8888-应用程序服务器可能会在端口上与其他一些软件竞争)

(端口号我的原来是8080,不过总是有端口冲突,就索性改为了8888)

但是8888的Tomcat能显示,但是打开之前项目报404错误

不过既然说在同一时间8888的端口号存在和其他软件的使用冲突,那我们先修改Tomcat的端口号,再找到与其冲突的那个应用,将其端口号释放。

 

首先在Tomcat安装目录里的conf文件里找到server.xml 

解决at the same time application  server will probably compete with some other software on the port的错误

然后单击右键选择打开方式选择记事本打开,找到对应代码将8888改为8886(暂时调整)

(如果有Notepad++,直接打开即可)

 

 

 

解决at the same time application  server will probably compete with some other software on the port的错误

将其改变为8886,发现可以正常运行,说明8888端口号确实被占用了。

解决at the same time application  server will probably compete with some other software on the port的错误

 那原有的8888端口号,究竟谁这么大胆敢偷偷占用我的8888了呢?

 

 

我们首先电脑左下角里输入:

 

 

组合快捷键win+R打开命令行,并输入powershell命令(可以直接杀死占用的端口号)

解决at the same time application  server will probably compete with some other software on the port的错误

.输入netstat -aon|findstr 端口号

然后输入kill 进程号:

这里输入的是:netstat -aon|findstr 8888

然后输入kill 11032

 

解决at the same time application  server will probably compete with some other software on the port的错误

或在Ctrl+Alt+Del启动任务管理器,找到对应进程号,单击右键结束任务

 

解决at the same time application  server will probably compete with some other software on the port的错误

 

现在再按照上述方式将8886,更改为8888

解决at the same time application  server will probably compete with some other software on the port的错误

 然后再启动Tomcat的服务,发现已经不再报错

解决at the same time application  server will probably compete with some other software on the port的错误

仔细想一下,估计昨天关机时,直接关机,没有关闭Tomcat服务和idea,所以8888端口号一直没有被清理,早上再重新启动时,才会出现上述情况。

希望这个小错大家不要犯~