Django服务器错误:端口已在使用中 [英] Django Server Error: port is already in use

查看:81
本文介绍了Django服务器错误:端口已在使用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新启动Django服务器会显示以下错误:

Restarting the Django server displays the following error:

this port is already running....

此问题专门在Ubuntu而不是其他操作系统上发生。如何释放端口以重新启动服务器?

This problem occurs specifically on Ubuntu and not other operating systems. How can I free up the port to restart the server?

推荐答案

一个更简单的解决方案,只需键入 sudo热熔器-k 8000 / tcp
这应该杀死与端口8000相关的所有进程。

A more simple solution just type sudo fuser -k 8000/tcp. This should kill all the processes associated with port 8000.

编辑:

对于osx用户您可以使用 sudo lsof -t -i tcp:8000 | xargs kill -9

For osx users you can use sudo lsof -t -i tcp:8000 | xargs kill -9

这篇关于Django服务器错误:端口已在使用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆