杀死端口
以此启动项目报错为例:
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 80 was already in use.
Action:
Identify and stop the process that's listening on port 80 or configure this application to listen on another port.
Disconnected from the target VM, address: '127.0.0.1:54832', transport: 'socket'
Process finished with exit code 1
错误描述:web服务启动失败,80端口已经在使用。
PS:这时候就需要把80端kill之后再启动,具体步骤如下:

1、win+R打开doc窗口输入命令行查询所有正在使用的端口
netstat -ano

2、kill在使用80端口的服务 (53452为PID上图中列名跟值未对齐)
taskkill -PID 53452 -f

然后再重新启动就不会出现这种错误了,如果还有其他的端口错误报出,那就不要停继续kill
当遇到'Webserverfailedtostart.Port80wasalreadyinuse.'的错误时,需要找出并停止占用80端口的进程。通过win+R打开命令行,使用'netstat-ano'命令查看所有端口占用情况,然后使用'taskkill-PID<进程ID>-f'命令强制结束占用80端口的进程。完成这些步骤后,即可成功启动项目,避免端口冲突。

443

被折叠的 条评论
为什么被折叠?



