django启动server报错Error: That port is already in use.

  这种一般是端口错误,一般是要把端口关掉,这里提供了两种方法。

方法一:直接命令: sudo lsof -t -i tcp:8000 | xargs kill -9

方法二:脚本:名字manage.py

  直接运行:./manage.py runserver 即可

#!/bin/bash

pid=$(ps aux | grep "./manage.py runserver" | grep -v grep | head -1 | xargs | cut -f2 -d" ")

if [[ -n "$pid" ]]; then
    kill $pid
fi

fuser -k 8000/tcp

原文地址:https://www.cnblogs.com/dylancao/p/10231922.html

时间: 2024-07-31 11:04:11

django启动server报错Error: That port is already in use.的相关文章

django启动uwsgi报错

查看uwsgi.log *** Starting uWSGI 2.0.17 (64bit) on [Thu Apr 5 17:46:15 2018] *** compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-18) on 05 April 2018 02:08:03 os: Linux-2.6.32-642.6.2.el6.x86_64 #1 SMP Wed Oct 26 06:52:09 UTC 2016 nodename: GDJ_DE

启动mysql报错 -- ERROR! The server quit without updating PID file

开发说某个测试环境的mysql,无法重启了,报以下错误提示: # service mysqld restart Shutting down MySQL.. SUCCESS! Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid). # ps -ef|grep mysql|grep -v grep avahi 697 1 0 Sep16 ? 00:00:02

SpringBoot启动zipkin-server报错Error creating bean with name ‘armeriaServer’

目前,GitHub 上最新 release 版本是 Zipkin 2.12.9,从 2.12.6 版本开始有个较大的更新,迁移使用 Armeria HTTP 引擎. 从此版本开始,若直接添加依赖的 Spring Boot 应用启动会存在冲突,会报上面的错,降到2.12.3版本就可以正常启动了. 参考文章 来自blog.koreyoshi.work 原文地址:https://www.cnblogs.com/z-jx/p/11581885.html

启动hive报错[ERROR] Terminal initialization failed; falling back to unsupported

启动hive时报如下的错误[ERROR] Terminal initialization failed; falling back to unsupported 解决办法:进入到hadoop安装目录下的share/hadoop/yarn下删除 jline的jar文件.再启动hive即可 版权声明:本文为博主原创文章,未经博主允许不得转载.

linux 使用systemctl 启动服务报错: Error: No space left on device

By default, Linux only allocates 8192 watches for inotify, which is ridiculously low. And when it runs out, the error is also No space left on device, which may be confusing if you aren't explicitly looking for this issue. vi /etc/sysctl.conf  增加  fs

CentOS7中启动Chrome报错ERROR:zygote_host_impl_linux.cc

网上查的解决了问题 1. 需要安装libexif 说明我已经安装了libexif 2. 从安全角度考虑,Chrome不应在root环境下运行,如果某些原因必须以root身份运行Chrome,可以运行下面的命令 [[email protected] 桌面]# google-chrome --no-sandbox --user-data-dir &

【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

xampp in ubuntu下命令行启动mysql报错: [email protected]:/opt/lampp$ ./bin/mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2) 启动mysql服务: [email protected]:/opt/lampp$ /

长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 尝试去查看mysql.socket文件,发现没有.. $ which mysql /usr/local/bin/mysql 然后试试重启mysql: $ mysql.server start

源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys'

170502 10:43:40 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data 2017-05-02 10:43:40 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.